Commit 2633628a authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by rojer

Add MG_hello for CC3200; upload file form

Mg_hello is a simpler example for CC3200
File upload form is served on / if index.html does not exist
and always available on /upload

PUBLISHED_FROM=f844245b26febc4b952e7c52ee4519ddb542072d
parent e5ae1c2e
<?xml version="1.0" encoding="UTF-8" ?>
<?ccsproject version="1.0"?>
<projectOptions>
<deviceVariant value="Cortex M.CC3200"/>
<deviceFamily value="TMS470"/>
<deviceEndianness value="little"/>
<codegenToolVersion value="5.2.7"/>
<isElfFormat value="true"/>
<connection value="common/targetdb/connections/Stellaris_ICDI_Connection.xml"/>
<linkerCommandFile value="cc3200v1p32.cmd"/>
<rts value="libc.a"/>
<createSlaveProjects value=""/>
<templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
<isTargetManual value="false"/>
</projectOptions>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.2139411143">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.2139411143" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
</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.2139411143" name="Debug" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug" postbuildStep="" prebuildStep="">
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.2139411143." name="/" resourcePath="">
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.DebugToolchain.929985441" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.linkerDebug.273728804">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.258663176" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC3200"/>
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=cc3200v1p32.cmd"/>
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.324606890" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="5.2.7" valueType="string"/>
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.targetPlatformDebug.1595303251" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.targetPlatformDebug"/>
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.builderDebug.664577987" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.builderDebug"/>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.compilerDebug.239238133" name="ARM Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.compilerDebug">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEFINE.1334773591" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="MG_ENABLE_HTTP_STREAMING_MULTIPART=1"/>
<listOptionValue builtIn="false" value="SL_PLATFORM_MULTI_THREADED=1"/>
<listOptionValue builtIn="false" value="MG_FS_SLFS=1"/>
<listOptionValue builtIn="false" value="USE_FREERTOS"/>
<listOptionValue builtIn="false" value="cc3200"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.SILICON_VERSION.731249297" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.SILICON_VERSION.7M4" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.CODE_STATE.1786958507" name="Designate code state, 16-bit (thumb) or 32-bit (--code_state)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.CODE_STATE.16" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.ABI.1146878710" name="Application binary interface. [See 'General' page to edit] (--abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.ABI.eabi" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.FLOAT_SUPPORT.627547538" name="Specify floating point support (--float_support)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.FLOAT_SUPPORT" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.FLOAT_SUPPORT.vfplib" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.LITTLE_ENDIAN.1274157874" name="Little endian code [See 'General' page to edit] (--little_endian, -me)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.INCLUDE_PATH.1258458633" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink_extlib/provisioninglib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/oslib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/driverlib/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/example/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../Mongoose&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../..&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../../../..&quot;"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEBUGGING_MODEL.441599099" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WRAP.1882962798" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DISPLAY_ERROR_NUMBER.988736284" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WARNING.108721469" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__C_SRCS.1309113096" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__C_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__CPP_SRCS.637644727" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__CPP_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM_SRCS.1237578949" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM2_SRCS.1197212538" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM2_SRCS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.linkerDebug.273728804" name="ARM Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.linkerDebug">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.STACK_SIZE.1521937237" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.STACK_SIZE" value="0x100" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.HEAP_SIZE.384792165" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.HEAP_SIZE" value="0xB000" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.MAP_FILE.1759256980" name="Link information (map) listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.OUTPUT_FILE.223170305" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.LIBRARY.941567896" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../Mongoose/Debug/Mongoose.lib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink/ccs/OS/simplelink.a&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/driverlib/ccs/Release/driverlib.a&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/oslib/ccs/free_rtos/free_rtos.a&quot;"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.SEARCH_PATH.1487719636" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.SEARCH_PATH" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DISPLAY_ERROR_NUMBER.527313065" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DIAG_WRAP.470008330" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.XML_LINK_INFO.1060401668" name="Detailed link information data-base into &lt;file&gt; (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.XML_LINK_INFO" value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD_SRCS.703137823" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD2_SRCS.1106081123" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD2_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__GEN_CMDS.1215238770" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__GEN_CMDS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.hex.537525921" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.hex"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="Mongoose;com.ti.ccstudio.buildDefinitions.TMS470.Debug.491265557" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
</storageModule>
</cconfiguration>
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Release.2030896039">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.TMS470.Release.2030896039" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
</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.Release.2030896039" name="Release" parent="com.ti.ccstudio.buildDefinitions.TMS470.Release" postbuildStep="" prebuildStep="">
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Release.2030896039." name="/" resourcePath="">
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.ReleaseToolchain.203807862" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.ReleaseToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.linkerRelease.603260672">
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1946983343" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC3200"/>
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.5.0"/>
<listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=cc3200v1p32.cmd"/>
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.541661556" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="5.2.7" valueType="string"/>
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.targetPlatformRelease.1731528219" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.targetPlatformRelease"/>
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.builderRelease.1517621311" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.builderRelease"/>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.compilerRelease.1511107079" name="ARM Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.compilerRelease">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEFINE.709446512" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DEFINE" valueType="definedSymbols">
<listOptionValue builtIn="false" value="MG_ENABLE_HTTP_STREAMING_MULTIPART=1"/>
<listOptionValue builtIn="false" value="SL_PLATFORM_MULTI_THREADED=1"/>
<listOptionValue builtIn="false" value="MG_FS_SLFS=1"/>
<listOptionValue builtIn="false" value="USE_FREERTOS"/>
<listOptionValue builtIn="false" value="cc3200"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.SILICON_VERSION.25059129" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.SILICON_VERSION" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.SILICON_VERSION.7M4" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.CODE_STATE.1599303984" name="Designate code state, 16-bit (thumb) or 32-bit (--code_state)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.CODE_STATE" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.CODE_STATE.16" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.ABI.462249516" name="Application binary interface. [See 'General' page to edit] (--abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.ABI.eabi" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.FLOAT_SUPPORT.628710870" name="Specify floating point support (--float_support)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.FLOAT_SUPPORT" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.FLOAT_SUPPORT.vfplib" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WARNING.1313521771" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WARNING" valueType="stringList">
<listOptionValue builtIn="false" value="225"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DISPLAY_ERROR_NUMBER.1137425146" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WRAP.1217155594" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.INCLUDE_PATH.1877995914" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.INCLUDE_PATH" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink_extlib/provisioninglib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/oslib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/driverlib/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/example/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../Mongoose&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../..&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}/../../../..&quot;"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.LITTLE_ENDIAN.1313166043" name="Little endian code [See 'General' page to edit] (--little_endian, -me)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compilerID.LITTLE_ENDIAN" value="true" valueType="boolean"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__C_SRCS.884396305" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__C_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__CPP_SRCS.1552076672" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__CPP_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM_SRCS.1932242817" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM2_SRCS.564471106" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.compiler.inputType__ASM2_SRCS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.linkerRelease.603260672" name="ARM Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exe.linkerRelease">
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.STACK_SIZE.999455186" name="Set C system stack size (--stack_size, -stack)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.STACK_SIZE" value="0x512" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.HEAP_SIZE.1142745068" name="Heap size for C/C++ dynamic memory allocation (--heap_size, -heap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.HEAP_SIZE" value="0x0" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.OUTPUT_FILE.592894575" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.OUTPUT_FILE" value="&quot;${ProjName}.out&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.MAP_FILE.767606951" name="Link information (map) listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.MAP_FILE" value="&quot;${ProjName}.map&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.XML_LINK_INFO.88933399" name="Detailed link information data-base into &lt;file&gt; (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.XML_LINK_INFO" value="&quot;${ProjName}_linkInfo.xml&quot;" valueType="string"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DISPLAY_ERROR_NUMBER.670906651" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DIAG_WRAP.69171285" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.SEARCH_PATH.2058160037" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.SEARCH_PATH" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
</option>
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.LIBRARY.1140912133" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.linkerID.LIBRARY" valueType="libs">
<listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../Mongoose/Release/Mongoose.lib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/simplelink/ccs/OS/simplelink.a&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/driverlib/ccs/Release/driverlib.a&quot;"/>
<listOptionValue builtIn="false" value="&quot;${CC3200_SDK_ROOT}/oslib/ccs/free_rtos/free_rtos.a&quot;"/>
</option>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD_SRCS.852025912" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD2_SRCS.445406552" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__CMD2_SRCS"/>
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__GEN_CMDS.1688064227" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.exeLinker.inputType__GEN_CMDS"/>
</tool>
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_5.2.hex.1751465904" name="ARM Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.2.hex"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="Mongoose;com.ti.ccstudio.buildDefinitions.TMS470.Release.900958360" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
</storageModule>
</cconfiguration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="MG_hello.com.ti.ccstudio.buildDefinitions.TMS470.ProjectType.218900570" name="ARM" projectType="com.ti.ccstudio.buildDefinitions.TMS470.ProjectType"/>
</storageModule>
<storageModule moduleId="scannerConfiguration"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
<project-mappings>
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
</project-mappings>
</storageModule>
</cproject>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MG_hello</name>
<comment></comment>
<projects>
<project>Mongoose</project>
</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>gpio_if.c</name>
<type>1</type>
<locationURI>CC3200_SDK_ROOT/example/common/gpio_if.c</locationURI>
</link>
<link>
<name>network_common.c</name>
<type>1</type>
<locationURI>CC3200_SDK_ROOT/example/common/network_common.c</locationURI>
</link>
<link>
<name>startup_ccs.c</name>
<type>1</type>
<locationURI>CC3200_SDK_ROOT/example/common/startup_ccs.c</locationURI>
</link>
<link>
<name>wifi.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wifi.c</locationURI>
</link>
<link>
<name>wifi.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wifi.h</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>CC3200_SDK_ROOT</name>
<value>$%7BTI_PRODUCTS_DIR%7D/CC3200SDK_1.2.0/cc3200-sdk</value>
</variable>
</variableList>
</projectDescription>
//*****************************************************************************
// cc3200v1p32.cmd
//
// CCS linker configuration file for cc3200 ES 1.32.
//
// Copyright (C) 2014 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.
//
//*****************************************************************************
--retain=g_pfnVectors
//*****************************************************************************
// The following command line options are set as part of the CCS project.
// If you are building using the command line, or for some reason want to
// define them here, you can uncomment and modify these lines as needed.
// If you are using CCS for building, it is probably better to make any such
// modifications in your CCS project and leave this file alone.
//*****************************************************************************
//*****************************************************************************
// The starting address of the application. Normally the interrupt vectors
// must be located at the beginning of the application.
//*****************************************************************************
#define RAM_BASE 0x20004000
/* System memory map */
MEMORY
{
/* Application uses internal RAM for program and data */
SRAM_CODE (RWX) : origin = 0x20004000, length = 0x20000
SRAM_DATA (RWX) : origin = 0x20024000, length = 0x1C000
}
/* Section allocation in memory */
SECTIONS
{
.intvecs: > RAM_BASE
.init_array : > SRAM_CODE
.vtable : > SRAM_CODE
.text : > SRAM_CODE
.const : > SRAM_CODE
.cinit : > SRAM_CODE
.pinit : > SRAM_CODE
.data : > SRAM_DATA
.bss : > SRAM_DATA
.sysmem : > SRAM_DATA
.stack : > SRAM_DATA(HIGH)
}
/*
* Copyright (c) 2014-2016 Cesanta Software Limited
* All rights reserved
*/
/* Set up an AP or connect to existing WiFi network. */
#define WIFI_AP_SSID "Mongoose"
#define WIFI_AP_PASS ""
#define WIFI_AP_CHAN 6
// #define WIFI_STA_SSID "YourWiFi"
// #define WIFI_STA_PASS "YourPass"
#define MG_TASK_PRIORITY 3
#define MG_TASK_STACK_SIZE 8192
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inc/hw_types.h>
#include <inc/hw_ints.h>
#include <inc/hw_memmap.h>
#include <driverlib/gpio.h>
#include <driverlib/interrupt.h>
#include <driverlib/pin.h>
#include <driverlib/prcm.h>
#include <driverlib/rom.h>
#include <driverlib/rom_map.h>
#include <example/common/gpio_if.h>
/* Mongoose.h brings in SimpleLink support. Do not include simplelink.h. */
#include <mongoose.h>
#include <simplelink/include/device.h>
#include "wifi.h"
static const char *upload_form = "\
<h1>Upload file</h1> \
<form action='/upload' method='POST' enctype='multipart/form-data'> \
<input type='file' name='file'> \
<input type='submit' value='Upload'> \
</form>";
static struct mg_str upload_fname(struct mg_connection *nc,
struct mg_str fname) {
struct mg_str lfn;
lfn.len = fname.len + 3;
lfn.p = malloc(lfn.len);
memcpy((char *) lfn.p, "SL:", 3);
memcpy((char *) lfn.p + 3, fname.p, fname.len);
return lfn;
}
void mg_ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
LOG(LL_DEBUG, ("%p ev %d", nc, ev));
switch (ev) {
case MG_EV_ACCEPT: {
char addr[32];
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
LOG(LL_INFO, ("Connection %p from %s", nc, addr));
break;
}
case MG_EV_HTTP_REQUEST: {
char addr[32];
struct http_message *hm = (struct http_message *) ev_data;
cs_stat_t st;
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
LOG(LL_INFO,
("HTTP request from %s: %.*s %.*s", addr, (int) hm->method.len,
hm->method.p, (int) hm->uri.len, hm->uri.p));
if (mg_vcmp(&hm->uri, "/upload") == 0 ||
(mg_vcmp(&hm->uri, "/") == 0 &&
mg_stat("SL:index.html", &st) != 0)) {
mg_send(nc, upload_form, strlen(upload_form));
nc->flags |= MG_F_SEND_AND_CLOSE;
break;
}
struct mg_serve_http_opts opts;
memset(&opts, 0, sizeof(opts));
opts.document_root = "SL:";
mg_serve_http(nc, hm, opts);
break;
}
case MG_EV_CLOSE: {
LOG(LL_INFO, ("Connection %p closed", nc));
break;
}
case MG_EV_HTTP_PART_BEGIN:
case MG_EV_HTTP_PART_DATA:
case MG_EV_HTTP_PART_END: {
struct mg_http_multipart_part *mp =
(struct mg_http_multipart_part *) ev_data;
if (ev == MG_EV_HTTP_PART_BEGIN) {
LOG(LL_INFO, ("Begin file upload: %s", mp->file_name));
} else if (ev == MG_EV_HTTP_PART_END) {
LOG(LL_INFO, ("End file upload: %s", mp->file_name));
}
mg_file_upload_handler(nc, ev, ev_data, upload_fname);
}
}
}
static void mg_init(struct mg_mgr *mgr) {
LOG(LL_INFO, ("MG task running"));
sl_Start(0, 0, 0);
sl_fs_init();
#if defined(WIFI_STA_SSID)
if (!wifi_setup_sta(WIFI_STA_SSID, WIFI_STA_PASS)) {
LOG(LL_ERROR, ("Error setting up WiFi station"));
}
#elif defined(WIFI_AP_SSID)
if (!wifi_setup_ap(WIFI_AP_SSID, WIFI_AP_PASS, WIFI_AP_CHAN)) {
LOG(LL_ERROR, ("Error setting up WiFi AP"));
}
#else
#error WiFi not configured
#endif
/* We don't need SimpleLink's web server. */
sl_NetAppStop(SL_NET_APP_HTTP_SERVER_ID);
const char *err = "";
struct mg_bind_opts opts;
memset(&opts, 0, sizeof(opts));
opts.error_string = &err;
struct mg_connection *nc = mg_bind(mgr, "80", mg_ev_handler);
if (nc != NULL) {
mg_set_protocol_http_websocket(nc);
} else {
LOG(LL_ERROR, ("Failed to create listener: %s", err));
}
}
#ifndef USE_TIRTOS
/* Int vector table, defined in startup_gcc.c */
extern void (*const g_pfnVectors[])(void);
#endif
int main() {
#ifndef USE_TIRTOS
MAP_IntVTableBaseSet((unsigned long) &g_pfnVectors[0]);
#endif
MAP_IntEnable(FAULT_SYSTICK);
MAP_IntMasterEnable();
PRCMCC3200MCUInit();
setvbuf(stdout, NULL, _IOLBF, 0);
setvbuf(stderr, NULL, _IOLBF, 0);
cs_log_set_level(LL_INFO);
cs_log_set_file(stdout);
LOG(LL_INFO, ("Hello, world!"));
/* Set up the red LED. Note that amber and green cannot be used as they share
* pins with I2C. */
MAP_PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);
MAP_PinTypeGPIO(PIN_64, PIN_MODE_0, false);
MAP_GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT);
GPIO_IF_LedConfigure(LED1);
GPIO_IF_LedOn(MCU_RED_LED_GPIO);
if (VStartSimpleLinkSpawnTask(8) != 0) {
LOG(LL_ERROR, ("Failed to create SL task"));
}
if (!mg_start_task(MG_TASK_PRIORITY, MG_TASK_STACK_SIZE, mg_init)) {
LOG(LL_ERROR, ("Failed to create MG task"));
}
osi_start();
return 0;
}
/* These are FreeRTOS hooks for various life situations. */
void vApplicationMallocFailedHook() {
}
void vApplicationIdleHook() {
}
void vApplicationStackOverflowHook(OsiTaskHandle *th, signed char *tn) {
}
void SimpleLinkHttpServerCallback(SlHttpServerEvent_t *e,
SlHttpServerResponse_t *resp) {
}
void SimpleLinkSockEventHandler(SlSockEvent_t *e) {
}
void SimpleLinkGeneralEventHandler(SlDeviceEvent_t *e) {
LOG(LL_ERROR, ("status %d sender %d", e->EventData.deviceEvent.status,
e->EventData.deviceEvent.sender));
}
<?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="Stellaris In-Circuit Debug Interface" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface">
<instance XML_version="1.2" href="drivers/cc3200_cs_icepick.xml" id="drivers" xml="cc3200_cs_icepick.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/cc3200_cortex_m4.xml" id="drivers" xml="cc3200_cortex_m4.xml" xmlpath="drivers"/>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="CC3200" href="devices/CC3200.xml" id="CC3200" xml="CC3200.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>
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.
\ No newline at end of file
...@@ -29,22 +29,22 @@ ...@@ -29,22 +29,22 @@
<link> <link>
<name>bm222.c</name> <name>bm222.c</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/bm222.c</locationURI> <locationURI>PARENT-2-PROJECT_LOC/bm222.c</locationURI>
</link> </link>
<link> <link>
<name>bm222.h</name> <name>bm222.h</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/bm222.h</locationURI> <locationURI>PARENT-2-PROJECT_LOC/bm222.h</locationURI>
</link> </link>
<link> <link>
<name>data.c</name> <name>data.c</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/data.c</locationURI> <locationURI>PARENT-2-PROJECT_LOC/data.c</locationURI>
</link> </link>
<link> <link>
<name>data.h</name> <name>data.h</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/data.h</locationURI> <locationURI>PARENT-2-PROJECT_LOC/data.h</locationURI>
</link> </link>
<link> <link>
<name>gpio_if.c</name> <name>gpio_if.c</name>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<link> <link>
<name>main.c</name> <name>main.c</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/main.c</locationURI> <locationURI>PARENT-2-PROJECT_LOC/main.c</locationURI>
</link> </link>
<link> <link>
<name>network_common.c</name> <name>network_common.c</name>
...@@ -74,22 +74,22 @@ ...@@ -74,22 +74,22 @@
<link> <link>
<name>tmp006.c</name> <name>tmp006.c</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/tmp006.c</locationURI> <locationURI>PARENT-2-PROJECT_LOC/tmp006.c</locationURI>
</link> </link>
<link> <link>
<name>tmp006.h</name> <name>tmp006.h</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/tmp006.h</locationURI> <locationURI>PARENT-2-PROJECT_LOC/tmp006.h</locationURI>
</link> </link>
<link> <link>
<name>wifi.c</name> <name>wifi.c</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/wifi.c</locationURI> <locationURI>PARENT-2-PROJECT_LOC/wifi.c</locationURI>
</link> </link>
<link> <link>
<name>wifi.h</name> <name>wifi.h</name>
<type>1</type> <type>1</type>
<locationURI>copy_PARENT/wifi.h</locationURI> <locationURI>PARENT-2-PROJECT_LOC/wifi.h</locationURI>
</link> </link>
</linkedResources> </linkedResources>
<variableList> <variableList>
...@@ -97,9 +97,5 @@ ...@@ -97,9 +97,5 @@
<name>CC3200_SDK_ROOT</name> <name>CC3200_SDK_ROOT</name>
<value>$%7BTI_PRODUCTS_DIR%7D/CC3200SDK_1.2.0/cc3200-sdk</value> <value>$%7BTI_PRODUCTS_DIR%7D/CC3200SDK_1.2.0/cc3200-sdk</value>
</variable> </variable>
<variable>
<name>copy_PARENT</name>
<value>file:/Z:/cesanta/dev/mongoose/examples/CC3200</value>
</variable>
</variableList> </variableList>
</projectDescription> </projectDescription>
...@@ -8,29 +8,28 @@ ...@@ -8,29 +8,28 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
/* Driverlib includes */ #include <inc/hw_types.h>
#include "hw_types.h" #include <inc/hw_ints.h>
#include <inc/hw_memmap.h>
#include "hw_ints.h"
#include "hw_memmap.h" #include <driverlib/gpio.h>
#include "interrupt.h" #include <driverlib/interrupt.h>
#include "pin.h" #include <driverlib/pin.h>
#include "prcm.h" #include <driverlib/prcm.h>
#include "rom.h" #include <driverlib/rom.h>
#include "rom_map.h" #include <driverlib/rom_map.h>
#include "uart.h" #include <driverlib/uart.h>
#include "utils.h" #include <driverlib/utils.h>
#include "gpio.h" #include <example/common/gpio_if.h>
#include "gpio_if.h" #include <example/common/i2c_if.h>
#include "i2c_if.h"
/* Mongoose.h brings in SimpleLink support. Do not include simplelink.h. */
#include "mongoose.h" #include <mongoose.h>
#include "simplelink.h"
#include "device.h" #include <simplelink/include/device.h>
#include "data.h" #include "data.h"
#include "mongoose.h"
#include "wifi.h" #include "wifi.h"
/* Set up an AP or connect to existing WiFi network. */ /* Set up an AP or connect to existing WiFi network. */
...@@ -51,6 +50,13 @@ ...@@ -51,6 +50,13 @@
#define BM222_ADDR 0x18 #define BM222_ADDR 0x18
#define TMP006_ADDR 0x41 #define TMP006_ADDR 0x41
static const char *upload_form = "\
<h1>Upload file</h1> \
<form action='/upload' method='POST' enctype='multipart/form-data'> \
<input type='file' name='file'> \
<input type='submit' value='Upload'> \
</form>";
static struct mg_str upload_fname(struct mg_connection *nc, static struct mg_str upload_fname(struct mg_connection *nc,
struct mg_str fname) { struct mg_str fname) {
struct mg_str lfn; struct mg_str lfn;
...@@ -74,12 +80,20 @@ static void mg_ev_handler(struct mg_connection *nc, int ev, void *ev_data) { ...@@ -74,12 +80,20 @@ static void mg_ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
case MG_EV_HTTP_REQUEST: { case MG_EV_HTTP_REQUEST: {
char addr[32]; char addr[32];
struct http_message *hm = (struct http_message *) ev_data; struct http_message *hm = (struct http_message *) ev_data;
cs_stat_t st;
mg_conn_addr_to_str(nc, addr, sizeof(addr), MG_SOCK_STRINGIFY_REMOTE | mg_conn_addr_to_str(nc, addr, sizeof(addr), MG_SOCK_STRINGIFY_REMOTE |
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_IP |
MG_SOCK_STRINGIFY_PORT); MG_SOCK_STRINGIFY_PORT);
LOG(LL_INFO, LOG(LL_INFO,
("HTTP request from %s: %.*s %.*s", addr, (int) hm->method.len, ("HTTP request from %s: %.*s %.*s", addr, (int) hm->method.len,
hm->method.p, (int) hm->uri.len, hm->uri.p)); hm->method.p, (int) hm->uri.len, hm->uri.p));
if (mg_vcmp(&hm->uri, "/upload") == 0 ||
(mg_vcmp(&hm->uri, "/") == 0 &&
mg_stat("SL:index.html", &st) != 0)) {
mg_send(nc, upload_form, strlen(upload_form));
nc->flags |= MG_F_SEND_AND_CLOSE;
break;
}
struct mg_serve_http_opts opts; struct mg_serve_http_opts opts;
memset(&opts, 0, sizeof(opts)); memset(&opts, 0, sizeof(opts));
opts.document_root = "SL:"; opts.document_root = "SL:";
...@@ -195,7 +209,7 @@ int main() { ...@@ -195,7 +209,7 @@ int main() {
MAP_PinTypeGPIO(PIN_64, PIN_MODE_0, false); MAP_PinTypeGPIO(PIN_64, PIN_MODE_0, false);
MAP_GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT); MAP_GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT);
GPIO_IF_LedConfigure(LED1); GPIO_IF_LedConfigure(LED1);
GPIO_IF_LedToggle(MCU_RED_LED_GPIO); GPIO_IF_LedOn(MCU_RED_LED_GPIO);
if (VStartSimpleLinkSpawnTask(8) != 0) { if (VStartSimpleLinkSpawnTask(8) != 0) {
LOG(LL_ERROR, ("Failed to create SL task")); LOG(LL_ERROR, ("Failed to create SL task"));
......
#include "wifi.h" #include "wifi.h"
#include "mongoose.h" #include "mongoose.h"
#include "simplelink.h"
#include "wlan.h"
#include "gpio_if.h" #include <simplelink/include/wlan.h>
#include <inc/hw_types.h>
#include <driverlib/gpio.h>
#include <example/common/gpio_if.h>
void SimpleLinkWlanEventHandler(SlWlanEvent_t *e) { void SimpleLinkWlanEventHandler(SlWlanEvent_t *e) {
switch (e->Event) { switch (e->Event) {
...@@ -22,8 +25,6 @@ void SimpleLinkWlanEventHandler(SlWlanEvent_t *e) { ...@@ -22,8 +25,6 @@ void SimpleLinkWlanEventHandler(SlWlanEvent_t *e) {
} }
} }
int ip_acquired = 0;
void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *e) { void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *e) {
if (e->Event == SL_NETAPP_IPV4_IPACQUIRED_EVENT) { if (e->Event == SL_NETAPP_IPV4_IPACQUIRED_EVENT) {
SlIpV4AcquiredAsync_t *ed = &e->EventData.ipAcquiredV4; SlIpV4AcquiredAsync_t *ed = &e->EventData.ipAcquiredV4;
...@@ -31,7 +32,6 @@ void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *e) { ...@@ -31,7 +32,6 @@ void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *e) {
SL_IPV4_BYTE(ed->ip, 2), SL_IPV4_BYTE(ed->ip, 1), SL_IPV4_BYTE(ed->ip, 2), SL_IPV4_BYTE(ed->ip, 1),
SL_IPV4_BYTE(ed->ip, 0))); SL_IPV4_BYTE(ed->ip, 0)));
GPIO_IF_LedToggle(MCU_RED_LED_GPIO); GPIO_IF_LedToggle(MCU_RED_LED_GPIO);
ip_acquired = 1;
} else if (e->Event == SL_NETAPP_IP_LEASED_EVENT) { } else if (e->Event == SL_NETAPP_IP_LEASED_EVENT) {
LOG(LL_INFO, ("IP leased")); LOG(LL_INFO, ("IP leased"));
} else { } else {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#define WIFI_AP_SSID "Mongoose" #define WIFI_AP_SSID "Mongoose"
#define WIFI_AP_PASS "" #define WIFI_AP_PASS ""
#define WIFI_AP_CHAN 6 #define WIFI_AP_CHAN 6
//#define WIFI_STA_SSID "YourWiFi" // #define WIFI_STA_SSID "YourWiFi"
//#define WIFI_STA_PASS "YourPass" // #define WIFI_STA_PASS "YourPass"
#define MG_TASK_PRIORITY 3 #define MG_TASK_PRIORITY 3
#define MG_TASK_STACK_SIZE 8192 #define MG_TASK_STACK_SIZE 8192
...@@ -37,14 +37,25 @@ ...@@ -37,14 +37,25 @@
#include "wifi.h" #include "wifi.h"
void mg_ev_handler(struct mg_connection *nc, int ev, void *p) { static const char *upload_form = "\
static const char *reply_fmt = <h1>Upload file</h1> \
"HTTP/1.0 200 OK\r\n" <form action='/upload' method='POST' enctype='multipart/form-data'> \
"Connection: close\r\n" <input type='file' name='file'> \
"Content-Type: text/plain\r\n" <input type='submit' value='Upload'> \
"\r\n" </form>";
"Hello %s\n";
LOG(LL_DEBUG, ("conn %p ev %d", nc, ev)); static struct mg_str upload_fname(struct mg_connection *nc,
struct mg_str fname) {
struct mg_str lfn;
lfn.len = fname.len + 3;
lfn.p = malloc(lfn.len);
memcpy((char *) lfn.p, "SL:", 3);
memcpy((char *) lfn.p + 3, fname.p, fname.len);
return lfn;
}
void mg_ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
LOG(LL_DEBUG, ("%p ev %d", nc, ev));
switch (ev) { switch (ev) {
case MG_EV_ACCEPT: { case MG_EV_ACCEPT: {
...@@ -56,20 +67,42 @@ void mg_ev_handler(struct mg_connection *nc, int ev, void *p) { ...@@ -56,20 +67,42 @@ void mg_ev_handler(struct mg_connection *nc, int ev, void *p) {
} }
case MG_EV_HTTP_REQUEST: { case MG_EV_HTTP_REQUEST: {
char addr[32]; char addr[32];
struct http_message *hm = (struct http_message *) p; struct http_message *hm = (struct http_message *) ev_data;
cs_stat_t st;
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr), mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT); MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
LOG(LL_INFO, LOG(LL_INFO,
("HTTP request from %s: %.*s %.*s", addr, (int) hm->method.len, ("HTTP request from %s: %.*s %.*s", addr, (int) hm->method.len,
hm->method.p, (int) hm->uri.len, hm->uri.p)); hm->method.p, (int) hm->uri.len, hm->uri.p));
mg_printf(nc, reply_fmt, addr); if (mg_vcmp(&hm->uri, "/upload") == 0 ||
nc->flags |= MG_F_SEND_AND_CLOSE; (mg_vcmp(&hm->uri, "/") == 0 &&
mg_stat("SL:index.html", &st) != 0)) {
mg_send(nc, upload_form, strlen(upload_form));
nc->flags |= MG_F_SEND_AND_CLOSE;
break;
}
struct mg_serve_http_opts opts;
memset(&opts, 0, sizeof(opts));
opts.document_root = "SL:";
mg_serve_http(nc, hm, opts);
break; break;
} }
case MG_EV_CLOSE: { case MG_EV_CLOSE: {
LOG(LL_INFO, ("Connection %p closed", nc)); LOG(LL_INFO, ("Connection %p closed", nc));
break; break;
} }
case MG_EV_HTTP_PART_BEGIN:
case MG_EV_HTTP_PART_DATA:
case MG_EV_HTTP_PART_END: {
struct mg_http_multipart_part *mp =
(struct mg_http_multipart_part *) ev_data;
if (ev == MG_EV_HTTP_PART_BEGIN) {
LOG(LL_INFO, ("Begin file upload: %s", mp->file_name));
} else if (ev == MG_EV_HTTP_PART_END) {
LOG(LL_INFO, ("End file upload: %s", mp->file_name));
}
mg_file_upload_handler(nc, ev, ev_data, upload_fname);
}
} }
} }
...@@ -134,8 +167,6 @@ int main(void) { ...@@ -134,8 +167,6 @@ int main(void) {
return 1; return 1;
} }
LOG(LL_INFO, ("OK"));
osi_start(); osi_start();
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment