all
This commit is contained in:
BIN
ESP8266/.DS_Store
vendored
Normal file
BIN
ESP8266/.DS_Store
vendored
Normal file
Binary file not shown.
21
ESP8266/.ccsproject
Normal file
21
ESP8266/.ccsproject
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?ccsproject version="1.0"?>
|
||||
<projectOptions>
|
||||
<ccsVersion value="12.3.0"/>
|
||||
<deviceVariant value="Cortex M.MSPM0G3507"/>
|
||||
<deviceFamily value="TMS470"/>
|
||||
<deviceEndianness value="little"/>
|
||||
<codegenToolVersion value="TICLANG_2.1.3.LTS"/>
|
||||
<isElfFormat value="true"/>
|
||||
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
|
||||
<rts value=""/>
|
||||
<createSlaveProjects value=""/>
|
||||
<ignoreDefaultDeviceSettings value="true"/>
|
||||
<ignoreDefaultCCSSettings value="true"/>
|
||||
<templateProperties value="id=gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.projectspec.gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang,buildProfile=release,isHybrid=true"/>
|
||||
<sourceLookupPath value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/ti/driverlib"/>
|
||||
<origin value="C:\ti\mspm0_sdk_1_00_01_03\examples\nortos\LP_MSPM0G3507\driverlib\gpio_toggle_output\ticlang\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.projectspec"/>
|
||||
<filesToOpen value="gpio_toggle_output.syscfg,README.md"/>
|
||||
<isTargetManual value="false"/>
|
||||
<activeTargetConfiguration value="targetConfigs/MSPM0G3507.ccxml"/>
|
||||
</projectOptions>
|
||||
11
ESP8266/.clangd
Normal file
11
ESP8266/.clangd
Normal file
@@ -0,0 +1,11 @@
|
||||
# This is an auto-generated file - do not add it to source-control
|
||||
|
||||
CompileFlags:
|
||||
CompilationDatabase: Debug/.clangd
|
||||
|
||||
Diagnostics:
|
||||
Suppress: '*'
|
||||
|
||||
InlayHints:
|
||||
Enabled: No
|
||||
|
||||
116
ESP8266/.cproject
Normal file
116
ESP8266/.cproject
Normal file
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="com.ti.ccs.errorparser.SysConfigErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="com.ti.ccs.errorparser.CompilerErrorParser_TI" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.SysConfigErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893" name="Debug" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.DebugToolchain.1437783781" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.linkerDebug.973063824">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.508557089" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue value="DEVICE_CONFIGURATION_ID=Cortex M.MSPM0G3507"/>
|
||||
<listOptionValue value="DEVICE_CORE_ID=CORTEX_M0P"/>
|
||||
<listOptionValue value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue value="LINKER_COMMAND_FILE=mspm0g3507.cmd"/>
|
||||
<listOptionValue value="RUNTIME_SUPPORT_LIBRARY="/>
|
||||
<listOptionValue value="CCS_MBS_VERSION=6.1.3"/>
|
||||
<listOptionValue value="PRODUCTS=MSPM0-SDK:2.9.0.01;sysconfig:1.26.0;"/>
|
||||
<listOptionValue value="PRODUCT_MACRO_IMPORTS={"MSPM0-SDK":["${COM_TI_MSPM0_SDK_INCLUDE_PATH}","${COM_TI_MSPM0_SDK_LIBRARY_PATH}","${COM_TI_MSPM0_SDK_LIBRARIES}","${COM_TI_MSPM0_SDK_SYMBOLS}","${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"],"sysconfig":["${SYSCONFIG_TOOL_INCLUDE_PATH}","${SYSCONFIG_TOOL_LIBRARY_PATH}","${SYSCONFIG_TOOL_LIBRARIES}","${SYSCONFIG_TOOL_SYMBOLS}","${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"]}"/>
|
||||
<listOptionValue value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1055362318" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="TICLANG_4.0.4.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.targetPlatformDebug.1076668130" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug.585484234" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.932105278" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MARCH.1807837487" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MARCH" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MARCH.thumbv6m" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MCPU.773042255" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MCPU" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MCPU.cortex-m0plus" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MFLOAT_ABI.1781622485" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MFLOAT_ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MFLOAT_ABI.soft" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE.1655849544" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE.MLITTLE_ENDIAN" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.1287675358" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.MTHUMB" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.1038112727" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.INCLUDE_PATH.822384293" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INCLUDE_PATH}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_INCLUDE_PATH}"/>
|
||||
<listOptionValue value="${PROJECT_ROOT}"/>
|
||||
<listOptionValue value="${PROJECT_ROOT}/${ConfigName}"/>
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/third_party/CMSIS/Core/Include"/>
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE.1367640812" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
<listOptionValue value="__MSPM0G3507__"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG.600064755" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG.GDWARF_3" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.linkerDebug.973063824" name="Arm Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.MAP_FILE.1510132596" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.MAP_FILE" value="${ProjName}.map" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.OUTPUT_FILE.923928476" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.HEAP_SIZE.56573948" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.HEAP_SIZE" value="512" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.STACK_SIZE.1322320331" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.STACK_SIZE" value="512" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.LIBRARY.1839802668" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_LIBRARIES}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_LIBRARIES}"/>
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/ti/driverlib/lib/ticlang/m0p/mspm0g1x0x_g3x0x/driverlib.a"/>
|
||||
<listOptionValue value="libc.a"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.SEARCH_PATH.1508348365" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_LIBRARY_PATH}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_LIBRARY_PATH}"/>
|
||||
<listOptionValue value="${PROJECT_BUILD_DIR}/syscfg"/>
|
||||
<listOptionValue value="${CG_TOOL_ROOT}/lib"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.REREAD_LIBS.1337240666" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.REREAD_LIBS" value="false" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DIAG_WRAP.1372830414" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DISPLAY_ERROR_NUMBER.2113274288" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.XML_LINK_INFO.1074020510" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.XML_LINK_INFO" value="${ProjName}_linkInfo.xml" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.hex.2066856685" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.hex"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.objcopy.487324352" name="Arm Objcopy Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.objcopy"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.sysConfig.160884150" name="SysConfig" superClass="com.ti.ccstudio.buildDefinitions.sysConfig">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS.2107175972" superClass="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS" valueType="stringList">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"/>
|
||||
</option>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893.CriticalSection.s" name="CriticalSection.s" rcbsApplicability="disable" resourcePath="CriticalSection.s" toolsToInvoke="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.932105278.218198436">
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.932105278.218198436" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.932105278">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE.263672626" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OTHER_FLAGS.637624358" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OTHER_FLAGS" valueType="stringList">
|
||||
<listOptionValue value=""/>
|
||||
</option>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.com.ti.ccstudio.buildDefinitions.TMS470.ProjectType.348798676" name="TMS470" projectType="com.ti.ccstudio.buildDefinitions.TMS470.ProjectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
74
ESP8266/.project
Normal file
74
ESP8266/.project
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ESP8266</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.ti.ccstudio.core.ccsNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>Clock.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/Clock.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>I2C.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/I2C.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LaunchPad.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/LaunchPad.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>SSD1306.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/SSD1306.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>esp8266.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/esp8266.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CriticalSection.s</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/CriticalSection.s</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FIFO.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/FIFO.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>UARTints.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/UARTints.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>UART.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/UART.c</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
3
ESP8266/.settings/org.eclipse.cdt.codan.core.prefs
Normal file
3
ESP8266/.settings/org.eclipse.cdt.codan.core.prefs
Normal file
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
inEditor=false
|
||||
onBuild=false
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
57
ESP8266/Debug/.clangd/compile_commands.json
Normal file
57
ESP8266/Debug/.clangd/compile_commands.json
Normal file
@@ -0,0 +1,57 @@
|
||||
[
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/Clock.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\"",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/CriticalSection.s"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/ESP8266main.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/FIFO.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/I2C.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/LaunchPad.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/SSD1306.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/UART.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/UARTints.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/esp8266.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/ESP8266/Debug/syscfg\" -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/ESP8266/ticlang/startup_mspm0g3507_ticlang.c"
|
||||
}
|
||||
]
|
||||
BIN
ESP8266/ESP8266circuit.png
Normal file
BIN
ESP8266/ESP8266circuit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
453
ESP8266/ESP8266main.c
Normal file
453
ESP8266/ESP8266main.c
Normal file
@@ -0,0 +1,453 @@
|
||||
// ESP8266main.c
|
||||
// testmain for ESP8266 module to act as a WiFi client or server
|
||||
// Currently restricted to one incoming or outgoing connection at a time
|
||||
//
|
||||
// Steven Prickett (steven.prickett@gmail.com)
|
||||
// Modified version by Dung Nguyen, Wally Guzman
|
||||
// Modified by Jonathan Valvano, March 28, 2017
|
||||
// Consolidated by Andreas Gerstlauer, April 6, 2020
|
||||
// Converted to MSPM0G3507 UART2 by Jonathan Valvano, Jan 18, 2026
|
||||
/*
|
||||
THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
VALVANO SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
|
||||
OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
*/
|
||||
|
||||
// NOTE: see ESP8266 files in datasheets folder
|
||||
|
||||
/* Hardware connections
|
||||
Vcc is a separate regulated 3.3V supply with at least 215mA
|
||||
/------------------------------\
|
||||
| chip 1 8 |
|
||||
| Ant 2 7 |
|
||||
| enna processor 3 6 |
|
||||
| 4 5 |
|
||||
\------------------------------/
|
||||
Connects MSPM0
|
||||
UART1 on (PA17/PA18) or UART2 on (PB17/PB18)
|
||||
Reset on PA25
|
||||
Ok to not access PB19 because of the internal pullup in ESP8266
|
||||
ESP8266 MSPM0 Motor board version 7
|
||||
1 URxD PA17 UART1 out of MSPM0, into ESP8266 115200 baud
|
||||
2 GPIO0 +3.3V for normal operation (ground to flash)
|
||||
3 GPIO2 PB19 GPIO, high/float on startup, has internal pullup, can be used for I/O
|
||||
4 GND Gnd GND (70mA)
|
||||
5 UTxD PA18 UART out of ESP8266, UART1 into MSPM0 115200 baud
|
||||
6 Ch_PD chip select, 10k resistor to 3.3V
|
||||
7 Reset PA25 MSPM0 GPIO output, can issue output low to cause hardware reset
|
||||
8 Vcc regulated 3.3V supply with at least 70mA
|
||||
|
||||
ESP8266 MSPM0 Motor board version 7.1
|
||||
1 URxD PB17 UART2 out of MSPM0, into ESP8266 115200 baud
|
||||
2 GPIO0 +3.3V for normal operation (ground to flash)
|
||||
3 GPIO2 PB19 GPIO, high/float on startup, has internal pullup, can be used for I/O
|
||||
4 GND Gnd GND (70mA)
|
||||
5 UTxD PB18 UART out of ESP8266, UART2 into MSPM0 115200 baud
|
||||
6 Ch_PD chip select, 10k resistor to 3.3V
|
||||
7 Reset PA25 MSPM0 GPIO output, can issue output low to cause hardware reset
|
||||
8 Vcc regulated 3.3V supply with at least 70mA
|
||||
*/
|
||||
/* Derived from i2c_controller_rw_multibyte_fifo_poll_LP_MSPM0G3507_nortos_ticlang
|
||||
VCC to +3.3V
|
||||
I2C SCL: PB2 is the SSD1306 SCL, with 1.5k pullup to 3.3V
|
||||
I2C SDA: PB3 is the SSD1306 SDA
|
||||
GND to GND
|
||||
*/
|
||||
|
||||
#include <ti/devices/msp/msp.h>
|
||||
#include "../inc/LaunchPad.h"
|
||||
#include "../inc/Clock.h"
|
||||
#include "../inc/SSD1306.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "../RTOS_Labs_common/esp8266.h"
|
||||
#include "../inc/UART.h"
|
||||
|
||||
|
||||
|
||||
// Client or Server ESP8266 Initialization
|
||||
// 0 means client, != 0 means server at specified port
|
||||
//#define SERVER 80 // port 80 is for http
|
||||
|
||||
// Transparently forwarding debug mode
|
||||
// #define TRANSPARENT 1
|
||||
|
||||
|
||||
#if (! TRANSPARENT) && (! SERVER)
|
||||
// client mode
|
||||
const char Fetch[] = "GET /data/2.5/weather?q=Austin%20Texas&APPID=e8dc75caa5babe657b849dd5e75a19a9 HTTP/1.1\r\nHost:api.openweathermap.org\r\n\r\n";
|
||||
// 1) go to http://openweathermap.org/appid#use
|
||||
// 2) Register on the Sign up page
|
||||
// 3) get an API key (APPID) replace the 1234567890abcdef1234567890abcdef with your APPID
|
||||
char LOGDATA[] ="GET /php/json/write.php?name=Robot13&bump=19&steering=123&right=456&left=678&systick=44&addthread=75&jitter=75 HTTP/1.0\r\nHOST: embedded.ece.utexas.edu\r\n\r\n";
|
||||
|
||||
char Response[512];
|
||||
char Status[16];
|
||||
uint16_t StartTime,EndTime,ElaspedTime;
|
||||
const char OpenWeathermap[] ="api.openweathermap.org";
|
||||
const char Embedded_ece[] ="embedded.ece.utexas.edu";
|
||||
|
||||
int main(void){ // main1
|
||||
uint32_t bump; char *s;
|
||||
__disable_irq();
|
||||
Clock_Init80MHz(0);
|
||||
LaunchPad_Init(); // set system clock to 80 MHz
|
||||
UART_Init(); // UART0 only used for debugging
|
||||
TimerG8_Init(8,250); // 50us 3.2 s
|
||||
__enable_irq();
|
||||
|
||||
UART_OutString("\r\nESP8266 ECE445M Test\r\n");
|
||||
SSD1306_Init(SSD1306_SWITCHCAPVCC);
|
||||
SSD1306_SetCursor(0,0);
|
||||
SSD1306_ClearBuffer();
|
||||
SSD1306_DrawString(0, 0,"ESP8266 ECE445M Test",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
if(!ESP8266_Init(true,false)) { // initialize with rx echo
|
||||
SSD1306_DrawString(0,16,"No Wifi adapter",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---No ESP detected\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
UART_OutString("\r\n-----------System starting...\r\n");
|
||||
ESP8266_GetVersionNumber();
|
||||
if(!ESP8266_Connect(true)) { // connect to access point
|
||||
SSD1306_DrawString(0,16,"No Wifi network",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---Failure connecting to access point\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
SSD1306_DrawString(0,16,"Wifi connected",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
GPIOB->DOUTSET31_0 = BLUE;
|
||||
|
||||
// Lab 6 test
|
||||
ESP8266_GetStatus();
|
||||
while(1){
|
||||
UART_OutString(LOGDATA);
|
||||
bump = 10*(LOGDATA[42]-'0')+(LOGDATA[43]-'0');
|
||||
SSD1306_DrawString(0,32,"bump: ",SSD1306_WHITE);
|
||||
SSD1306_DrawUDec(56,32,bump,SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
|
||||
if(ESP8266_MakeTCPConnection((char *)Embedded_ece, 80, 0, false)){
|
||||
// open socket to web server on port 80
|
||||
ESP8266_StartReceiveSearch("status=");
|
||||
StartTime = TIMG8->COUNTERREGS.CTR;
|
||||
if(ESP8266_Send(LOGDATA)){
|
||||
|
||||
// if(ESP8266_Receive(Response, 512)){ // receive response
|
||||
// UART_OutString(Response);
|
||||
uint32_t TimeOut=10000000;
|
||||
do{ s = ESP8266_GetReceiveBuffer(); // get status
|
||||
TimeOut--;
|
||||
}while((s==0)&&TimeOut);
|
||||
EndTime = TIMG8->COUNTERREGS.CTR;
|
||||
ElaspedTime = StartTime-EndTime;
|
||||
if(s){
|
||||
int i=0;
|
||||
while(((*s)!=' ')&&(i<15)){
|
||||
Status[i] = *s;
|
||||
s++; i++;
|
||||
}
|
||||
Status[i] = 0;
|
||||
SSD1306_DrawString(0,44," ",SSD1306_WHITE);
|
||||
SSD1306_DrawString(0,44,Status,SSD1306_WHITE);
|
||||
SSD1306_DrawString(0,56,"Time(ms) ",SSD1306_WHITE);
|
||||
SSD1306_DrawUDec(56,56,ElaspedTime/20,SSD1306_WHITE);
|
||||
SSD1306_OutBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while(LaunchPad_InS2()==0){// wait for S2 touch
|
||||
}
|
||||
if(LOGDATA[43] == '9'){
|
||||
LOGDATA[42] = LOGDATA[42]+1;
|
||||
LOGDATA[43] = '0';
|
||||
}else{
|
||||
LOGDATA[43] = LOGDATA[43]+1;
|
||||
}
|
||||
GPIOB->DOUTCLR31_0 = GREEN;
|
||||
GPIOB->DOUTSET31_0 = BLUE;
|
||||
GPIOB->DOUTTGL31_0 = RED;
|
||||
}
|
||||
}
|
||||
|
||||
int main2(void){ uint32_t len; char *s; char *e; int32_t data;
|
||||
__disable_irq();
|
||||
Clock_Init80MHz(0);
|
||||
LaunchPad_Init(); // set system clock to 80 MHz
|
||||
UART_Init(); // UART0 only used for debugging
|
||||
__enable_irq();
|
||||
|
||||
UART_OutString("\r\nESP8266 GetWeather Test\r\n");
|
||||
SSD1306_Init(SSD1306_SWITCHCAPVCC);
|
||||
SSD1306_SetCursor(0,0);
|
||||
SSD1306_ClearBuffer();
|
||||
SSD1306_DrawString(0, 0,"ESP8266 GetWeather",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
if(!ESP8266_Init(true,false)) { // initialize with rx echo
|
||||
SSD1306_DrawString(0,16,"No Wifi adapter",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---No ESP detected\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
UART_OutString("\r\n-----------System starting...\r\n");
|
||||
ESP8266_GetVersionNumber();
|
||||
if(!ESP8266_Connect(true)) { // connect to access point
|
||||
SSD1306_DrawString(0,16,"No Wifi network",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---Failure connecting to access point\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
SSD1306_DrawString(0,16,"Wifi connected",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
GPIOB->DOUTSET31_0 = BLUE;
|
||||
|
||||
ESP8266_GetStatus();
|
||||
while(1){
|
||||
ESP8266_GetStatus();
|
||||
if(ESP8266_MakeTCPConnection((char *)OpenWeathermap, 80, 0, false)){ // open socket to web server on port 80
|
||||
if(ESP8266_Send(Fetch)){ // send request
|
||||
SSD1306_DrawString(0,16," ",SSD1306_WHITE); // 20 characters
|
||||
SSD1306_DrawString(0,32," ",SSD1306_WHITE); // 20 characters
|
||||
SSD1306_DrawString(0,40," ",SSD1306_WHITE); // 20 characters
|
||||
SSD1306_OutBuffer();
|
||||
if(ESP8266_Receive(Response, 512)){ // receive response
|
||||
if(strncmp(Response, "HTTP", 4) == 0) { // received HTTP response?
|
||||
SSD1306_DrawString(0,16,"Weather fetched",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
GPIOB->DOUTCLR31_0 = BLUE;
|
||||
GPIOB->DOUTSET31_0 = GREEN;
|
||||
len = 0;
|
||||
while(strlen(Response)) { // parse HTTP headers until empty line
|
||||
if(!ESP8266_Receive(Response, 512)){
|
||||
len = 0;
|
||||
break;
|
||||
}
|
||||
if(strncmp(Response, "Content-Length: ", 16) == 0) {
|
||||
len = atol(Response+16); // get HTML body size
|
||||
}
|
||||
}
|
||||
if(len) { // Get HTML body and parse for weather info
|
||||
ESP8266_Receive(Response, (len < 512)? (len+1) : 512);
|
||||
s = strstr(Response, "\"temp\":"); // get temperature
|
||||
if(s){
|
||||
data = atol(s+7);
|
||||
SSD1306_DrawString(0,32,"Temp [C]: ",SSD1306_WHITE);
|
||||
SSD1306_DrawUDec(56,32,data-273,SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
s = strstr(Response, "\"description\":"); // get description
|
||||
if(s){
|
||||
e = strchr(s+15, '"'); // find end of substring
|
||||
if(e){
|
||||
*e = 0; // temporarily terminate with zero
|
||||
SSD1306_DrawString(0,40,s+15,SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SSD1306_DrawString(0,16,"Empty response",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
} else {
|
||||
SSD1306_DrawString(0,16,"Invalid response",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
} else {
|
||||
SSD1306_DrawString(0,16,"No response",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
} else {
|
||||
SSD1306_DrawString(0,16,"Send failed",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
ESP8266_CloseTCPConnection(); // close connection
|
||||
} else {
|
||||
SSD1306_DrawString(0,16,"Connection failed",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
while(LaunchPad_InS2()==0){// wait for S2 touch
|
||||
}
|
||||
GPIOB->DOUTCLR31_0 = GREEN;
|
||||
GPIOB->DOUTSET31_0 = BLUE;
|
||||
GPIOB->DOUTTGL31_0 = RED;
|
||||
}
|
||||
}
|
||||
#elif SERVER
|
||||
|
||||
/*
|
||||
======================================================================================================================
|
||||
========== Simple HTTP SERVER ==========
|
||||
======================================================================================================================
|
||||
*/
|
||||
|
||||
const char formBody[] =
|
||||
"<!DOCTYPE html><html><body><center> \
|
||||
<h1>Enter a message to send to your microcontroller:</h1> \
|
||||
<form> \
|
||||
<input type=\"text\" name=\"message\" value=\"Hello ESP8266!\"> \
|
||||
<br><input type=\"submit\" value=\"Go!\"> \
|
||||
</form></center></body></html>";
|
||||
|
||||
const char statusBody[] =
|
||||
"<!DOCTYPE html><html><body><center> \
|
||||
<h1>Message sent successfully!</h1> \
|
||||
</body></html>";
|
||||
|
||||
/*
|
||||
===================================================================================================
|
||||
HTTP :: HTTP_ServePage
|
||||
- constructs and sends a web page via the ESP8266 server
|
||||
- NOTE: this seems to work for sending pages to Firefox (and maybe other PC-based browsers),
|
||||
but does not seem to load properly on iPhone based Safari. May need to add some more
|
||||
data to the header.
|
||||
===================================================================================================
|
||||
*/
|
||||
void itoa(uint32_t n, char message[8]);
|
||||
int HTTP_ServePage(const char* body){
|
||||
char header[] = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nConnection: close\r\nContent-Length: ";
|
||||
|
||||
char contentLength[16];
|
||||
itoa(strlen(body),contentLength);
|
||||
// sprintf(contentLength, "%d\r\n\r\n", strlen(body));
|
||||
strcat(contentLength, "\r\n\r\n");
|
||||
|
||||
if(!ESP8266_SendBuffered(header)) return 0;
|
||||
if(!ESP8266_SendBuffered(contentLength)) return 0;
|
||||
if(!ESP8266_SendBuffered(body)) return 0;
|
||||
|
||||
if(!ESP8266_SendBufferedStatus()) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
char HTTP_Request[64];
|
||||
|
||||
int main(void){
|
||||
__disable_irq();
|
||||
Clock_Init80MHz(0);
|
||||
LaunchPad_Init(); // set system clock to 80 MHz
|
||||
UART_Init(); // UART0 only used for debugging
|
||||
__enable_irq();
|
||||
UART_OutString("\r\nESP8266 Server Test\r\n");
|
||||
SSD1306_Init(SSD1306_SWITCHCAPVCC);
|
||||
SSD1306_SetCursor(0,0);
|
||||
SSD1306_ClearBuffer();
|
||||
SSD1306_DrawString(0, 0,"ESP8266 Server Test",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
if(!ESP8266_Init(true,false)){ // initialize with rx echo
|
||||
SSD1306_DrawString(0,16,"No Wifi adapter",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---No ESP detected\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
UART_OutString("\r\n-----------System starting...\r\n");
|
||||
ESP8266_GetVersionNumber();
|
||||
if(!ESP8266_Connect(true)){ // connect to access point
|
||||
SSD1306_DrawString(0,16,"No Wifi network",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---Failure connecting to access point\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
SSD1306_DrawString(0,16,"Wifi connected",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
|
||||
|
||||
if(!ESP8266_StartServer(SERVER,600)){ // 5min timeout
|
||||
SSD1306_DrawString(0,16,"Server failure",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---Failure starting server\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
SSD1306_DrawString(0,24,"Server started",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
|
||||
GPIOB->DOUTSET31_0 = BLUE;
|
||||
|
||||
while(1) {
|
||||
// Wait for connection
|
||||
ESP8266_WaitForConnection();
|
||||
SSD1306_DrawString(0,32,"Server started",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
|
||||
// Receive request
|
||||
if(!ESP8266_Receive(HTTP_Request, 64)){
|
||||
SSD1306_DrawString(0,40,"No request",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
ESP8266_CloseTCPConnection();
|
||||
continue;
|
||||
}
|
||||
|
||||
// check for HTTP GET
|
||||
if(strncmp(HTTP_Request, "GET", 3) == 0) {
|
||||
char* messagePtr = strstr(HTTP_Request, "?message=");
|
||||
if(messagePtr) {
|
||||
// Clear any previous message
|
||||
SSD1306_DrawString(0,40," ",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
// Process form reply
|
||||
if(HTTP_ServePage(statusBody)) {
|
||||
SSD1306_DrawString(0,40,"Served status",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
GPIOB->DOUTSET31_0 = BLUE;
|
||||
GPIOB->DOUTCLR31_0 = GREEN;
|
||||
} else {
|
||||
SSD1306_DrawString(0,40,"Error serving status",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
// Terminate message at first separating space
|
||||
char* messageEnd = strchr(messagePtr, ' ');
|
||||
if(messageEnd) *messageEnd = 0; // terminate with null character
|
||||
// Print message on terminal
|
||||
SSD1306_DrawString(0,48,messagePtr + 9,SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
UART_OutString("\r\n---Message from the Internet: ");
|
||||
UART_OutString(messagePtr + 9);
|
||||
UART_OutString("\n\r");
|
||||
} else {
|
||||
// Serve web page
|
||||
if(HTTP_ServePage(formBody)) {
|
||||
SSD1306_DrawString(0,40,"Served form",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
GPIOB->DOUTCLR31_0 = BLUE;
|
||||
GPIOB->DOUTSET31_0 = GREEN;
|
||||
} else {
|
||||
SSD1306_DrawString(0,40,"Error serving form",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// handle data that may be sent via means other than HTTP GET
|
||||
SSD1306_DrawString(0,40,"Not a GET request",SSD1306_WHITE); SSD1306_OutBuffer();
|
||||
}
|
||||
GPIOB->DOUTTGL31_0 = RED;
|
||||
ESP8266_CloseTCPConnection();
|
||||
}
|
||||
}
|
||||
// works for 0 to 999
|
||||
void itoa(uint32_t n, char message[8]){
|
||||
if(n>999)n=999;
|
||||
if(n>=100){ // 100 to 999
|
||||
message[0] = (n/100+'0'); /* hundreds digit */
|
||||
n = n%100; //the rest
|
||||
message[1] = (n/10+'0'); /* tens digit */
|
||||
n = n%10; //the rest
|
||||
message[2] = (n+'0'); /* tenths digit */
|
||||
message[3] = 0;
|
||||
}else { // 0 to 99
|
||||
if(n>=10){ // 10 to 99
|
||||
message[0] = (n/10+'0'); /* tens digit */
|
||||
n = n%10; //the rest
|
||||
message[1] = (n+'0'); /* tenths digit */
|
||||
message[2] = 0;
|
||||
}else{ // 0 to 9
|
||||
message[0] = (n+'0'); /* tenths digit */
|
||||
message[1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else // TRANSPARENT
|
||||
|
||||
// transparent mode for testing
|
||||
void ESP8266_SendCommand(char *);
|
||||
void ESP8266_OutChar(char);
|
||||
int main(void){ char data;
|
||||
DisableInterrupts();
|
||||
PLL_Init(Bus80MHz);
|
||||
LED_Init();
|
||||
Output_Init(); // UART0 as a terminal
|
||||
EnableInterrupts();
|
||||
if(!ESP8266_Init(true,false)) { // initialize with rx echo
|
||||
printf("\r\n---No ESP detected\r\n");
|
||||
while(1) {}
|
||||
}
|
||||
printf("\r\n-----------System starting...\r\n");
|
||||
ESP8266_Reset();
|
||||
// ESP8266_SendCommand("AT+UART=115200,8,1,0,3\r\n");
|
||||
// data = UART_InChar();
|
||||
|
||||
while(1){
|
||||
// echo data back and forth
|
||||
data = UART_InCharNonBlock();
|
||||
if(data){
|
||||
ESP8266_OutChar(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
146
ESP8266/README.html
Normal file
146
ESP8266/README.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml"
|
||||
xmlns:o="urn:schemas-microsoft-com:office:office"
|
||||
xmlns:w="urn:schemas-microsoft-com:office:word"
|
||||
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
|
||||
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
|
||||
xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=windows-1252">
|
||||
<meta name="ProgId" content="Word.Document">
|
||||
<meta name="Generator" content="Microsoft Word 14">
|
||||
<meta name="Originator" content="Microsoft Word 14">
|
||||
<base target="_parent">
|
||||
<link rel="Edit-Time-Data" href="index_files/editdata.mso">
|
||||
<title>ESP8266</title>
|
||||
<o:smarttagtype
|
||||
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"></o:smarttagtype><o:smarttagtype
|
||||
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
|
||||
name="PlaceName"></o:smarttagtype>
|
||||
<o:smarttagtype
|
||||
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
|
||||
name="PlaceType"></o:smarttagtype>
|
||||
<link rel="themeData" href="index_files/themedata.thmx">
|
||||
<link rel="colorSchemeMapping"
|
||||
href="index_files/colorschememapping.xml">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-color: white;" alink="#0000ff" lang="EN-US"
|
||||
link="blue" vlink="#c40026">
|
||||
<div class="WordSection1">
|
||||
<p style="text-align: center;" align="center"><span
|
||||
style="font-size: 18pt;">ESP8266</span><br>
|
||||
<table class="MsoNormalTable"
|
||||
style="border: 3pt outset ; background: rgb(255, 204, 153) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 100%;"
|
||||
border="1" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><span style="font-size: 18pt;">Readme</b></span>
|
||||
<br> <br>
|
||||
This C language project demonstrates the ESP826 wifi.
|
||||
This
|
||||
project interfaces the SSD1306 OLED display and ESP8266-01.
|
||||
<br>
|
||||
|
||||
|
||||
<br> <br>
|
||||
The following figure shows the interface to the MSPM0.</p>
|
||||
<p class="PictureWide"><span lang="en-US"><img src="ESP8266circuit.png"
|
||||
width="400" ></span></p>
|
||||
|
||||
<br> <br>
|
||||
Derived from Texas Instrument code
|
||||
<ul>
|
||||
<li>i2c_controller_rw_multibyte_fifo_poll_LP_MSPM0G3507_nortos_ticlang</li>
|
||||
<li>gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang</li></ul>
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<table class="MsoNormalTable"
|
||||
style="border: 3pt outset ; background: rgb(252, 243, 144) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 100%;"
|
||||
border="1" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><span style="font-size: 18pt;">Hardware Required</b></span>
|
||||
<br>
|
||||
<ul>
|
||||
<li>MSPM0G3507 LaunchPad™ Development Kit (LP-MSPM0G3507)</li>
|
||||
<li>ECE445M Robot board v7.1</li>
|
||||
<li>ESP8266</li>
|
||||
</ul>
|
||||
<b><span style="font-size: 18pt;">Pin assignments</b></span>
|
||||
<br>
|
||||
<ul>
|
||||
<li>ESP8266 1 URxD = PB17 = UART2 out of MSPM0, into ESP8266 115200 baud</li>
|
||||
<li>ESP8266 2 GPIO0 = +3.3V for normal operation (ground to flash)</li>
|
||||
<li>ESP8266 3 GPIO2 = PB19 = GPIO, high/float on startup, has internal pullup, can be used for I/O</li>
|
||||
<li>ESP8266 4 GND = Gnd = GND (70mA)</li>
|
||||
<li>ESP8266 5 UTxD = PB18 = UART out of ESP8266, UART2 into MSPM0 115200 baud</li>
|
||||
<li>ESP8266 6 Ch_PD = chip select, 10k resistor to 3.3V</li>
|
||||
<li>ESP8266 7 Reset = PA25 = MSPM0 GPIO output, can issue output low to cause hardware reset</li>
|
||||
<li>ESP8266 8 Vcc = regulated 3.3V supply with at least 70mA</li>
|
||||
<li>I2C SCL: PB2 is the SSD1306 SCL</li>
|
||||
<li>I2C SDA: PB3 is the SSD1306 SDA</li>
|
||||
<li>Input: PA18 is S2 positive logic switch, index 39 in IOMUX PINCM table</li>
|
||||
<li>Input: PB21 is S3 negative logic switch, index 48 in IOMUX PINCM table</li>
|
||||
</ul>
|
||||
<p>The first version of the Motor board (v7) uses UART1 on PA17 and PA18.</p>
|
||||
<b><span style="font-size: 18pt;">LaunchPad Jumpers</b></span>
|
||||
<br>
|
||||
<ul>
|
||||
<li>Remove J16 J17 J18: Disconnects light sensor from the microcontroller PA22 PA27 PA26</li>
|
||||
<li>J4: Connects PA0 to red LED</li>
|
||||
<li>J5: Connects PB22 to blue LED2</li>
|
||||
<li>J6: Connects PB26 to red LED2</li>
|
||||
<li>J7: Connects PB27 to green LED2</li>
|
||||
</ul>
|
||||
</p> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<p>
|
||||
Simplified BSD License (FreeBSD License)
|
||||
Copyright © 2026, Jonathan Valvano, All rights reserved.<br>
|
||||
<br>
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:<br>
|
||||
<ol>
|
||||
<li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li>
|
||||
<li>Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.</li></ol>
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br>
|
||||
<br>
|
||||
The views and conclusions contained in the software and documentation are
|
||||
those of the authors and should not be interpreted as representing official
|
||||
policies, either expressed or implied, of the FreeBSD Project.
|
||||
<br>
|
||||
</p>
|
||||
<p>For more information, see <a href="http://users.ece.utexas.edu/~valvano/">
|
||||
http://users.ece.utexas.edu/~valvano/</a>.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
67
ESP8266/mspm0g3507.cmd
Normal file
67
ESP8266/mspm0g3507.cmd
Normal file
@@ -0,0 +1,67 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*****************************************************************************/
|
||||
-uinterruptVectors
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (RX) : origin = 0x00000000, length = 0x00020000
|
||||
SRAM (RWX) : origin = 0x20200000, length = 0x00008000
|
||||
BCR_CONFIG (R) : origin = 0x41C00000, length = 0x00000080
|
||||
BSL_CONFIG (R) : origin = 0x41C00100, length = 0x00000080
|
||||
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.intvecs: > 0x00000000
|
||||
.text : palign(8) {} > FLASH
|
||||
.const : palign(8) {} > FLASH
|
||||
.cinit : palign(8) {} > FLASH
|
||||
.pinit : palign(8) {} > FLASH
|
||||
.rodata : palign(8) {} > FLASH
|
||||
.ARM.exidx : palign(8) {} > FLASH
|
||||
.init_array : palign(8) {} > FLASH
|
||||
.binit : palign(8) {} > FLASH
|
||||
.TI.ramfunc : load = FLASH, palign(8), run=SRAM, table(BINIT)
|
||||
|
||||
.vtable : > SRAM
|
||||
.args : > SRAM
|
||||
.data : > SRAM
|
||||
.bss : > SRAM
|
||||
.sysmem : > SRAM
|
||||
.stack : > SRAM (HIGH)
|
||||
|
||||
.BCRConfig : {} > BCR_CONFIG
|
||||
.BSLConfig : {} > BSL_CONFIG
|
||||
}
|
||||
102
ESP8266/targetConfigs/MSPM0G3507.ccxml
Normal file
102
ESP8266/targetConfigs/MSPM0G3507.ccxml
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
|
||||
|
||||
|
||||
|
||||
<configuration XML_version="1.2" id="configuration_0">
|
||||
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe">
|
||||
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds510cortexM0.xml" id="drivers" xml="tixds510cortexM0.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" href="drivers/tixds510sec_ap.xml" id="drivers" xml="tixds510sec_ap.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<property Type="choicelist" Value="1" id="The JTAG TCLK Frequency (MHz)">
|
||||
|
||||
|
||||
|
||||
|
||||
<choice Name="Fixed with user specified value" value="SPECIFIC">
|
||||
|
||||
|
||||
|
||||
|
||||
<property Type="stringfield" Value="1MHz" id="-- Enter a value from 100.0kHz to 2.5MHz"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</choice>
|
||||
|
||||
|
||||
|
||||
|
||||
</property>
|
||||
|
||||
|
||||
|
||||
|
||||
<property Type="choicelist" Value="2" id="SWD Mode Settings">
|
||||
|
||||
|
||||
|
||||
|
||||
<choice Name="SWD Mode - Aux COM port is target TDO pin" value="nothing"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</property>
|
||||
|
||||
|
||||
|
||||
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
|
||||
|
||||
|
||||
<instance XML_version="1.2" desc="MSPM0G3507" href="devices/MSPM0G3507.xml" id="MSPM0G3507" xml="MSPM0G3507.xml" xmlpath="devices"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</platform>
|
||||
|
||||
|
||||
|
||||
|
||||
</connection>
|
||||
|
||||
|
||||
|
||||
|
||||
</configuration>
|
||||
|
||||
|
||||
|
||||
|
||||
</configurations>
|
||||
9
ESP8266/targetConfigs/readme.txt
Normal file
9
ESP8266/targetConfigs/readme.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
|
||||
on the device and connection settings specified in your project on the Properties > General page.
|
||||
|
||||
Please note that in automatic target-configuration management, changes to the project's device and/or
|
||||
connection settings will either modify an existing or generate a new target-configuration file. Thus,
|
||||
if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
|
||||
you may create your own target-configuration file for this project and manage it manually. You can
|
||||
always switch back to automatic target-configuration management by checking the "Manage the project's
|
||||
target-configuration automatically" checkbox on the project's Properties > General page.
|
||||
200
ESP8266/ticlang/startup_mspm0g3507_ticlang.c
Normal file
200
ESP8266/ticlang/startup_mspm0g3507_ticlang.c
Normal file
@@ -0,0 +1,200 @@
|
||||
/*****************************************************************************
|
||||
Special MSPM0_ValvanoWare version with Hardfault handler implemented
|
||||
Jonathan Valvano 12/19/2024
|
||||
|
||||
Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ti/devices/msp/msp.h>
|
||||
|
||||
/* Linker variable that marks the top of the stack. */
|
||||
extern unsigned long __STACK_END;
|
||||
|
||||
/* External declaration for the reset handler that is to be called when the */
|
||||
/* processor is started */
|
||||
extern __NO_RETURN void __PROGRAM_START(void);
|
||||
|
||||
/* Forward declaration of the default fault handlers. */
|
||||
void Default_Handler (void) __attribute__((weak));
|
||||
void HardFault_Handler (void) __attribute__((weak));
|
||||
extern void Reset_Handler (void) __attribute__((weak));
|
||||
|
||||
/* Processor Exceptions */
|
||||
extern void NMI_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SVC_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void PendSV_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SysTick_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
|
||||
/* Device Specific Interrupt Handlers */
|
||||
extern void GROUP0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void GROUP1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG8_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART3_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void ADC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void ADC1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void CANFD0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void DAC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SPI0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SPI1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART2_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG6_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMA0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMA1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG7_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG12_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void I2C0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void I2C1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void AES_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void RTC_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void DMA_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
|
||||
|
||||
/* Interrupt vector table. Note that the proper constructs must be placed on this to */
|
||||
/* ensure that it ends up at physical address 0x0000.0000 or at the start of */
|
||||
/* the program if located at a start address other than 0. */
|
||||
#if defined (__ARM_ARCH) && (__ARM_ARCH != 0)
|
||||
void (* const interruptVectors[])(void) __attribute((used)) __attribute__((section (".intvecs"))) =
|
||||
#elif defined (__TI_ARM__)
|
||||
#pragma RETAIN(interruptVectors)
|
||||
#pragma DATA_SECTION(interruptVectors, ".intvecs")
|
||||
void (* const interruptVectors[])(void) =
|
||||
#else
|
||||
#error "Compiler not supported"
|
||||
#endif
|
||||
{
|
||||
(void (*)(void))((uint32_t)&__STACK_END),
|
||||
/* The initial stack pointer */
|
||||
Reset_Handler, /* The reset handler */
|
||||
NMI_Handler, /* The NMI handler */
|
||||
HardFault_Handler, /* The hard fault handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
SVC_Handler, /* SVCall handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
PendSV_Handler, /* The PendSV handler */
|
||||
SysTick_Handler, /* SysTick handler */
|
||||
GROUP0_IRQHandler, /* GROUP0 interrupt handler */
|
||||
GROUP1_IRQHandler, /* GROUP1 interrupt handler */
|
||||
TIMG8_IRQHandler, /* TIMG8 interrupt handler */
|
||||
UART3_IRQHandler, /* UART3 interrupt handler */
|
||||
ADC0_IRQHandler, /* ADC0 interrupt handler */
|
||||
ADC1_IRQHandler, /* ADC1 interrupt handler */
|
||||
CANFD0_IRQHandler, /* CANFD0 interrupt handler */
|
||||
DAC0_IRQHandler, /* DAC0 interrupt handler */
|
||||
0, /* Reserved */
|
||||
SPI0_IRQHandler, /* SPI0 interrupt handler */
|
||||
SPI1_IRQHandler, /* SPI1 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
UART1_IRQHandler, /* UART1 interrupt handler */
|
||||
UART2_IRQHandler, /* UART2 interrupt handler */
|
||||
UART0_IRQHandler, /* UART0 interrupt handler */
|
||||
TIMG0_IRQHandler, /* TIMG0 interrupt handler */
|
||||
TIMG6_IRQHandler, /* TIMG6 interrupt handler */
|
||||
TIMA0_IRQHandler, /* TIMA0 interrupt handler */
|
||||
TIMA1_IRQHandler, /* TIMA1 interrupt handler */
|
||||
TIMG7_IRQHandler, /* TIMG7 interrupt handler */
|
||||
TIMG12_IRQHandler, /* TIMG12 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
I2C0_IRQHandler, /* I2C0 interrupt handler */
|
||||
I2C1_IRQHandler, /* I2C1 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
AES_IRQHandler, /* AES interrupt handler */
|
||||
0, /* Reserved */
|
||||
RTC_IRQHandler, /* RTC interrupt handler */
|
||||
DMA_IRQHandler, /* DMA interrupt handler */
|
||||
|
||||
};
|
||||
|
||||
/* Forward declaration of the default fault handlers. */
|
||||
/* This is the code that gets called when the processor first starts execution */
|
||||
/* following a reset event. Only the absolutely necessary set is performed, */
|
||||
/* after which the application supplied entry() routine is called. Any fancy */
|
||||
/* actions (such as making decisions based on the reset cause register, and */
|
||||
/* resetting the bits in that register) are left solely in the hands of the */
|
||||
/* application. */
|
||||
void Reset_Handler(void)
|
||||
{
|
||||
/* Jump to the ticlang C Initialization Routine. */
|
||||
__asm(" .global _c_int00\n"
|
||||
" b _c_int00");
|
||||
}
|
||||
// fetch the PC that triggered the hard fault
|
||||
void HardFault_Handler(void) {
|
||||
__asm(" MOV R7,SP\n" // this code prevents a hardfault within the hardfault handler
|
||||
" LDR R4,=0x20200000\n" // start of RAM
|
||||
" CMP R7,R4\n"
|
||||
" BLO fault\n" // skip if bad SP
|
||||
" LDR R5,=0x20207FE0\n" // end of RAM-32
|
||||
" CMP R7,R5\n"
|
||||
" BHI fault\n" // skip if bad SP
|
||||
" LDR R6,[SP,#24]\n" // R6=previous PC
|
||||
"fault:");
|
||||
while (1) {
|
||||
// option 1) if SP points to valid RAM (0x20200000 to 0x20207FFC)
|
||||
// then R6 has PC that caused the fault
|
||||
// option 2) if SP is not 0x20200000 to 0x20207FFC then there was a stack overflow
|
||||
// if you're here, you had a hardfault
|
||||
}
|
||||
}
|
||||
/* This is the code that gets called when the processor receives an unexpected */
|
||||
/* interrupt. This simply enters an infinite loop, preserving the system state */
|
||||
/* for examination by a debugger. */
|
||||
void Default_Handler(void)
|
||||
{
|
||||
__asm(" MOV R7,SP\n"
|
||||
" LDR R4,=0x20200000\n"
|
||||
" CMP R7,R4\n"
|
||||
" BLO dfault\n" // bad SP
|
||||
" LDR R5,=0x20207FE0\n"
|
||||
" CMP R7,R5\n"
|
||||
" BHI fault\n" // bad SP
|
||||
" LDR R6,[SP,#24]\n" // previous PC
|
||||
"dfault:");
|
||||
/* Enter an infinite loop. */
|
||||
while(1){
|
||||
// R6 has value of the PC when the interrupt was triggered
|
||||
// you are here probably because you armed an interrupt, but mistyped the ISR name
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user