all
This commit is contained in:
BIN
RTOS_Lab4_FileSystem/.DS_Store
vendored
Normal file
BIN
RTOS_Lab4_FileSystem/.DS_Store
vendored
Normal file
Binary file not shown.
21
RTOS_Lab4_FileSystem/.ccsproject
Normal file
21
RTOS_Lab4_FileSystem/.ccsproject
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?ccsproject version="1.0"?>
|
||||
<projectOptions>
|
||||
<ccsVersion value="12.3.0"/>
|
||||
<deviceVariant value="Cortex M.MSPM0G3507"/>
|
||||
<deviceFamily value="TMS470"/>
|
||||
<deviceEndianness value="little"/>
|
||||
<codegenToolVersion value="TICLANG_2.1.3.LTS"/>
|
||||
<isElfFormat value="true"/>
|
||||
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
|
||||
<rts value=""/>
|
||||
<createSlaveProjects value=""/>
|
||||
<ignoreDefaultDeviceSettings value="true"/>
|
||||
<ignoreDefaultCCSSettings value="true"/>
|
||||
<templateProperties value="id=gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.projectspec.gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang,buildProfile=release,isHybrid=true"/>
|
||||
<sourceLookupPath value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/ti/driverlib"/>
|
||||
<origin value="C:\ti\mspm0_sdk_1_00_01_03\examples\nortos\LP_MSPM0G3507\driverlib\gpio_toggle_output\ticlang\gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.projectspec"/>
|
||||
<filesToOpen value="gpio_toggle_output.syscfg,README.md"/>
|
||||
<isTargetManual value="false"/>
|
||||
<activeTargetConfiguration value="targetConfigs/MSPM0G3507.ccxml"/>
|
||||
</projectOptions>
|
||||
11
RTOS_Lab4_FileSystem/.clangd
Normal file
11
RTOS_Lab4_FileSystem/.clangd
Normal file
@@ -0,0 +1,11 @@
|
||||
# This is an auto-generated file - do not add it to source-control
|
||||
|
||||
CompileFlags:
|
||||
CompilationDatabase: Debug/.clangd
|
||||
|
||||
Diagnostics:
|
||||
Suppress: '*'
|
||||
|
||||
InlayHints:
|
||||
Enabled: No
|
||||
|
||||
120
RTOS_Lab4_FileSystem/.cproject
Normal file
120
RTOS_Lab4_FileSystem/.cproject
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="com.ti.ccs.errorparser.SysConfigErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="com.ti.ccs.errorparser.CompilerErrorParser_TI" point="com.ti.ccs.project.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.ti.ccstudio.errorparser.SysConfigErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="out" artifactName="${ProjName}" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893" name="Debug" parent="com.ti.ccstudio.buildDefinitions.TMS470.Debug">
|
||||
<folderInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893." name="/" resourcePath="">
|
||||
<toolChain id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.DebugToolchain.2003980697" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.linkerDebug.1605009308">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.481423273" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">
|
||||
<listOptionValue value="DEVICE_CONFIGURATION_ID=Cortex M.MSPM0G3507"/>
|
||||
<listOptionValue value="DEVICE_CORE_ID=CORTEX_M0P"/>
|
||||
<listOptionValue value="DEVICE_ENDIANNESS=little"/>
|
||||
<listOptionValue value="OUTPUT_FORMAT=ELF"/>
|
||||
<listOptionValue value="LINKER_COMMAND_FILE=mspm0g3507.cmd"/>
|
||||
<listOptionValue value="RUNTIME_SUPPORT_LIBRARY="/>
|
||||
<listOptionValue value="CCS_MBS_VERSION=6.1.3"/>
|
||||
<listOptionValue value="PRODUCTS=MSPM0-SDK:2.9.0.01;sysconfig:1.26.0;"/>
|
||||
<listOptionValue value="PRODUCT_MACRO_IMPORTS={"MSPM0-SDK":["${COM_TI_MSPM0_SDK_INCLUDE_PATH}","${COM_TI_MSPM0_SDK_LIBRARY_PATH}","${COM_TI_MSPM0_SDK_LIBRARIES}","${COM_TI_MSPM0_SDK_SYMBOLS}","${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"],"sysconfig":["${SYSCONFIG_TOOL_INCLUDE_PATH}","${SYSCONFIG_TOOL_LIBRARY_PATH}","${SYSCONFIG_TOOL_LIBRARIES}","${SYSCONFIG_TOOL_SYMBOLS}","${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"]}"/>
|
||||
<listOptionValue value="OUTPUT_TYPE=executable"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1314904927" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="TICLANG_4.0.4.LTS" valueType="string"/>
|
||||
<targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.targetPlatformDebug.1221094818" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.targetPlatformDebug"/>
|
||||
<builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug.929571502" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.835009917" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MARCH.1368987021" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MARCH" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MARCH.thumbv6m" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MCPU.56916551" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MCPU" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MCPU.cortex-m0plus" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MFLOAT_ABI.733731191" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MFLOAT_ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.MFLOAT_ABI.soft" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE.827818530" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE.MLITTLE_ENDIAN" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.1961496527" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.SELECT_PROCESSOR_MODE__ARM_THUMB.MTHUMB" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.1250851775" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.0" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.INCLUDE_PATH.86415625" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.INCLUDE_PATH" valueType="includePath">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INCLUDE_PATH}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_INCLUDE_PATH}"/>
|
||||
<listOptionValue value="${PROJECT_ROOT}"/>
|
||||
<listOptionValue value="${PROJECT_ROOT}/${ConfigName}"/>
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/third_party/CMSIS/Core/Include"/>
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE.1884283584" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
<listOptionValue value="__MSPM0G3507__"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG.1933090509" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG.GDWARF_3" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.STD_C.474839535" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.STD_C" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.STD_C.c99" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.linkerDebug.1605009308" name="Arm Linker" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.linkerDebug">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.MAP_FILE.468062328" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.MAP_FILE" value="${ProjName}.map" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.OUTPUT_FILE.1973979357" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.OUTPUT_FILE" value="${ProjName}.out" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.HEAP_SIZE.92561789" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.HEAP_SIZE" value="512" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.STACK_SIZE.1866548524" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.STACK_SIZE" value="512" valueType="string"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.LIBRARY.689630077" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.LIBRARY" valueType="libs">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_LIBRARIES}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_LIBRARIES}"/>
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/ti/driverlib/lib/ticlang/m0p/mspm0g1x0x_g3x0x/driverlib.a"/>
|
||||
<listOptionValue value="libc.a"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.SEARCH_PATH.611437703" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.SEARCH_PATH" valueType="libPaths">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_LIBRARY_PATH}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_LIBRARY_PATH}"/>
|
||||
<listOptionValue value="${PROJECT_BUILD_DIR}/syscfg"/>
|
||||
<listOptionValue value="${CG_TOOL_ROOT}/lib"/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.REREAD_LIBS.226205555" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.REREAD_LIBS" value="false" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DIAG_WRAP.1774272638" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DIAG_WRAP" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DIAG_WRAP.off" valueType="enumerated"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DISPLAY_ERROR_NUMBER.345069822" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.XML_LINK_INFO.1183325452" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.XML_LINK_INFO" value="${ProjName}_linkInfo.xml" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.hex.1106510234" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.hex"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.objcopy.1380896286" name="Arm Objcopy Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.objcopy"/>
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.sysConfig.1841752420" name="SysConfig" superClass="com.ti.ccstudio.buildDefinitions.sysConfig">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS.398650042" superClass="com.ti.ccstudio.buildDefinitions.sysConfig.PRODUCTS" valueType="stringList">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_SYSCONFIG_MANIFEST}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_SYSCONFIG_MANIFEST}"/>
|
||||
</option>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="com.ti.ccstudio.buildDefinitions.TMS470.Debug.1353749893.osasm.s" name="osasm.s" rcbsApplicability="disable" resourcePath="osasm.s" toolsToInvoke="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.835009917.1118496585">
|
||||
<tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.835009917.1118496585" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.835009917">
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OTHER_FLAGS.2131272714" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OTHER_FLAGS" valueType="stringList">
|
||||
<listOptionValue value=""/>
|
||||
</option>
|
||||
<option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE.2012134999" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.DEFINE" valueType="definedSymbols">
|
||||
<listOptionValue value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
|
||||
<listOptionValue value="${SYSCONFIG_TOOL_SYMBOLS}"/>
|
||||
</option>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.com.ti.ccstudio.buildDefinitions.TMS470.ProjectType.348798676" name="TMS470" projectType="com.ti.ccstudio.buildDefinitions.TMS470.ProjectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
124
RTOS_Lab4_FileSystem/.project
Normal file
124
RTOS_Lab4_FileSystem/.project
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>RTOS_Lab4_FileSystem</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>ADC.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/inc/ADC.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>Clock.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/inc/Clock.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>IRDistance.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/IRDistance.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>Interpreter.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/Interpreter.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>LPF.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/LPF.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>DFT16.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/DFT16.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>LaunchPad.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/LaunchPad.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>OS.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/OS.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>RTOS_FIFO.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/RTOS_FIFO.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>ST7735_SDC.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/ST7735_SDC.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>RTOS_UART.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/RTOS_UART.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>RTOS_UARTints.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/RTOS_UARTints.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>SPI.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/SPI.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>Timer.c</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/inc/Timer.c</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>osasm.s</name>
|
||||
<type>1</type>
|
||||
<location>PARENT-1-PROJECT_LOC/RTOS_Labs_common/osasm.s</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>TFLunaCommon.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/TFLunaCommon.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TFLuna2.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/TFLuna2.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>eDisk.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/eDisk.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>eFile.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/RTOS_Labs_common/eFile.c</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
inEditor=false
|
||||
onBuild=false
|
||||
107
RTOS_Lab4_FileSystem/Debug/.clangd/compile_commands.json
Normal file
107
RTOS_Lab4_FileSystem/Debug/.clangd/compile_commands.json
Normal file
@@ -0,0 +1,107 @@
|
||||
[
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/ADC.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/Clock.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/DFT16.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/IRDistance.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/Interpreter.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/LPF.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/LaunchPad.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/OS.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/RTOS_FIFO.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/RTOS_Lab4.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/RTOS_UART.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/RTOS_UARTints.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/SPI.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/ST7735_SDC.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/TFLuna2.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/TFLunaCommon.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/inc/Timer.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/eDisk.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/eFile.c"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\"",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Labs_common/osasm.s"
|
||||
},
|
||||
{
|
||||
"directory" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug",
|
||||
"command" : "clang++ -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source/third_party/CMSIS/Core/Include\" -I\"/Applications/ti/mspm0_sdk_2_09_00_01/source\" -D__MSPM0G3507__ -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/armv7em-ti-none-eabihf/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c++/v1\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/lib/clang/18/include\" -isystem\"/Applications/ti/ccs2040/ccs/tools/compiler/ti-cgt-armllvm_4.0.4.LTS/include/c\" -I\"/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/Debug/syscfg\" -std=c99 -xc",
|
||||
"file" : "/Users/adipu/lab-7-tweinstein-1/RTOS_Lab4_FileSystem/ticlang/startup_mspm0g3507_ticlang.c"
|
||||
}
|
||||
]
|
||||
151
RTOS_Lab4_FileSystem/README.html
Normal file
151
RTOS_Lab4_FileSystem/README.html
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml"
|
||||
xmlns:o="urn:schemas-microsoft-com:office:office"
|
||||
xmlns:w="urn:schemas-microsoft-com:office:word"
|
||||
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
|
||||
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
|
||||
xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=windows-1252">
|
||||
<meta name="ProgId" content="Word.Document">
|
||||
<meta name="Generator" content="Microsoft Word 14">
|
||||
<meta name="Originator" content="Microsoft Word 14">
|
||||
<base target="_parent">
|
||||
<link rel="Edit-Time-Data" href="index_files/editdata.mso">
|
||||
<title>RTOS_Lab4_FileSystem</title>
|
||||
<o:smarttagtype
|
||||
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"></o:smarttagtype><o:smarttagtype
|
||||
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
|
||||
name="PlaceName"></o:smarttagtype>
|
||||
<o:smarttagtype
|
||||
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
|
||||
name="PlaceType"></o:smarttagtype>
|
||||
<link rel="themeData" href="index_files/themedata.thmx">
|
||||
<link rel="colorSchemeMapping"
|
||||
href="index_files/colorschememapping.xml">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-color: white;" alink="#0000ff" lang="EN-US"
|
||||
link="blue" vlink="#c40026">
|
||||
<div class="WordSection1">
|
||||
<p style="text-align: center;" align="center"><span
|
||||
style="font-size: 18pt;">RTOS_Lab4_FileSystem</span><br>
|
||||
<table class="MsoNormalTable"
|
||||
style="border: 3pt outset ; background: rgb(255, 204, 153) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 100%;"
|
||||
border="1" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><span style="font-size: 18pt;">Readme</b></span>
|
||||
<br> <br>
|
||||
This is the starter project for ECE445M Lab 4. For more information
|
||||
see <a href="https://users.ece.utexas.edu/~valvano/EE445M/" target="_blank">ECE445M class web page</a> <br> <br>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<table class="MsoNormalTable"
|
||||
style="border: 3pt outset ; background: rgb(252, 243, 144) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 100%;"
|
||||
border="1" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><span style="font-size: 18pt;">Hardware Required</b></span>
|
||||
<br>
|
||||
<ul>
|
||||
<li>MSPM0G3507 LaunchPad™ Development Kit (LP-MSPM0G3507)</li>
|
||||
<li>ECE445M Sensor board</li>
|
||||
<li>One TFLuna</li>
|
||||
<li>One robot bump switch</li>
|
||||
<li>One analog distance sensor GP2Y0A41SK0F or GP2Y0A21YK0F</li>
|
||||
</ul>
|
||||
<p class="PictureWide"><span lang="en-US"><img src="../RTOS_Labs_common/SensorBoard.png" width="500"
|
||||
></span></p>
|
||||
<p class="PictureWide"><span lang="en-US"><img src="../RTOS_Labs_common/RobotSensors.png" width="500"
|
||||
></span></p>
|
||||
<b><span style="font-size: 18pt;">Pin assignments</b></span>
|
||||
<br>
|
||||
<ul>
|
||||
<li>Serial TxD: PA10 is UART0 Tx (MSPM0 to PC), used for intepreter</li>
|
||||
<li>Serial RxD: PA11 is UART0 Rx (PC to MSPM0), used for intepreter</li>
|
||||
<li>SPI1: PB7, MISO from ST7735 to SPI1 POCI </li>
|
||||
<li>SPI1: PB9, SCK from SPI1 to ST7735 SCLK</li>
|
||||
<li>SPI1: PB8, MOSI from SPI1 to ST7735 PICO</li>
|
||||
<li>GPIO Output: PB6, from MSPM0 to ST7735 TFT_CS </li>
|
||||
<li>GPIO Output: PB0, from MSPM0 to ST7735 CARD_CS </li>
|
||||
<li>GPIO Output: PB16, from MSPM0 to ST7735 Data/Command </li>
|
||||
<li>GPIO Output: PB15, from MSPM0 to ST7735 RESET </li>
|
||||
<li>GPIO Output: PA8, used for profiling user code</li>
|
||||
<li>GPIO Output: PA9, used for profiling user code</li>
|
||||
<li>GPIO Output: PA16, used for profiling user code</li>
|
||||
<li>GPIO Output: PB4, used for profiling user code</li>
|
||||
<li>GPIO Output: PB1, used for profiling user code</li>
|
||||
<li>GPIO Output: PB20, used for profiling user code</li>
|
||||
<li>GPIO Output: PA0 is red LED1, could be used for debugging</li>
|
||||
<li>GPIO Output: PB22 is BLUE LED2, used for debugging OS</li>
|
||||
<li>GPIO Output: PB26 is RED LED2, used for debugging OS</li>
|
||||
<li>GPIO Output: PB27 is GREEN LED2, used for debugging OS</li>
|
||||
<li>GPIO Input: PB21 is S2 negative logic switch, used for aperiodic task</li>
|
||||
<li>GPIO Input: PA28 is negative logic bump switch, used for aperiodic task</li>
|
||||
<li>Analog Input: PA24 ADC0_3, IR analog distance sensor GP2Y0A41SK0F or GP2Y0A21YK0F</li>
|
||||
<li>Serial TxD: PB17 is UART2 Tx (MSPM0 to TFLuna2), used in Labs 1,2,3,4</li>
|
||||
<li>Serial RxD: PB18 is UART2 Rx (TFLuna2 to MSPM0), used in Labs 1,2,3,4</li>
|
||||
</ul>
|
||||
<b><span style="font-size: 18pt;">LaunchPad Jumpers</b></span>
|
||||
<br>
|
||||
<ul>
|
||||
<li>Remove J16 J17 J18: Disconnects light sensor from the microcontroller PA22 PA27 PA26</li>
|
||||
<li>J4: Connects PA0 to red LED</li>
|
||||
<li>J21: Connects PA10 to XDS_UART</li>
|
||||
<li>J22: Connects PA11 to XDS_UART</li>
|
||||
<li>J14: SW1 to select PA9</li>
|
||||
<li>J15: SW2 to select PA16</li>
|
||||
<li>J16,J17,J18: remove to disconnect light sensor</li>
|
||||
</ul>
|
||||
</p> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<p>
|
||||
Simplified BSD License (FreeBSD License)
|
||||
Copyright © 2026, Jonathan Valvano, All rights reserved.<br>
|
||||
<br>
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:<br>
|
||||
<ol>
|
||||
<li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li>
|
||||
<li>Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.</li></ol>
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br>
|
||||
<br>
|
||||
The views and conclusions contained in the software and documentation are
|
||||
those of the authors and should not be interpreted as representing official
|
||||
policies, either expressed or implied, of the FreeBSD Project.
|
||||
<br>
|
||||
</p>
|
||||
<p>For more information, see <a href="http://users.ece.utexas.edu/~valvano/">
|
||||
http://users.ece.utexas.edu/~valvano/</a>.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
745
RTOS_Lab4_FileSystem/RTOS_Lab4.c
Normal file
745
RTOS_Lab4_FileSystem/RTOS_Lab4.c
Normal file
@@ -0,0 +1,745 @@
|
||||
/* RTOS_Lab4.c
|
||||
* Jonathan Valvano
|
||||
* December 30, 2025
|
||||
* Remove 3.3V J101 jumper to run RTOS sensor board or motor board
|
||||
* A two-pin female header is required on the LaunchPad TP10(XDS_VCC) and TP9(!RSTN)
|
||||
*/
|
||||
|
||||
#include <ti/devices/msp/msp.h>
|
||||
#include "../inc/LaunchPad.h"
|
||||
#include "../RTOS_Labs_common/ADC.h"
|
||||
#include "../inc/Clock.h"
|
||||
#include "../RTOS_Labs_common/ST7735_SDC.h"
|
||||
#include "../RTOS_Labs_common/RTOS_UART.h"
|
||||
#include "../RTOS_Labs_common/Interpreter.h"
|
||||
#include "../RTOS_Labs_common/IRDistance.h"
|
||||
#include "../RTOS_Labs_common/LPF.h"
|
||||
#include "../RTOS_Labs_common/DFT16.h"
|
||||
#include "../RTOS_Labs_common/TFLuna2.h"
|
||||
#include "../RTOS_Labs_common/OS.h"
|
||||
#include "../RTOS_Labs_common/eDisk.h"
|
||||
#include "../RTOS_Labs_common/eFile.h"
|
||||
#include <stdio.h>
|
||||
// PA10 is UART0 Tx index 20 in IOMUX PINCM table
|
||||
// PA11 is UART0 Rx index 21 in IOMUX PINCM table
|
||||
// Insert jumper J25: Connects PA10 to XDS_UART
|
||||
// Insert jumper J26: Connects PA11 to XDS_UART
|
||||
// PA0 is red LED1, index 0 in IOMUX PINCM table, negative logic
|
||||
// PB22 is BLUE LED2, index 49 in IOMUX PINCM table
|
||||
// PB26 is RED LED2, index 56 in IOMUX PINCM table
|
||||
// PB27 is GREEN LED2, index 57 in IOMUX PINCM table
|
||||
// PA18 is S1 positive logic switch, conflict with TFLuna1, so S1 will not be used
|
||||
// PB21 is S2 negative logic switch, used for aperiodic task
|
||||
// IR analog distance sensors
|
||||
// 30 cm GP2Y0A41SK0F or 80 cm long range GP2Y0A21YK0F
|
||||
// PA26 Right ADC0_1
|
||||
// PA24 Center ADC0_3, used in Labs 1,2,3,4
|
||||
// PA22 Left ADC0_7
|
||||
// PA27 Extra ADC0_0
|
||||
|
||||
// RTOS sensor board supported three TF-Luna sensors
|
||||
// Serial TxD: PA17 is UART1 Tx (MSPM0 to TFLuna1)
|
||||
// Serial RxD: PA18 is UART1 Rx (TFLuna1 to MSPM0), conflict with LaunchPad S1
|
||||
// Serial TxD: PB17 is UART2 Tx (MSPM0 to TFLuna2), used in Labs 1,2,3,4
|
||||
// Serial RxD: PB18 is UART2 Rx (TFLuna2 to MSPM0), used in Labs 1,2,3,4
|
||||
// Serial TxD: PB12 is UART3 Tx (MSPM0 to TFLuna3),
|
||||
// Serial RxD: PB13 is UART3 Rx (TFLuna3 to MSPM0), shared with LD19 Lidar
|
||||
//UART3 is shared between LD19 and TFLuna3 (can have either but not both)
|
||||
|
||||
// **** OS must run disk_timerproc(); at 1000Hz, every 1ms *****
|
||||
uint32_t Running; // true while robot is running
|
||||
uint32_t NumCreated; // number of foreground threads created
|
||||
|
||||
//---------------------User debugging-----------------------
|
||||
|
||||
// Unused sensor board pins, made outputs for debugging
|
||||
// Jumper J14 select PA9
|
||||
// Jumper J15 select PA16
|
||||
void Logic_Init(void){
|
||||
IOMUX->SECCFG.PINCM[PA8INDEX] = (uint32_t) 0x00000081;
|
||||
IOMUX->SECCFG.PINCM[PA9INDEX] = (uint32_t) 0x00000081;
|
||||
IOMUX->SECCFG.PINCM[PA16INDEX] = (uint32_t) 0x00000081;
|
||||
IOMUX->SECCFG.PINCM[PB4INDEX] = (uint32_t) 0x00000081;
|
||||
IOMUX->SECCFG.PINCM[PB1INDEX] = (uint32_t) 0x00000081;
|
||||
IOMUX->SECCFG.PINCM[PB20INDEX] = (uint32_t) 0x00000081;
|
||||
GPIOA->DOE31_0 |= (1<<8)|(1<<9)|(1<<16);
|
||||
GPIOB->DOE31_0 |= (1<<4)|(1<<1)|(1<<20);
|
||||
}
|
||||
#define TogglePA8() (GPIOA->DOUTTGL31_0 = (1<<8))
|
||||
#define SetPA8() (GPIOA->DOUTSET31_0 = (1<<8))
|
||||
#define ClrPA8() (GPIOA->DOUTCLR31_0 = (1<<8))
|
||||
#define TogglePA9() (GPIOA->DOUTTGL31_0 = (1<<9))
|
||||
#define SetPA9() (GPIOA->DOUTSET31_0 = (1<<9))
|
||||
#define ClrPA9() (GPIOA->DOUTCLR31_0 = (1<<9))
|
||||
#define TogglePA16() (GPIOA->DOUTTGL31_0 = (1<<16))
|
||||
#define TogglePB4() (GPIOB->DOUTTGL31_0 = (1<<4))
|
||||
#define SetPB4() (GPIOB->DOUTSET31_0 = (1<<4))
|
||||
#define ClrPB4() (GPIOB->DOUTCLR31_0 = (1<<4))
|
||||
#define TogglePB1() (GPIOB->DOUTTGL31_0 = (1<<1))
|
||||
#define TogglePB20() (GPIOB->DOUTTGL31_0 = (1<<20))
|
||||
|
||||
uint32_t Checks; // number of times virus checking has run
|
||||
uint32_t ChecksWork; // number of checks in 10 second
|
||||
//------------------Task 1--------------------------------
|
||||
// real-time sampling ADC0 channel 3, using software start trigger
|
||||
// 60-Hz notch high-Q, IIR filter, assuming fs=1000 Hz
|
||||
// y(n) = (256x(n) -476x(n-1) + 256x(n-2) + 471y(n-1)-251y(n-2))/256 (1k sampling)
|
||||
#define PERIOD TIME_1MS // DAS 1kHz sampling period in system time units
|
||||
#define FS 1000 // DAS sampling
|
||||
#define RUNLENGTH (10000) // display results and quit when FilterWork==RUNLENGTH
|
||||
uint32_t FilterOutput,Distance;
|
||||
Sema4_t LCDFree; // SDC and LCD sharing
|
||||
|
||||
uint32_t FilterWork;
|
||||
uint32_t MaxJitter3;
|
||||
#define JITTERSIZE3 512
|
||||
uint32_t const JitterSize3=JITTERSIZE3;
|
||||
uint32_t JitterHistogram3[JITTERSIZE3]={0,};
|
||||
void Jitter3_Init(void){
|
||||
for(int i=0;i<JitterSize3;i++){
|
||||
JitterHistogram3[i] = 0;
|
||||
}
|
||||
MaxJitter3 = 0;
|
||||
}
|
||||
//******** DAS ***************
|
||||
// background thread, calculates 60Hz notch filter
|
||||
// runs 1000 times/sec
|
||||
// samples PA24 Center ADC0_3, calculates Distance
|
||||
// inputs: none
|
||||
// outputs: none
|
||||
void DAS(void){
|
||||
uint32_t input;
|
||||
static uint32_t LastTime; // time at previous ADC sample, 12.5 ns
|
||||
uint32_t thisTime; // time at current ADC sample, 12.5 ns
|
||||
uint32_t jitter; // time between measured and expected, 12.5 ns
|
||||
TogglePA8(); // toggle PA8
|
||||
input = ADC0_In(); // channel 3 set when calling ADC0_Init
|
||||
TogglePA8(); // toggle PA8
|
||||
thisTime = OS_Time(); // current time, 12.5 ns
|
||||
FilterOutput = Filter(input);
|
||||
Distance = IRDistance_Convert(FilterOutput,0); // in mm
|
||||
if(Running){ // finite time run
|
||||
FilterWork++; // calculation finished
|
||||
if(FilterWork>2){ // ignore timing of first interrupt
|
||||
uint32_t diff = OS_TimeDifference(LastTime,thisTime);
|
||||
if(diff>PERIOD){
|
||||
jitter = (diff-PERIOD); // in 12.5 ns
|
||||
}else{
|
||||
jitter = (PERIOD-diff); // in 12.5 ns
|
||||
}
|
||||
if(jitter > MaxJitter3){
|
||||
MaxJitter3 = jitter; // in 12.5 ns
|
||||
} // jitter should be 0
|
||||
JitterHistogram3[jitter]++;
|
||||
}
|
||||
ChecksWork = Checks;
|
||||
LastTime = thisTime;
|
||||
}
|
||||
TogglePA8(); // toggle PA8
|
||||
}
|
||||
//--------------end of Task 1-----------------------------
|
||||
|
||||
//------------------Task 2--------------------------------
|
||||
// background thread executes with PA28 button
|
||||
// PA28 negative logic switch
|
||||
// one foreground task created with each button push
|
||||
// foreground tread outputs a message and dies
|
||||
uint32_t DataLost; // data sent by Producer, but not received by Consumer
|
||||
|
||||
// ***********PA28Push*************
|
||||
int ArmCrash=1;
|
||||
void HandleCrash(void){
|
||||
TogglePA9();
|
||||
TogglePA9();
|
||||
uint32_t myId = OS_Id();
|
||||
ST7735_Message(1,0,"myID =",myId);
|
||||
ST7735_Message(1,1,"*Crash*, t= ",OS_MsTime());
|
||||
ArmCrash=1;
|
||||
TogglePA9();
|
||||
OS_Kill();
|
||||
}
|
||||
void PA28Push(void){ // real time task
|
||||
if(ArmCrash){
|
||||
ArmCrash = 0; // debounce
|
||||
NumCreated += OS_AddThread(&HandleCrash,128,1); // test robot crash
|
||||
}
|
||||
}
|
||||
|
||||
//------------------Task 3--------------------------------
|
||||
// hardware-triggered TFLuna distance sampling at 100Hz
|
||||
// Producer runs as part of UART2 ISR
|
||||
// Producer uses fifo to transmit 100 distance samples/sec to Consumer
|
||||
// every 64 samples, Consumer calculates FFT
|
||||
// every 2.5ms*64 = 160 ms (6.25 Hz), consumer sends data to Display via mailbox
|
||||
// Display thread updates LCD with measurement
|
||||
uint32_t DataLost; // data sent by Producer, but not received by Consumer
|
||||
uint32_t Distance2; // mm
|
||||
int32_t x[16],ReX[16],ImX[16]; // input and output arrays for FFT
|
||||
|
||||
//******** Producer ***************
|
||||
// The Producer in this lab will be called from the UART2 ISR
|
||||
// The TFLuna2 samples distance at about 100 Hz
|
||||
// sends data to the consumer, runs periodically at 100Hz
|
||||
void Producer(uint32_t data){
|
||||
if(Running){ // finite time run
|
||||
TogglePA16(); // toggle PA16
|
||||
Distance2 = Median5((int32_t) data);
|
||||
TogglePA16(); // toggle PA16
|
||||
if(OS_Fifo_Put(Distance2) == 0){ // send to consumer
|
||||
DataLost++;
|
||||
}
|
||||
TogglePA16(); // toggle PA16
|
||||
}
|
||||
}
|
||||
|
||||
void Display(void);
|
||||
|
||||
// Describe the error with text on the LCD and then stall.
|
||||
// If you are getting disk errors, rerun Testmain1 Testmain2 Testmain3
|
||||
void diskError(char *errtype, int32_t code){
|
||||
OS_bSignal(&LCDFree);
|
||||
ST7735_DrawString(0, 1, "Err: ", ST7735_RED);
|
||||
ST7735_DrawString(5, 1, errtype, ST7735_RED);
|
||||
ST7735_DrawString(0, 2, "Code: ", ST7735_RED);
|
||||
ST7735_SetCursor(6, 2);
|
||||
ST7735_SetTextColor(ST7735_RED);
|
||||
ST7735_OutUDec(code);
|
||||
Running = 0;
|
||||
OS_Kill();
|
||||
}
|
||||
void StartFileDump(char *pt){
|
||||
OS_bWait(&LCDFree);
|
||||
eFile_Create(pt); // ignore error if file already exists
|
||||
if(eFile_WOpen(pt)) diskError("eFile_WOpen",0);
|
||||
if(eFile_WriteString("time(s)\tdist(mm)\tdist(mm)\n\r")) diskError("eFile_WriteString",0);
|
||||
OS_bSignal(&LCDFree);
|
||||
}
|
||||
void EndFileDump(){
|
||||
OS_bWait(&LCDFree);
|
||||
if(eFile_WClose()) diskError("eFile_WClose",0);
|
||||
OS_bSignal(&LCDFree);
|
||||
}
|
||||
|
||||
void FileDump(uint32_t data, uint32_t data2){
|
||||
SetPB4();
|
||||
OS_bWait(&LCDFree);
|
||||
eFile_WriteUFix2(OS_MsTime()/10); eFile_Write('\t');
|
||||
eFile_WriteUDec(data); eFile_Write('\t');
|
||||
eFile_WriteUDec(data2); eFile_WriteString("\n\r");
|
||||
OS_bSignal(&LCDFree);
|
||||
ClrPB4();
|
||||
}
|
||||
//******** Robot ***************
|
||||
// foreground Consumer thread, accepts data from producer
|
||||
// inputs: none
|
||||
// outputs: none
|
||||
char FileName[8]="robot0";
|
||||
|
||||
void Robot(void){
|
||||
DataLost = 0; // new run with no lost data
|
||||
FilterWork = 0;
|
||||
Running = 1;
|
||||
Jitter3_Init();
|
||||
|
||||
OS_ClearMsTime();
|
||||
OS_Fifo_Init(256);
|
||||
NumCreated += OS_AddThread(&Display,128,0);
|
||||
UART_OutString("Robot running...");
|
||||
StartFileDump(FileName);
|
||||
|
||||
while(FilterWork < RUNLENGTH) {
|
||||
uint32_t data; // in mm, from TFLuna
|
||||
uint32_t sum=0;
|
||||
for(int t = 0; t < 16; t++){ // collect 16 TFLuna samples
|
||||
data = OS_Fifo_Get(); // get from producer, mm
|
||||
x[t] = data;
|
||||
sum += data; // average
|
||||
}
|
||||
Distance2 = sum>>4; // in mm
|
||||
FileDump(Distance,Distance2);
|
||||
OS_MailBox_Send(Distance2); // called every 10ms*16 = 160ms
|
||||
}
|
||||
EndFileDump();
|
||||
UART_OutString("done.\n\r>");
|
||||
FileName[5] = (FileName[5]+1)&0xF7; // 0 to 7
|
||||
Running = 0; // robot no longer running
|
||||
OS_Kill();
|
||||
}
|
||||
//************S2Push*************
|
||||
// Called when S2 Button pushed, fall of PB21
|
||||
// Adds another Robot foreground task
|
||||
// background threads execute once and return
|
||||
void S2Push(void){
|
||||
if(Running==0){
|
||||
Running = 1; // prevents you from starting two test threads
|
||||
NumCreated += OS_AddThread(&Robot,128,1); // test eDisk
|
||||
}
|
||||
}
|
||||
//--------------end of Task 2-----------------------------
|
||||
|
||||
//******** Display ***************
|
||||
// foreground thread, accepts data from consumer
|
||||
// displays results on the LCD
|
||||
// inputs: none
|
||||
// outputs: none
|
||||
void Display(void){
|
||||
uint32_t distance;
|
||||
uint32_t myId = OS_Id();
|
||||
ST7735_Message(0,1,"myId = ",myId); // top half used for Display
|
||||
ST7735_Message(0,2,"Run length = ",(RUNLENGTH)/FS); // top half used for Display
|
||||
while(Running) {
|
||||
TogglePB1(); // toggle PB1
|
||||
distance = OS_MailBox_Recv();
|
||||
// you will calibrate this in Lab 6
|
||||
TogglePB1(); // toggle PB1
|
||||
ST7735_Message(0,3,"Time(ms) =",OS_MsTime());
|
||||
ST7735_Message(0,4,"work =",FilterWork);
|
||||
ST7735_Message(0,5,"d(mm) =",distance);
|
||||
TogglePB1(); // toggle PB1
|
||||
}
|
||||
OS_Kill(); // done
|
||||
}
|
||||
|
||||
//--------------end of Task 3-----------------------------
|
||||
|
||||
//------------------Task 4--------------------------------
|
||||
// foreground thread that runs without waiting or sleeping
|
||||
// it executes a virus detector
|
||||
uint32_t Check(uint32_t start, uint32_t end){
|
||||
uint32_t sum=0;
|
||||
uint32_t *pt; pt = (uint32_t *)start;
|
||||
while((uint32_t)pt < end){
|
||||
sum += *pt++;
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
//******** Virus Detector ***************
|
||||
// foreground thread, performs a checksum of all ROM
|
||||
// never blocks, never sleeps, never dies
|
||||
// inputs: none
|
||||
// outputs: none
|
||||
uint32_t Checksum; // sum of data stored in ROM
|
||||
uint32_t ChecksumOriginal; // sum of data stored in ROM
|
||||
uint32_t ChecksumErrors;
|
||||
void VirusDetector(void){
|
||||
Checks = ChecksumErrors = 0;
|
||||
ChecksumOriginal = Check(0,0x20000);
|
||||
while(1) {
|
||||
TogglePB20(); // toggle PB20
|
||||
Checksum = Check(0,0x20000);
|
||||
Checks++;
|
||||
if(Checksum != ChecksumOriginal){
|
||||
ChecksumErrors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------end of Task 4-----------------------------
|
||||
|
||||
//------------------Task 5--------------------------------
|
||||
// UART0 background ISR performs serial input/output
|
||||
// Two software fifos are used to pass I/O data to foreground
|
||||
// The interpreter runs as a foreground thread
|
||||
// The UART0 driver should call OS_Wait(&RxDataAvailable) when foreground tries to receive
|
||||
// The UART0 ISR should call OS_Signal(&RxDataAvailable) when it receives data from Rx
|
||||
// Similarly, the transmit channel waits on a semaphore in the foreground
|
||||
// and the UART0 ISR signals this semaphore (TxRoomLeft) when getting data from fifo
|
||||
|
||||
//******** Interpreter ***************
|
||||
// Modify your intepreter from Lab 1, adding commands to help debug
|
||||
// Interpreter is a foreground thread, accepts input from serial port, outputs to serial port
|
||||
// inputs: none
|
||||
// outputs: none
|
||||
void Interpreter(void); // just a prototype, link to your interpreter
|
||||
// add the following commands, leave other commands, if they make sense
|
||||
// 1) print performance measures
|
||||
// time-jitter, number of data points lost, number of calculations performed
|
||||
// i.e., NumCreated, MaxJitter, DataLost, FilterWork, Checks
|
||||
|
||||
// 2) print debugging parameters
|
||||
// i.e., Checks, ChecksumErrors
|
||||
|
||||
// Call these from your interpreter
|
||||
void Lab4(void){int i;
|
||||
UART_OutString("\r\nLab 4 performance data");
|
||||
UART_OutString("\r\nFilterWork = "); UART_OutUDec(FilterWork);
|
||||
UART_OutString("\r\nNumCreated = "); UART_OutUDec(NumCreated);
|
||||
UART_OutString("\r\nChecksWork = "); UART_OutUDec(ChecksWork);
|
||||
UART_OutString("\r\nDataLost = "); UART_OutUDec(DataLost);
|
||||
UART_OutString("\r\nReal-time sampling jitter (cyc)");
|
||||
UART_OutString("\r\nTime, Frequencies");
|
||||
for(i=0; i<JitterSize3; i++){
|
||||
if(JitterHistogram3[i]){ // skip blanks
|
||||
UART_OutString("\r\n ");
|
||||
UART_OutUDec5(i);
|
||||
UART_OutUDec5(JitterHistogram3[i]);
|
||||
}
|
||||
}
|
||||
UART_OutString("\r\nMaxJitter3(cyc) = "); UART_OutUDec(MaxJitter3);
|
||||
}
|
||||
|
||||
void DFT(void){ int i; int32_t real,imag,mag;
|
||||
UART_OutString("\r\nLab 2/3 DFT data");
|
||||
UART_OutString("\r\nInput, Output Real, Output Imaginary, Magnitude");
|
||||
for(i=0; i<8; i++){
|
||||
real = ReX[i];
|
||||
imag = ImX[i];
|
||||
mag = sqrt2(real*real+imag*imag);
|
||||
UART_OutString("\r\n"); UART_OutUDec(x[i]); UART_OutChar(' '); UART_OutSDec(real); UART_OutChar(' '); UART_OutSDec(imag);
|
||||
UART_OutChar(' '); UART_OutSDec(mag);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------end of Task 5-----------------------------
|
||||
|
||||
|
||||
//*******************final user main DEMONTRATE THIS TO TA**********
|
||||
int realmain(void){ // realmain
|
||||
OS_Init(); // initialize, disable interrupts
|
||||
|
||||
Logic_Init();
|
||||
DataLost = 0; // lost data between producer and consumer
|
||||
FilterWork = 0;
|
||||
Jitter3_Init();
|
||||
// initialize communication channels
|
||||
OS_MailBox_Init();
|
||||
OS_Fifo_Init(256); // ***note*** 4 is not big enough*****
|
||||
|
||||
// hardware init
|
||||
ADC0_Init(3,ADCVREF_VDDA); // PA24 Center ADC0_3, sampling in DAS()
|
||||
OS_InitSemaphore(&LCDFree, 1);
|
||||
// attach background tasks
|
||||
OS_AddS2Task(&S2Push,1); // fall of PB21
|
||||
OS_AddPA28Task(&PA28Push,1); // fall of PA28
|
||||
OS_AddPeriodicThread(&DAS,PERIOD/80000,0); // 1 kHz real time sampling of ADC0_3
|
||||
OS_AddPeriodicThread(&disk_timerproc,1,0); // time out routines for disk
|
||||
|
||||
// create initial foreground threads
|
||||
NumCreated = 0;
|
||||
NumCreated += OS_AddThread(&Interpreter,128,1);
|
||||
NumCreated += OS_AddThread(&VirusDetector,128,2);
|
||||
|
||||
LPF_Init7(500,7);
|
||||
TFLuna2_Init(&Producer);
|
||||
TFLuna2_Format_Standard_mm(); // format in mm
|
||||
TFLuna2_Frame_Rate(); // 100 samples/sec
|
||||
TFLuna2_SaveSettings(); // save format and rate
|
||||
TFLuna2_System_Reset(); // start measurements
|
||||
|
||||
if(eFile_Init()) diskError("eFile_Init",0);
|
||||
// if(eFile_Format()) diskError("eFile_Format",0);
|
||||
if(eFile_Mount()) diskError("eFile_Mount",0);
|
||||
OS_Launch(TIME_2MS); // doesn't return, interrupts enabled in here
|
||||
return 0; // this never executes
|
||||
}
|
||||
//+++++++++++++++++++++++++DEBUGGING CODE++++++++++++++++++++++++
|
||||
// ONCE YOUR RTOS WORKS YOU CAN COMMENT OUT THE REMAINING CODE
|
||||
//
|
||||
|
||||
uint32_t M=1;
|
||||
uint32_t Random32(void){
|
||||
M = 1664525*M+1013904223;
|
||||
return M;
|
||||
}
|
||||
// 0 to 31
|
||||
uint32_t Random5(void){
|
||||
return (Random32()>>27);
|
||||
}
|
||||
// 0 to 127
|
||||
uint32_t Random7(void){
|
||||
return (Random32()>>25);
|
||||
}
|
||||
// 0 to 255
|
||||
uint8_t Random8(void){
|
||||
return (Random32()>>24);
|
||||
}
|
||||
|
||||
//*****************Test project 1*************************
|
||||
// This test should run. If ST7735R works, but this fails:
|
||||
// - there may be bad solder joints on Sensor board
|
||||
// - the MSPM0 might have bad pins (PB0 or PB8)
|
||||
// - SDC not seated correctly or damaged
|
||||
// Write and read test of random access disk blocks
|
||||
// Warning: this overwrites whatever is on the disk
|
||||
unsigned char buffer[512]; // don't put on stack
|
||||
#define MAXBLOCKS 100
|
||||
void TestDisk(void){ DSTATUS result; uint32_t block; int i; uint8_t n;
|
||||
// simple test of eDisk
|
||||
ST7735_DrawString(0, 1, "eDisk test ", ST7735_WHITE);
|
||||
UART_OutString("\n\rECE445M, Lab 4 eDisk test\n\rTestmain1\n\r");
|
||||
result = eDisk_Init(0); // initialize disk
|
||||
if(result) diskError("eDisk_Init",result);
|
||||
UART_OutString("Writing blocks\n\r");
|
||||
M = 1; // seed
|
||||
for(block = 0; block < MAXBLOCKS; block++){
|
||||
for(i=0;i<512;i++){
|
||||
buffer[i] = Random8();
|
||||
}
|
||||
SetPA8(); // PA8 high for 100 block writes
|
||||
if(eDisk_WriteBlock(buffer,block))diskError("eDisk_WriteBlock",block); // save to disk
|
||||
ClrPA8();
|
||||
}
|
||||
UART_OutString("Reading blocks\n\r");
|
||||
M = 1; // reseed, start over to get the same sequence
|
||||
for(block = 0; block < MAXBLOCKS; block++){
|
||||
SetPA9(); // PA9 high for one block read
|
||||
if(eDisk_ReadBlock(buffer,block))diskError("eDisk_ReadBlock",block); // read from disk
|
||||
ClrPA9();
|
||||
for(i=0;i<512;i++){
|
||||
n = Random8(); // same pseudo random sequence
|
||||
if(buffer[i] != (0xFF&n)){
|
||||
UART_OutString("Read data not correct, block="); UART_OutUDec(block);
|
||||
UART_OutString(", i="); UART_OutUDec(i);
|
||||
UART_OutString(", expected "); UART_OutUDec(0xFF&n);
|
||||
UART_OutString(", read "); UART_OutUDec(buffer[i]);
|
||||
UART_OutString("\n\r");
|
||||
OS_Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
UART_OutString("Successful test of 100 blocks\n\r");
|
||||
ST7735_DrawString(0, 1, "eDisk successful", ST7735_YELLOW);
|
||||
Running = 0; // allow launch again
|
||||
OS_Kill();
|
||||
}
|
||||
|
||||
void StartTestDisk(void){
|
||||
if(Running==0){
|
||||
Running = 1; // prevents you from starting two test threads
|
||||
NumCreated += OS_AddThread(&TestDisk,128,1); // test eDisk
|
||||
}
|
||||
}
|
||||
|
||||
int Testmain1(void){ // Testmain1
|
||||
OS_Init(); // initialize, disable interrupts
|
||||
// OS_AddDevices(1,1,0); // attach printf to UART0, allow ST7735, not eFile
|
||||
Logic_Init();
|
||||
Running = 1;
|
||||
|
||||
// attach background tasks
|
||||
OS_AddPeriodicThread(&disk_timerproc,1,0); // time out routines for disk
|
||||
OS_AddS2Task(&StartTestDisk,1);
|
||||
OS_AddPA28Task(&StartTestDisk,1);
|
||||
|
||||
// create initial foreground threads
|
||||
NumCreated = 0 ;
|
||||
NumCreated += OS_AddThread(&TestDisk,128,1);
|
||||
NumCreated += OS_AddThread(&VirusDetector,128,3);
|
||||
|
||||
OS_Launch(TIME_2MS); // doesn't return, interrupts enabled in here
|
||||
return 0; // this never executes
|
||||
}
|
||||
|
||||
|
||||
//*******************Measurement of context switch time**********
|
||||
// Run this to measure the time it takes to perform a task switch
|
||||
// UART0 not needed
|
||||
// SYSTICK interrupts, period established by OS_Launch
|
||||
// first timer not needed
|
||||
// second timer not needed
|
||||
// S1 not needed,
|
||||
// S2 not needed
|
||||
// logic analyzer on PB22 for systick interrupt (in your OS)
|
||||
// on PA8 to measure context switch time
|
||||
void ThreadCS(void){ // only thread running
|
||||
while(1){
|
||||
TogglePA8(); // toggle PA8
|
||||
}
|
||||
}
|
||||
int TestmainCS(void){ // TestmainCS
|
||||
Logic_Init();
|
||||
OS_Init(); // initialize, disable interrupts
|
||||
NumCreated = 0 ;
|
||||
NumCreated += OS_AddThread(&ThreadCS,128,0);
|
||||
OS_Launch(TIME_1MS/10); // 100us, doesn't return, interrupts enabled in here
|
||||
return 0; // this never executes
|
||||
}
|
||||
|
||||
|
||||
//*****************Test project 2*************************
|
||||
// Filesystem test.
|
||||
// Warning: this reformats the disk, all existing data will be lost
|
||||
void PrintDirectory(void){ char *name; unsigned long size;
|
||||
unsigned int num;
|
||||
unsigned long total;
|
||||
num = 0;
|
||||
total = 0;
|
||||
UART_OutString("\n\r");
|
||||
if(eFile_DOpen("")) diskError("eFile_DOpen",0);
|
||||
while(!eFile_DirNext(&name, &size)){
|
||||
UART_OutString("Filename = "); UART_OutString(name); UART_OutString(" ");
|
||||
UART_OutString("Size (bytes)= "); UART_OutUDec(size); UART_OutString("\n\r");
|
||||
total = total+size;
|
||||
num++;
|
||||
}
|
||||
UART_OutString("Number of Files = "); UART_OutUDec(num); UART_OutString("\n\r");
|
||||
UART_OutString("Number of Bytes = "); UART_OutUDec(total); UART_OutString("\n\r");
|
||||
if(eFile_DClose()) diskError("eFile_DClose",0);
|
||||
}
|
||||
void TestFile(void){ int i; char data; int status;
|
||||
UART_OutString("\n\rECE445M Lab 4 eFile test 2\n\r");
|
||||
ST7735_DrawString(0, 1, "eFile test 2 ", ST7735_WHITE);
|
||||
// simple test of eFile
|
||||
if(eFile_Init()) diskError("eFile_Init",0);
|
||||
if(eFile_Format()) diskError("eFile_Format",0);
|
||||
if(eFile_Mount()) diskError("eFile_Mount",0);
|
||||
PrintDirectory();
|
||||
if(eFile_Create("file1")) diskError("eFile_Create",0);
|
||||
if(eFile_WOpen("file1")) diskError("eFile_WOpen",0);
|
||||
for(i=5; i<=15; i++){
|
||||
eFile_WriteString("Testmain2\tabcdefghijklmnopqrstuvwxyz\t");
|
||||
eFile_WriteUFix2(OS_MsTime()/10); eFile_Write('\t');
|
||||
eFile_WriteUDec(i); eFile_Write('\t');
|
||||
eFile_WriteSFix2(i-10); eFile_Write('\t');
|
||||
eFile_WriteSDec(i-10); eFile_WriteString("\n\r");
|
||||
OS_Sleep(10);
|
||||
}
|
||||
if(eFile_WClose()) diskError("eFile_WClose",0);
|
||||
PrintDirectory();
|
||||
|
||||
if(eFile_ROpen("file1")) diskError("eFile_ROpen",0);
|
||||
do{
|
||||
status = eFile_ReadNext(&data);
|
||||
if(status == 0) UART_OutChar(data);
|
||||
}while(status==0);
|
||||
if(eFile_RClose()) diskError("eFile_RClose",0);
|
||||
if(eFile_Delete("file1")) diskError("eFile_Delete",0);
|
||||
PrintDirectory();
|
||||
if(eFile_Unmount()) diskError("eFile_Unmount",0);
|
||||
UART_OutString("Successful test\n\r");
|
||||
ST7735_DrawString(0, 1, "eFile successful", ST7735_YELLOW);
|
||||
Running=0; // launch again
|
||||
OS_Kill();
|
||||
}
|
||||
|
||||
void StartFileTest(void){
|
||||
if(Running==0){
|
||||
Running = 1; // prevents you from starting two test threads
|
||||
NumCreated += OS_AddThread(&TestFile,128,1); // test eFile
|
||||
}
|
||||
}
|
||||
|
||||
int Testmain2(void){ // Testmain2
|
||||
OS_Init(); // initialize, disable interrupts
|
||||
Logic_Init();
|
||||
Running = 1;
|
||||
|
||||
// attach background tasks
|
||||
OS_AddPeriodicThread(&disk_timerproc,1,0); // time out routines for disk
|
||||
OS_AddS2Task(&StartFileTest,1);
|
||||
OS_AddPA28Task(&StartFileTest,1);
|
||||
|
||||
// create initial foreground threads
|
||||
NumCreated = 0 ;
|
||||
NumCreated += OS_AddThread(&TestFile,128,1);
|
||||
NumCreated += OS_AddThread(&VirusDetector,128,3);
|
||||
|
||||
OS_Launch(TIME_2MS); // doesn't return, interrupts enabled in here
|
||||
return 0; // this never executes
|
||||
}
|
||||
|
||||
void PrintFile3(char *pt){int status; char data;
|
||||
OS_bWait(&LCDFree);
|
||||
eFile_ROpen(pt);
|
||||
do{
|
||||
status = eFile_ReadNext(&data);
|
||||
if(status == 0) UART_OutChar(data);
|
||||
}while(status==0);
|
||||
eFile_RClose();
|
||||
OS_bSignal(&LCDFree);
|
||||
}
|
||||
void Dump3(uint32_t run,int32_t data){
|
||||
SetPA8();
|
||||
OS_bWait(&LCDFree);
|
||||
eFile_WriteString("Testmain3\tabcdefghijklmnopqrstuvwxyz\t");
|
||||
eFile_WriteUFix2(OS_MsTime()/10); eFile_Write('\t');
|
||||
eFile_WriteUDec(run); eFile_Write('\t');
|
||||
eFile_WriteSFix2(data); eFile_Write('\t');
|
||||
eFile_WriteSDec(data); eFile_WriteString("\n\r");
|
||||
OS_bSignal(&LCDFree);
|
||||
ClrPA8();
|
||||
}
|
||||
//*****************Test project 3*************************
|
||||
// Filesystem stream test.
|
||||
// Warning: this reformats the disk, all existing data will be lost
|
||||
uint32_t Run3=0;
|
||||
void TestFile3(void){ int i; char data;
|
||||
UART_OutString("\n\rECE445M Lab 4 eFile test 3\n\r");
|
||||
ST7735_Message(0,1,"eFile test 3", Run3);
|
||||
// test of eFile
|
||||
|
||||
PrintDirectory();
|
||||
OS_bWait(&LCDFree);
|
||||
eFile_Create(FileName);
|
||||
eFile_WOpen(FileName);
|
||||
OS_bSignal(&LCDFree);
|
||||
for(i=-5; i<=5; i++){
|
||||
Dump3(Run3,i);
|
||||
Run3++;
|
||||
OS_Sleep(10);
|
||||
}
|
||||
OS_bWait(&LCDFree);
|
||||
eFile_WClose();
|
||||
OS_bSignal(&LCDFree);
|
||||
PrintDirectory();
|
||||
PrintFile3(FileName);
|
||||
UART_OutString("Successful test 3, Run3="); UART_OutUDec(Run3);
|
||||
UART_OutString("\n\r");
|
||||
ST7735_Message(0,2,"Run3 =",Run3);
|
||||
|
||||
Running = 0; // allowed to launch again
|
||||
FileName[5] = (FileName[5]+1)&0xF7; // 0 to 7
|
||||
|
||||
OS_Kill();
|
||||
}
|
||||
void Chaos3(void){
|
||||
ST7735_Message(1,0,"Chaos",3);
|
||||
while(1){
|
||||
for(int l=1; l<5; l++){
|
||||
ST7735_Message(1,l,"n =",Random8());
|
||||
}
|
||||
OS_Sleep(100);
|
||||
}
|
||||
}
|
||||
void StartFileTest3(void){
|
||||
if(Running==0){
|
||||
Running = 1; // prevents you from starting two test threads
|
||||
NumCreated += OS_AddThread(&TestFile3,128,1); // test eFile
|
||||
}
|
||||
}
|
||||
|
||||
int Testmain3(void){ // Testmain3
|
||||
OS_Init(); // initialize, disable interrupts
|
||||
Logic_Init();
|
||||
Running = 1;
|
||||
OS_InitSemaphore(&LCDFree, 1);
|
||||
|
||||
// attach background tasks
|
||||
OS_AddPeriodicThread(&disk_timerproc,1,0); // time out routines for disk
|
||||
OS_AddS2Task(&StartFileTest3,1);
|
||||
OS_AddPA28Task(&StartFileTest3,1);
|
||||
|
||||
// create initial foreground threads
|
||||
NumCreated = 0 ;
|
||||
NumCreated += OS_AddThread(&TestFile3,128,1);
|
||||
NumCreated += OS_AddThread(&Chaos3,128,1);
|
||||
NumCreated += OS_AddThread(&VirusDetector,128,3);
|
||||
|
||||
if(eFile_Init()) diskError("eFile_Init",0);
|
||||
if(eFile_Format()) diskError("eFile_Format",0);
|
||||
if(eFile_Mount()) diskError("eFile_Mount",0);
|
||||
|
||||
OS_Launch(TIME_2MS); // doesn't return, interrupts enabled in here
|
||||
return 0; // this never executes
|
||||
}
|
||||
|
||||
|
||||
//*******************Trampoline for selecting which main to execute**********
|
||||
int main(void) { // main
|
||||
__disable_irq();
|
||||
Clock_Init80MHz(0); // no clock out to pin
|
||||
LaunchPad_Init(); // LaunchPad_Init must be called once and before other I/O initializations
|
||||
realmain();
|
||||
}
|
||||
|
||||
|
||||
67
RTOS_Lab4_FileSystem/mspm0g3507.cmd
Executable file
67
RTOS_Lab4_FileSystem/mspm0g3507.cmd
Executable file
@@ -0,0 +1,67 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*****************************************************************************/
|
||||
-uinterruptVectors
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (RX) : origin = 0x00000000, length = 0x00020000
|
||||
SRAM (RWX) : origin = 0x20200000, length = 0x00008000
|
||||
BCR_CONFIG (R) : origin = 0x41C00000, length = 0x00000080
|
||||
BSL_CONFIG (R) : origin = 0x41C00100, length = 0x00000080
|
||||
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.intvecs: > 0x00000000
|
||||
.text : palign(8) {} > FLASH
|
||||
.const : palign(8) {} > FLASH
|
||||
.cinit : palign(8) {} > FLASH
|
||||
.pinit : palign(8) {} > FLASH
|
||||
.rodata : palign(8) {} > FLASH
|
||||
.ARM.exidx : palign(8) {} > FLASH
|
||||
.init_array : palign(8) {} > FLASH
|
||||
.binit : palign(8) {} > FLASH
|
||||
.TI.ramfunc : load = FLASH, palign(8), run=SRAM, table(BINIT)
|
||||
|
||||
.vtable : > SRAM
|
||||
.args : > SRAM
|
||||
.data : > SRAM
|
||||
.bss : > SRAM
|
||||
.sysmem : > SRAM
|
||||
.stack : > SRAM (HIGH)
|
||||
|
||||
.BCRConfig : {} > BCR_CONFIG
|
||||
.BSLConfig : {} > BSL_CONFIG
|
||||
}
|
||||
22
RTOS_Lab4_FileSystem/targetConfigs/MSPM0G3507.ccxml
Normal file
22
RTOS_Lab4_FileSystem/targetConfigs/MSPM0G3507.ccxml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<configurations XML_version="1.2" id="configurations_0">
|
||||
<configuration XML_version="1.2" id="configuration_0">
|
||||
<instance XML_version="1.2" desc="Texas Instruments XDS110 USB Debug Probe" href="connections/TIXDS110_Connection.xml" id="Texas Instruments XDS110 USB Debug Probe" xml="TIXDS110_Connection.xml" xmlpath="connections"/>
|
||||
<connection XML_version="1.2" id="Texas Instruments XDS110 USB Debug Probe">
|
||||
<instance XML_version="1.2" href="drivers/tixds510cs_dap.xml" id="drivers" xml="tixds510cs_dap.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds510cortexM0.xml" id="drivers" xml="tixds510cortexM0.xml" xmlpath="drivers"/>
|
||||
<instance XML_version="1.2" href="drivers/tixds510sec_ap.xml" id="drivers" xml="tixds510sec_ap.xml" xmlpath="drivers"/>
|
||||
<property Type="choicelist" Value="1" id="The JTAG TCLK Frequency (MHz)">
|
||||
<choice Name="Fixed with user specified value" value="SPECIFIC">
|
||||
<property Type="stringfield" Value="1MHz" id="-- Enter a value from 100.0kHz to 2.5MHz"/>
|
||||
</choice>
|
||||
</property>
|
||||
<property Type="choicelist" Value="2" id="SWD Mode Settings">
|
||||
<choice Name="SWD Mode - Aux COM port is target TDO pin" value="nothing"/>
|
||||
</property>
|
||||
<platform XML_version="1.2" id="platform_0">
|
||||
<instance XML_version="1.2" desc="MSPM0G3507" href="devices/MSPM0G3507.xml" id="MSPM0G3507" xml="MSPM0G3507.xml" xmlpath="devices"/>
|
||||
</platform>
|
||||
</connection>
|
||||
</configuration>
|
||||
</configurations>
|
||||
9
RTOS_Lab4_FileSystem/targetConfigs/readme.txt
Normal file
9
RTOS_Lab4_FileSystem/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.
|
||||
201
RTOS_Lab4_FileSystem/ticlang/startup_mspm0g3507_ticlang.c
Normal file
201
RTOS_Lab4_FileSystem/ticlang/startup_mspm0g3507_ticlang.c
Normal file
@@ -0,0 +1,201 @@
|
||||
/*****************************************************************************
|
||||
Special MSPM0_ValvanoWare version with Hardfault handler implemented
|
||||
Jonathan Valvano 12/19/2024
|
||||
|
||||
Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
Neither the name of Texas Instruments Incorporated nor the names of
|
||||
its contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ti/devices/msp/msp.h>
|
||||
|
||||
/* Linker variable that marks the top of the stack. */
|
||||
extern unsigned long __STACK_END;
|
||||
|
||||
/* External declaration for the reset handler that is to be called when the */
|
||||
/* processor is started */
|
||||
extern __NO_RETURN void __PROGRAM_START(void);
|
||||
|
||||
/* Forward declaration of the default fault handlers. */
|
||||
void Default_Handler (void) __attribute__((weak));
|
||||
void HardFault_Handler (void) __attribute__((weak));
|
||||
extern void Reset_Handler (void) __attribute__((weak));
|
||||
|
||||
/* Processor Exceptions */
|
||||
extern void NMI_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SVC_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void PendSV_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SysTick_Handler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
|
||||
/* Device Specific Interrupt Handlers */
|
||||
extern void GROUP0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void GROUP1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG8_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART3_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void ADC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void ADC1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void CANFD0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void DAC0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SPI0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void SPI1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART2_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void UART0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG6_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMA0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMA1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG7_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void TIMG12_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void I2C0_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void I2C1_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void AES_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void RTC_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
extern void DMA_IRQHandler (void) __attribute__((weak, alias("Default_Handler")));
|
||||
|
||||
|
||||
/* Interrupt vector table. Note that the proper constructs must be placed on this to */
|
||||
/* ensure that it ends up at physical address 0x0000.0000 or at the start of */
|
||||
/* the program if located at a start address other than 0. */
|
||||
#if defined (__ARM_ARCH) && (__ARM_ARCH != 0)
|
||||
void (* const interruptVectors[])(void) __attribute((used)) __attribute__((section (".intvecs"))) =
|
||||
#elif defined (__TI_ARM__)
|
||||
#pragma RETAIN(interruptVectors)
|
||||
#pragma DATA_SECTION(interruptVectors, ".intvecs")
|
||||
void (* const interruptVectors[])(void) =
|
||||
#else
|
||||
#error "Compiler not supported"
|
||||
#endif
|
||||
{
|
||||
(void (*)(void))((uint32_t)&__STACK_END),
|
||||
/* The initial stack pointer */
|
||||
Reset_Handler, /* The reset handler */
|
||||
NMI_Handler, /* The NMI handler */
|
||||
HardFault_Handler, /* The hard fault handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
SVC_Handler, /* SVCall handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
PendSV_Handler, /* The PendSV handler */
|
||||
SysTick_Handler, /* SysTick handler */
|
||||
GROUP0_IRQHandler, /* GROUP0 interrupt handler */
|
||||
GROUP1_IRQHandler, /* GROUP1 interrupt handler */
|
||||
TIMG8_IRQHandler, /* TIMG8 interrupt handler */
|
||||
UART3_IRQHandler, /* UART3 interrupt handler */
|
||||
ADC0_IRQHandler, /* ADC0 interrupt handler */
|
||||
ADC1_IRQHandler, /* ADC1 interrupt handler */
|
||||
CANFD0_IRQHandler, /* CANFD0 interrupt handler */
|
||||
DAC0_IRQHandler, /* DAC0 interrupt handler */
|
||||
0, /* Reserved */
|
||||
SPI0_IRQHandler, /* SPI0 interrupt handler */
|
||||
SPI1_IRQHandler, /* SPI1 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
UART1_IRQHandler, /* UART1 interrupt handler */
|
||||
UART2_IRQHandler, /* UART2 interrupt handler */
|
||||
UART0_IRQHandler, /* UART0 interrupt handler */
|
||||
TIMG0_IRQHandler, /* TIMG0 interrupt handler */
|
||||
TIMG6_IRQHandler, /* TIMG6 interrupt handler */
|
||||
TIMA0_IRQHandler, /* TIMA0 interrupt handler */
|
||||
TIMA1_IRQHandler, /* TIMA1 interrupt handler */
|
||||
TIMG7_IRQHandler, /* TIMG7 interrupt handler */
|
||||
TIMG12_IRQHandler, /* TIMG12 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
I2C0_IRQHandler, /* I2C0 interrupt handler */
|
||||
I2C1_IRQHandler, /* I2C1 interrupt handler */
|
||||
0, /* Reserved */
|
||||
0, /* Reserved */
|
||||
AES_IRQHandler, /* AES interrupt handler */
|
||||
0, /* Reserved */
|
||||
RTC_IRQHandler, /* RTC interrupt handler */
|
||||
DMA_IRQHandler, /* DMA interrupt handler */
|
||||
|
||||
};
|
||||
|
||||
/* Forward declaration of the default fault handlers. */
|
||||
/* This is the code that gets called when the processor first starts execution */
|
||||
/* following a reset event. Only the absolutely necessary set is performed, */
|
||||
/* after which the application supplied entry() routine is called. Any fancy */
|
||||
/* actions (such as making decisions based on the reset cause register, and */
|
||||
/* resetting the bits in that register) are left solely in the hands of the */
|
||||
/* application. */
|
||||
void Reset_Handler(void)
|
||||
{
|
||||
/* Jump to the ticlang C Initialization Routine. */
|
||||
__asm(" .global _c_int00\n"
|
||||
" b _c_int00");
|
||||
}
|
||||
// fetch the PC that triggered the hard fault
|
||||
// message in a bottle
|
||||
void HardFault_Handler(void) {
|
||||
__asm(" MOV R7,SP\n" // this code prevents a hardfault within the hardfault handler
|
||||
" LDR R4,=0x20200000\n" // start of RAM
|
||||
" CMP R7,R4\n"
|
||||
" BLO fault\n" // skip if bad SP
|
||||
" LDR R5,=0x20207FE0\n" // end of RAM-32
|
||||
" CMP R7,R5\n"
|
||||
" BHI fault\n" // skip if bad SP
|
||||
" LDR R6,[SP,#24]\n" // R6=previous PC
|
||||
"fault:");
|
||||
while (1) {
|
||||
// option 1) if SP points to valid RAM (0x20200000 to 0x20207FFC)
|
||||
// then R6 has PC that caused the fault
|
||||
// option 2) if SP is not 0x20200000 to 0x20207FFC then there was a stack overflow
|
||||
// if you're here, you had a hardfault
|
||||
}
|
||||
}
|
||||
/* This is the code that gets called when the processor receives an unexpected */
|
||||
/* interrupt. This simply enters an infinite loop, preserving the system state */
|
||||
/* for examination by a debugger. */
|
||||
void Default_Handler(void)
|
||||
{
|
||||
__asm(" MOV R7,SP\n"
|
||||
" LDR R4,=0x20200000\n"
|
||||
" CMP R7,R4\n"
|
||||
" BLO dfault\n" // bad SP
|
||||
" LDR R5,=0x20207FE0\n"
|
||||
" CMP R7,R5\n"
|
||||
" BHI fault\n" // bad SP
|
||||
" LDR R6,[SP,#24]\n" // previous PC
|
||||
"dfault:");
|
||||
/* Enter an infinite loop. */
|
||||
while(1){
|
||||
// R6 has value of the PC when the interrupt was triggered
|
||||
// you are here probably because you armed an interrupt, but mistyped the ISR name
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user