move everything to git
This commit is contained in:
19
pingpong_test/.ccsproject
Normal file
19
pingpong_test/.ccsproject
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?ccsproject version="1.0"?>
|
||||
<projectOptions>
|
||||
<ccsVersion value="11.2.0"/>
|
||||
<deviceVariant value="Cortex M.CC3220S"/>
|
||||
<deviceFamily value="TMS470"/>
|
||||
<deviceEndianness value="little"/>
|
||||
<codegenToolVersion value="20.2.6.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=gpiointerrupt_CC3220S_LAUNCHXL_nortos_ccs.projectspec.gpiointerrupt_CC3220S_LAUNCHXL_nortos_ccs,buildProfile=release,isHybrid=true"/>
|
||||
<origin value="C:\ti\simplelink_cc32xx_sdk_5_30_00_08\examples\nortos\CC3220S_LAUNCHXL\drivers\gpiointerrupt\ccs\gpiointerrupt_CC3220S_LAUNCHXL_nortos_ccs.projectspec"/>
|
||||
<filesToOpen value=""/>
|
||||
<isTargetManual value="false"/>
|
||||
</projectOptions>
|
||||
132
pingpong_test/.cproject
Normal file
132
pingpong_test/.cproject
Normal file
@@ -0,0 +1,132 @@
|
||||
<?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.586190575">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.586190575" 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="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.SysConfigErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.LinkErrorParser" 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.586190575" name="Debug" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.586190575." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.DebugToolchain.1325078178" name="TI Build Tools" secondaryOutputs="com.ti.ccstudio.buildDefinitions.customPostBuildTool.outputType.533589697" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.linkerDebug.700921212">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.2040023518" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=Cortex M.CC3220S"/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_CORE_ID="/>
|
||||
<listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue builtIn="false" value="CCS_MBS_VERSION=6.1.3"/>
|
||||
<listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY="/>
|
||||
<listOptionValue builtIn="false" value="OUTPUT_TYPE=executable"/>
|
||||
<listOptionValue builtIn="false" value="PRODUCTS=com.ti.SIMPLELINK_CC32XX_SDK:5.30.0.08;sysconfig:1.10.0;"/>
|
||||
<listOptionValue builtIn="false" value="PRODUCT_MACRO_IMPORTS={"com.ti.SIMPLELINK_CC32XX_SDK":["${COM_TI_SIMPLELINK_CC32XX_SDK_INCLUDE_PATH}","${COM_TI_SIMPLELINK_CC32XX_SDK_LIBRARY_PATH}","${COM_TI_SIMPLELINK_CC32XX_SDK_LIBRARIES}","${COM_TI_SIMPLELINK_CC32XX_SDK_SYMBOLS}","${COM_TI_SIMPLELINK_CC32XX_SDK_SYSCONFIG_MANIFEST}"],"sysconfig":["${SYSCONFIG_TOOL_INCLUDE_PATH}","${SYSCONFIG_TOOL_LIBRARY_PATH}","${SYSCONFIG_TOOL_LIBRARIES}","${SYSCONFIG_TOOL_SYMBOLS}","${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"]}"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.2107238843" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="20.2.6.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.targetPlatformDebug.1297729955" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.builderDebug.485294621" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.compilerDebug.80200869" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DEBUGGING_MODEL.626930291" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DEBUGGING_MODEL" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DIAG_WARNING.1680070430" name="Treat diagnostic <id> as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DIAG_WARNING" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="225"/>
|
||||
<listOptionValue builtIn="false" value="255"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DISPLAY_ERROR_NUMBER.676286258" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DISPLAY_ERROR_NUMBER" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DIAG_WRAP.1411470560" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DIAG_WRAP" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.LITTLE_ENDIAN.1216214849" name="Little endian code [See 'General' page to edit] (--little_endian, -me)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.LITTLE_ENDIAN" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.INCLUDE_PATH.1621623030" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_INCLUDE_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_INCLUDE_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_ROOT}"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_ROOT}/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/source"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/kernel/nortos"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/kernel/nortos/posix"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/include"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DEFINE.215617361" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
<listOptionValue builtIn="false" value="DeviceFamily_CC3220"/>
|
||||
<listOptionValue builtIn="false" value="NORTOS_SUPPORT"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.OPT_LEVEL.1379703871" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.OPT_LEVEL" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.OPT_LEVEL.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.SILICON_VERSION.693793346" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.SILICON_VERSION" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.SILICON_VERSION.7M4" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.CODE_STATE.1127451469" name="Designate code state, 16-bit (thumb) or 32-bit (--code_state)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.CODE_STATE" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.CODE_STATE.16" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.GEN_FUNC_SUBSECTIONS.1861421009" name="Place each function in a separate subsection (--gen_func_subsections, -ms)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.GEN_FUNC_SUBSECTIONS" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.GEN_FUNC_SUBSECTIONS.on" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.FLOAT_SUPPORT.1832881518" name="Specify floating point support (--float_support)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.FLOAT_SUPPORT" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compilerID.FLOAT_SUPPORT.vfplib" valueType="enumerated"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__C_SRCS.1181779991" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__C_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__CPP_SRCS.1931612073" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__CPP_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__ASM_SRCS.1362911258" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__ASM_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__ASM2_SRCS.1143723269" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.compiler.inputType__ASM2_SRCS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.linkerDebug.700921212" name="Arm Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.OUTPUT_FILE.965159000" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.OUTPUT_FILE" useByScannerDiscovery="false" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.MAP_FILE.2043461592" name="Link information (map) listed into <file> (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.MAP_FILE" useByScannerDiscovery="false" value="${ProjName}.map" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.XML_LINK_INFO.250842866" name="Detailed link information data-base into <file> (--xml_link_info, -xml_link_info)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.XML_LINK_INFO" useByScannerDiscovery="false" value="${ProjName}_linkInfo.xml" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DISPLAY_ERROR_NUMBER.311006431" name="Emit diagnostic identifier numbers (--display_error_number)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DISPLAY_ERROR_NUMBER" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DIAG_WRAP.1975201451" name="Wrap diagnostic messages (--diag_wrap)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DIAG_WRAP" useByScannerDiscovery="false" value="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.REREAD_LIBS.904873299" name="Reread libraries; resolve backward references (--reread_libs, -x)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.REREAD_LIBS" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.SEARCH_PATH.1915102179" name="Add <dir> to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_LIBRARY_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_LIBRARY_PATH}"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/source"/>
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/kernel/nortos"/>
|
||||
<listOptionValue builtIn="false" value="${PROJECT_BUILD_DIR}/syscfg"/>
|
||||
<listOptionValue builtIn="false" value="${CG_TOOL_ROOT}/lib"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.LIBRARY.607458770" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.LIBRARY" useByScannerDiscovery="false" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_LIBRARIES}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_LIBRARIES}"/>
|
||||
<listOptionValue builtIn="false" value="ti_utils_build_linker.cmd.genlibs"/>
|
||||
<listOptionValue builtIn="false" value="ti/devices/cc32xx/driverlib/ccs/Release/driverlib.a"/>
|
||||
<listOptionValue builtIn="false" value="libc.a"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DIAG_SUPPRESS.771120668" name="Suppress diagnostic <id> (--diag_suppress)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.DIAG_SUPPRESS" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="10063"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.ENTRY_POINT.648711257" name="Specify program entry point for the output module (--entry_point, -e)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.linkerID.ENTRY_POINT" useByScannerDiscovery="false" value="resetISR" valueType="string"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exeLinker.inputType__CMD_SRCS.876833866" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exeLinker.inputType__CMD_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exeLinker.inputType__CMD2_SRCS.2011059886" name="Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exeLinker.inputType__CMD2_SRCS"/>
|
||||
<inputType id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exeLinker.inputType__GEN_CMDS.2084984931" name="Generated Linker Command Files" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.exeLinker.inputType__GEN_CMDS"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_20.2.hex.666086022" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_20.2.hex"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.sysConfig.1040073974" name="SysConfig" superClass="com.ti.ccstudio.buildDefinitions.sysConfig">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS.738833800" name="Root system config meta data file in a product or SDK (-s, --product)" superClass="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${COM_TI_SIMPLELINK_CC32XX_SDK_SYSCONFIG_MANIFEST}"/>
|
||||
<listOptionValue builtIn="false" value="${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool command=""${CG_TOOL_ROOT}/bin/armobjcopy"" id="com.ti.ccstudio.buildDefinitions.customPostBuildTool.631485411" name="Arm ObjCopy" superClass="com.ti.ccstudio.buildDefinitions.customPostBuildTool">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.customPostBuildTool.OTHER_FLAGS.1993122963" name="Other flags" superClass="com.ti.ccstudio.buildDefinitions.customPostBuildTool.OTHER_FLAGS" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=" -O binary --only-section .text --only-section .const --only-section .cinit --only-section .resetVecs "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.customPostBuildTool.INPUT_FILES.1706271361" name="Input files (absolute paths, or paths relative to build directory)" superClass="com.ti.ccstudio.buildDefinitions.customPostBuildTool.INPUT_FILES" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${BuildArtifactFileName}"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.ti.ccstudio.buildDefinitions.customPostBuildTool.OUTPUT_FILES.1845341057" name="Output files (paths relative to build directory)" superClass="com.ti.ccstudio.buildDefinitions.customPostBuildTool.OUTPUT_FILES" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="${BuildArtifactFileBaseName}.bin"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.customPostBuildTool.TOOL_ENABLE.21939022" name="Enable tool" superClass="com.ti.ccstudio.buildDefinitions.customPostBuildTool.TOOL_ENABLE" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<outputType buildVariable="CUSTOM_TOOL_OUTPUTS_533589697" id="com.ti.ccstudio.buildDefinitions.customPostBuildTool.outputType.533589697" name="Post-build Tool Output Files" superClass="com.ti.ccstudio.buildDefinitions.customPostBuildTool.outputType"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</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="gpiointerrupt_CC3220S_LAUNCHXL_nortos_ccs.com.ti.ccstudio.buildDefinitions.TMS470.ProjectType.658181645" name="TMS470" projectType="com.ti.ccstudio.buildDefinitions.TMS470.ProjectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
2
pingpong_test/.gitignore
vendored
Normal file
2
pingpong_test/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/MCU+Image/
|
||||
/Debug/
|
||||
16
pingpong_test/.launches/pingpong_5_30.launch
Normal file
16
pingpong_test/.launches/pingpong_5_30.launch
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging">
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <PropertyValues> <property id="ConnectOnStartup"> <curValue>1</curValue> </property> <property id="EnableInstalledBreakpoint"> <curValue>1</curValue> </property> <property id="IgnoreSoftLaunchFailures"> <curValue>0</curValue> </property> </PropertyValues> "/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="${build_artifact:pingpong_5_30}"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="pingpong_5_30"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:pingpong_5_30}"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="${build_artifact:pingpong_5_30}"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/pingpong_5_30"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="com.ti.ccstudio.debug.sourceLocator"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;default/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;cpuSpecificContainer cpuName=&quot;Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0&quot;&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;project name=&amp;quot;pingpong_5_30&amp;quot; referencedProjects=&amp;quot;true&amp;quot;/&amp;gt;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.project&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;default/&amp;gt;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;productsSource/&amp;gt;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.products.source&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;deviceLibrarySource/&amp;gt;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.device.library.source&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;librarySource/&amp;gt;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.library.source&quot;/&gt;&#10;&lt;/cpuSpecificContainer&gt;&#10;" typeId="com.ti.ccstudio.debug.containerType.cpu.specific"/> </sourceContainers> </sourceLookupDirector> "/>
|
||||
</launchConfiguration>
|
||||
19
pingpong_test/.launches/pingpong_test.launch
Normal file
19
pingpong_test/.launches/pingpong_test.launch
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging">
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <PropertyValues> <property id="ConnectOnStartup"> <curValue>1</curValue> </property> <property id="EnableInstalledBreakpoint"> <curValue>1</curValue> </property> <property id="IgnoreSoftLaunchFailures"> <curValue>0</curValue> </property> </PropertyValues> "/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_LOAD_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/CS_DAP" value="ALL"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_LOAD_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="ALL"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_LOAD_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/IcePick_C" value="ALL"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="${build_artifact:pingpong_test}"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="pingpong_test"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:pingpong_test}"/>
|
||||
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.CC3220S.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0" value="${build_artifact:pingpong_test}"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/pingpong_test"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="com.ti.ccstudio.debug.sourceLocator"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;default/&gt;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;cpuSpecificContainer cpuName=&quot;Texas Instruments XDS110 USB Debug Probe/Cortex_M4_0&quot;&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;project name=&amp;quot;pingpong_test&amp;quot; referencedProjects=&amp;quot;true&amp;quot;/&amp;gt;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.project&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;default/&amp;gt;&amp;#10;&quot; childType=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;productsSource/&amp;gt;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.products.source&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;deviceLibrarySource/&amp;gt;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.device.library.source&quot;/&gt;&#10; &lt;childContainerEntry childMemento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#10;&amp;lt;librarySource/&amp;gt;&amp;#10;&quot; childType=&quot;com.ti.ccstudio.debug.containerType.library.source&quot;/&gt;&#10;&lt;/cpuSpecificContainer&gt;&#10;" typeId="com.ti.ccstudio.debug.containerType.cpu.specific"/> </sourceContainers> </sourceLookupDirector> "/>
|
||||
</launchConfiguration>
|
||||
34
pingpong_test/.project
Normal file
34
pingpong_test/.project
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>pingpong_test</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>Board.html</name>
|
||||
<type>1</type>
|
||||
<locationURI>COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR/source/ti/boards/CC3220S_LAUNCHXL/Board.html</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
3
pingpong_test/.settings/org.eclipse.cdt.codan.core.prefs
Normal file
3
pingpong_test/.settings/org.eclipse.cdt.codan.core.prefs
Normal file
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
inEditor=false
|
||||
onBuild=false
|
||||
2
pingpong_test/.settings/org.eclipse.cdt.debug.core.prefs
Normal file
2
pingpong_test/.settings/org.eclipse.cdt.debug.core.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
|
||||
6
pingpong_test/.settings/org.eclipse.core.resources.prefs
Normal file
6
pingpong_test/.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//Debug/makefile=UTF-8
|
||||
encoding//Debug/objects.mk=UTF-8
|
||||
encoding//Debug/sources.mk=UTF-8
|
||||
encoding//Debug/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/subdir_vars.mk=UTF-8
|
||||
79
pingpong_test/cc32xxs_nortos.cmd
Normal file
79
pingpong_test/cc32xxs_nortos.cmd
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, Texas Instruments Incorporated
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
--stack_size=0x1000
|
||||
--heap_size=0x8000
|
||||
--entry_point=resetISR
|
||||
--diag_suppress=10063 /* suppress warning about non _c_int00 entry point */
|
||||
|
||||
/*
|
||||
* The starting address of the application. Normally the interrupt vectors
|
||||
* must be located at the beginning of the application.
|
||||
*/
|
||||
#define SRAM_BASE 0x20004000
|
||||
#define SRAM2_BASE 0x20000000
|
||||
|
||||
MEMORY
|
||||
{
|
||||
SRAM (RWX) : origin = 0x20004000, length = 0x00040000 - 0x4000
|
||||
SRAM2 (RWX) : origin = 0x20000000, length = 0x4000
|
||||
/* Explicitly placed off target for the storage of logging data.
|
||||
* The data placed here is NOT loaded onto the target device.
|
||||
* This is part of 1 GB of external memory from 0x60000000 - 0x9FFFFFFF.
|
||||
* ARM memory map can be found here:
|
||||
* https://developer.arm.com/documentation/ddi0337/e/memory-map/about-the-memory-map
|
||||
*/
|
||||
LOG_DATA (R) : origin = 0x90000000, length = 0x40000
|
||||
}
|
||||
|
||||
/* Section allocation in memory */
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : > SRAM
|
||||
.TI.ramfunc : > SRAM
|
||||
.const : > SRAM
|
||||
.rodata : > SRAM
|
||||
.cinit : > SRAM
|
||||
.pinit : > SRAM
|
||||
.init_array : > SRAM
|
||||
|
||||
.data : > SRAM
|
||||
.bss : > SRAM
|
||||
.sysmem : > SRAM
|
||||
.stack : > SRAM2(HIGH)
|
||||
|
||||
.resetVecs : > SRAM_BASE
|
||||
.ramVecs : > SRAM2_BASE, type=NOLOAD
|
||||
|
||||
.log_data : > LOG_DATA, type = COPY
|
||||
}
|
||||
206
pingpong_test/io.c
Normal file
206
pingpong_test/io.c
Normal file
@@ -0,0 +1,206 @@
|
||||
// Input/output support functions for pingpong
|
||||
|
||||
#include "io.h"
|
||||
#include "ti_drivers_config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// Driver header files
|
||||
#include <ti/drivers/GPIO.h>
|
||||
#include <ti/drivers/UART.h>
|
||||
#include <ti/drivers/Timer.h>
|
||||
#include <ti/drivers/PWM.h>
|
||||
|
||||
// tick variable is set to true every sample time.
|
||||
volatile bool tick = false;
|
||||
// distance variable contains the measured distance in mm.
|
||||
volatile int32_t distance;
|
||||
// Kc variable can be set by typing a float value to the terminal (which is connected to the UART).
|
||||
//volatile float Kc = 0;
|
||||
|
||||
static Timer_Handle timer1;
|
||||
|
||||
static void gpioButtonFxn0(uint_least8_t index)
|
||||
{
|
||||
int32_t start = Timer_getCount(timer1); // Start time of timer1.
|
||||
while(GPIO_read(Board_ECHO)); // Wait until ECHO becomes low. Time of pulse equals distance measured.
|
||||
int32_t stop = Timer_getCount(timer1); // Stop time of timer1.
|
||||
if (start < stop)
|
||||
{
|
||||
distance = (stop - start) / 450; // Calculates distances in mm.
|
||||
}
|
||||
}
|
||||
|
||||
void initPort()
|
||||
{
|
||||
GPIO_init();
|
||||
GPIO_setConfig(Board_TRIGGER, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_HIGH);
|
||||
GPIO_setConfig(Board_ECHO, GPIO_CFG_IN_PD | GPIO_CFG_IN_INT_RISING);
|
||||
GPIO_setCallback(Board_ECHO, gpioButtonFxn0);
|
||||
GPIO_enableInt(Board_ECHO);
|
||||
}
|
||||
|
||||
static UART_Handle uart;
|
||||
static char readbuffer[128] = "";
|
||||
static volatile bool UART_is_read = false;
|
||||
|
||||
void UART_read_callback(UART_Handle handle, void *buf, size_t count)
|
||||
{
|
||||
float f;
|
||||
int res = sscanf(buf, "%f", &f);
|
||||
//if (res == 1)
|
||||
{
|
||||
// Kc = f;
|
||||
}
|
||||
//sendStringUART("Kc = ");
|
||||
//sendFloatUART(Kc);
|
||||
//sendStringUART("Kc = ");
|
||||
//UART_is_read = true;
|
||||
}
|
||||
|
||||
bool initUART(void) {
|
||||
UART_init();
|
||||
UART_Params uartParams;
|
||||
UART_Params_init(&uartParams);
|
||||
uartParams.writeDataMode = UART_DATA_TEXT;
|
||||
uartParams.readDataMode = UART_DATA_TEXT;
|
||||
uartParams.readReturnMode = UART_RETURN_NEWLINE;
|
||||
uartParams.readEcho = UART_ECHO_ON;
|
||||
uartParams.readMode = UART_MODE_CALLBACK;
|
||||
uartParams.baudRate = 115200;
|
||||
uartParams.readCallback = UART_read_callback;
|
||||
uart = UART_open(CONFIG_UART_0, &uartParams);
|
||||
if (uart != NULL)
|
||||
{
|
||||
sendStringUART("Kc = ");
|
||||
UART_read(uart, readbuffer, 128);
|
||||
}
|
||||
return uart != NULL;
|
||||
}
|
||||
|
||||
static void timerTick(Timer_Handle handle, int_fast16_t status)
|
||||
{
|
||||
tick = true;
|
||||
if (UART_is_read)
|
||||
{
|
||||
UART_is_read = false;
|
||||
UART_read(uart, readbuffer, 128);
|
||||
}
|
||||
}
|
||||
|
||||
bool initTimer(uint32_t sampleFrequency)
|
||||
{
|
||||
Timer_init();
|
||||
|
||||
Timer_Handle timer0;
|
||||
Timer_Params params;
|
||||
Timer_Params_init(¶ms);
|
||||
params.periodUnits = Timer_PERIOD_HZ;
|
||||
params.period = sampleFrequency;
|
||||
params.timerMode = Timer_CONTINUOUS_CALLBACK;
|
||||
params.timerCallback = timerTick;
|
||||
timer0 = Timer_open(CONFIG_TIMER_0, ¶ms);
|
||||
if (timer0 == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int32_t status = Timer_start(timer0);
|
||||
if (status == Timer_STATUS_ERROR)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Timer_Params tparams;
|
||||
Timer_Params_init(&tparams); //Free running timer for measuring length of the echo pulse.
|
||||
params.periodUnits = Timer_PERIOD_US;
|
||||
tparams.period = 0xFFFFFFFF;
|
||||
tparams.timerMode = Timer_FREE_RUNNING;
|
||||
timer1 = Timer_open(CONFIG_TIMER_1, &tparams);
|
||||
if(Timer_start(timer1) == Timer_STATUS_ERROR)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static PWM_Handle pwm0;
|
||||
|
||||
bool initPWM(void)
|
||||
{
|
||||
PWM_Params pwmParams;
|
||||
|
||||
PWM_init();
|
||||
|
||||
// PWM params init
|
||||
PWM_Params_init(&pwmParams);
|
||||
pwmParams.dutyUnits = PWM_DUTY_US;
|
||||
// PWM duty cycle = 0
|
||||
pwmParams.dutyValue = 0;
|
||||
pwmParams.periodUnits = PWM_PERIOD_US;
|
||||
// PWM frequency = 1 / 1000 us = 1 / 1 ms = 1 kHz.
|
||||
pwmParams.periodValue = 1000;
|
||||
pwmParams.idleLevel = PWM_IDLE_LOW;
|
||||
|
||||
/* Open PWM0 */
|
||||
pwm0 = PWM_open(CONFIG_PWM_0, &pwmParams);
|
||||
|
||||
if (!pwm0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
PWM_start(pwm0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool setPWM(uint16_t dutyCycle)
|
||||
{
|
||||
if (PWM_setDuty(pwm0, dutyCycle) < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void trigger()
|
||||
{
|
||||
GPIO_write(Board_TRIGGER, 1);
|
||||
usleep(10);
|
||||
GPIO_write(Board_TRIGGER, 0);
|
||||
}
|
||||
|
||||
void sendStringUART(char *s)
|
||||
{
|
||||
UART_writePolling(uart, s, strlen(s));
|
||||
}
|
||||
|
||||
void sendIntUART(int i)
|
||||
{
|
||||
char buffer[14];
|
||||
int res = sprintf(buffer, "%d\n", i);
|
||||
if (res > 0)
|
||||
{
|
||||
UART_writePolling(uart, buffer, res);
|
||||
}
|
||||
}
|
||||
|
||||
void sendIntIntUART(int i1, int i2)
|
||||
{
|
||||
char buffer[28];
|
||||
int res = sprintf(buffer, "%d, %d\n", i1, i2);
|
||||
if (res > 0)
|
||||
{
|
||||
UART_writePolling(uart, buffer, res);
|
||||
}
|
||||
}
|
||||
|
||||
void sendFloatUART(float f)
|
||||
{
|
||||
char buffer[100];
|
||||
int res = sprintf(buffer, "%f\n", f);
|
||||
if (res > 0)
|
||||
{
|
||||
UART_writePolling(uart, buffer, res);
|
||||
}
|
||||
}
|
||||
|
||||
31
pingpong_test/io.h
Normal file
31
pingpong_test/io.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef IO_H_
|
||||
#define IO_H_
|
||||
|
||||
// Input/output support functions for pingpong.
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// tick variable is set to true every sample time.
|
||||
extern volatile bool tick;
|
||||
// distance variable contains the measured distance in mm.
|
||||
extern volatile int32_t distance;
|
||||
// Kc variable can be set by typing a float value to the terminal (which is connected to the UART).
|
||||
//extern volatile float Kc;
|
||||
|
||||
bool initUART(void);
|
||||
bool initTimer(uint32_t sampleFrequency);
|
||||
bool initPWM(void);
|
||||
void initPort();
|
||||
|
||||
// setPWM sets dutyCycle in 1000 steps (min = 0, max = 1000)
|
||||
bool setPWM(uint16_t dutyCycle);
|
||||
// trigger creates a 10 usec trigger pulse for the ultrasonic sensor.
|
||||
void trigger();
|
||||
|
||||
void sendStringUART(char *s);
|
||||
void sendIntUART(int i);
|
||||
void sendIntIntUART(int i1, int i2);
|
||||
void sendFloatUART(float f);
|
||||
|
||||
#endif
|
||||
28
pingpong_test/main_nortos.c
Normal file
28
pingpong_test/main_nortos.c
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
/*
|
||||
* ======== main_nortos.c ========
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <NoRTOS.h>
|
||||
|
||||
#include <ti/drivers/Board.h>
|
||||
|
||||
extern void *mainThread(void *arg0);
|
||||
|
||||
/*
|
||||
* ======== main ========
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
Board_init();
|
||||
|
||||
/* Start NoRTOS */
|
||||
NoRTOS_start();
|
||||
|
||||
/* Call mainThread function */
|
||||
mainThread(NULL);
|
||||
|
||||
while (1) {}
|
||||
}
|
||||
98
pingpong_test/pingpong.c
Normal file
98
pingpong_test/pingpong.c
Normal file
@@ -0,0 +1,98 @@
|
||||
#include "io.h"
|
||||
|
||||
#define Ts 0.1
|
||||
|
||||
//float Kc = 1.0;
|
||||
#define Ku 0.9
|
||||
#define Tu 2.8
|
||||
|
||||
#define Kc 1.2//1//Ku/2.2 //=4.1
|
||||
#define Ti 3//3//(2.2*Tu)
|
||||
#define Td 0.5//0.5//(Tu/6.3)
|
||||
|
||||
const float p1 = (Kc*Ts)/Ti;
|
||||
const float q1 = -Kc - (3*Kc*Td)/(2*Ts);
|
||||
const float q2 = Kc + (7*Kc*Td)/(2*Ts);
|
||||
const float q3 = -(5*Kc*Td)/(2*Ts);
|
||||
const float q4 = (Kc*Td)/(2*Ts);
|
||||
|
||||
float y[4] = {0, 0, 0, 0};
|
||||
float n = 0.0;
|
||||
|
||||
int controller(int dist, int r)
|
||||
{
|
||||
int i;
|
||||
for (i=3; i>0; i--)
|
||||
{
|
||||
y[i] = y[i-1];
|
||||
}
|
||||
y[0] = dist;
|
||||
|
||||
n = n + p1 * ( r - y[1] ) + q1 * y[0] + q2 * y[1] + q3 * y[2] + q4 * y[3];
|
||||
//n = Kc * ( r - y[0] );
|
||||
|
||||
if (n > 1000)
|
||||
{
|
||||
n = 1000;
|
||||
}
|
||||
else if (n < 0)
|
||||
{
|
||||
n = 0;
|
||||
}
|
||||
return (int)(n+0.5);
|
||||
}
|
||||
|
||||
void *mainThread(void *arg0)
|
||||
{
|
||||
if (initUART() == false)
|
||||
{
|
||||
// initUart() failed
|
||||
while(1);
|
||||
}
|
||||
// Samplefrequency = 10 Hz
|
||||
if (initTimer(10) == false)
|
||||
{
|
||||
sendStringUART("initTimer() failed");
|
||||
while(1);
|
||||
}
|
||||
|
||||
initPort();
|
||||
|
||||
if (initPWM() == false)
|
||||
{
|
||||
sendStringUART("initPWM() failed");
|
||||
while(1);
|
||||
}
|
||||
|
||||
int i = 0, ii = -5, t = 300;
|
||||
uint32_t sp = 0;
|
||||
int PWM = 0;
|
||||
char ploep[100];
|
||||
|
||||
//Kc = 2;
|
||||
|
||||
setPWM(0);
|
||||
while(1)
|
||||
{
|
||||
trigger(); // Trigger routine creates a 10 usec trigger pulse for the ultrasonic sensor.
|
||||
PWM = controller(distance, sp);
|
||||
if(i < 30)
|
||||
{
|
||||
setPWM(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sp = 400;
|
||||
setPWM(PWM);
|
||||
}
|
||||
|
||||
sprintf(&ploep, "%d,%d,%d,%i\n", i, distance, sp, PWM);
|
||||
sendStringUART(ploep);
|
||||
|
||||
i++;
|
||||
while(tick == false){}
|
||||
tick = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
56
pingpong_test/pingpong.syscfg
Normal file
56
pingpong_test/pingpong.syscfg
Normal file
@@ -0,0 +1,56 @@
|
||||
// @cliArgs --board /ti/boards/CC3220S_LAUNCHXL --rtos nortos
|
||||
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const GPIO = scripting.addModule("/ti/drivers/GPIO", {}, false);
|
||||
const GPIO1 = GPIO.addInstance();
|
||||
const GPIO2 = GPIO.addInstance();
|
||||
const PWM = scripting.addModule("/ti/drivers/PWM", {}, false);
|
||||
const PWM1 = PWM.addInstance();
|
||||
const RTOS = scripting.addModule("/ti/drivers/RTOS");
|
||||
const Timer = scripting.addModule("/ti/drivers/Timer", {}, false);
|
||||
const Timer1 = Timer.addInstance();
|
||||
const Timer2 = Timer.addInstance();
|
||||
const UART = scripting.addModule("/ti/drivers/UART", {}, false);
|
||||
const UART1 = UART.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
GPIO1.mode = "Output";
|
||||
GPIO1.$name = "Board_TRIGGER";
|
||||
GPIO1.gpioPin.$assign = "boosterpack.5";
|
||||
|
||||
GPIO2.$name = "Board_ECHO";
|
||||
GPIO2.gpioPin.$assign = "boosterpack.8";
|
||||
|
||||
PWM1.$name = "CONFIG_PWM_0";
|
||||
PWM1.$hardware = system.deviceData.board.components.LED_GREEN;
|
||||
|
||||
const Power = scripting.addModule("/ti/drivers/Power", {}, true);
|
||||
Power.parkPins.$name = "ti_drivers_power_PowerCC32XXPins0";
|
||||
|
||||
RTOS.name = "NoRTOS";
|
||||
|
||||
Timer1.$name = "CONFIG_TIMER_0";
|
||||
Timer1.timerType = "32 Bits";
|
||||
|
||||
Timer2.$name = "CONFIG_TIMER_1";
|
||||
Timer2.timerType = "32 Bits";
|
||||
|
||||
UART1.$name = "CONFIG_UART_0";
|
||||
UART1.$hardware = system.deviceData.board.components.XDS110UART;
|
||||
|
||||
/**
|
||||
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
||||
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
||||
* re-solve from scratch.
|
||||
*/
|
||||
PWM1.timer.$suggestSolution = "Timer3";
|
||||
PWM1.timer.pwmPin.$suggestSolution = "boosterpack.10";
|
||||
Timer1.timer.$suggestSolution = "Timer1";
|
||||
Timer2.timer.$suggestSolution = "Timer0";
|
||||
UART1.uart.$suggestSolution = "UART0";
|
||||
UART1.uart.txPin.$suggestSolution = "55";
|
||||
UART1.uart.rxPin.$suggestSolution = "57";
|
||||
38
pingpong_test/targetConfigs/CC3220S.ccxml
Normal file
38
pingpong_test/targetConfigs/CC3220S.ccxml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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/tixds510icepick_c.xml" id="drivers" xml="tixds510icepick_c.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<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/tixds510cortexM.xml" id="drivers" xml="tixds510cortexM.xml" xmlpath="drivers"/>
|
||||
|
||||
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
|
||||
|
||||
<instance XML_version="1.2" desc="CC3220S" href="devices/CC3220S.xml" id="CC3220S" xml="CC3220S.xml" xmlpath="devices"/>
|
||||
|
||||
|
||||
</platform>
|
||||
|
||||
|
||||
</connection>
|
||||
|
||||
|
||||
</configuration>
|
||||
|
||||
|
||||
</configurations>
|
||||
9
pingpong_test/targetConfigs/readme.txt
Normal file
9
pingpong_test/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.
|
||||
Reference in New Issue
Block a user