diff --git a/.ccsproject b/.ccsproject new file mode 100644 index 0000000..2ccc630 --- /dev/null +++ b/.ccsproject @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..b341255 --- /dev/null +++ b/.cproject @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c231435 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +/Debug/ +/FLASH/ +/RAM/ +/__DBG_FLASH/ +/__DBG_RAM/ + +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp +*.list +*.lst + +# Precompiled Headers +*.gch +*.pch + +# Libraries +# *.lib +# *.a +# *.la +# *.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +# *.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +# *.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +/Debug__opt_for_speed__0/ +/Debug__opt_for_speed__1/ +/Debug__opt_for_speed__2/ +/Debug__opt_for_speed__3/ +/Debug__opt_for_speed__4/ +/Debug__opt_for_speed__5/ diff --git a/.launches/F280025_ProjectTemplate.launch b/.launches/F280025_ProjectTemplate.launch new file mode 100644 index 0000000..b7dd20f --- /dev/null +++ b/.launches/F280025_ProjectTemplate.launch @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..085d129 --- /dev/null +++ b/.project @@ -0,0 +1,54 @@ + + + F280025_ProjectTemplate + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.ti.ccstudio.core.ccsNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + _TI_common_include + 2 + COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR/device_support/f28002x/common/include + + + _TI_common_source + 2 + COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR/device_support/f28002x/common/source + + + _TI_driverlib + 2 + COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR/driverlib/f28002x/driverlib + + + _TI_headers_include + 2 + COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR/device_support/f28002x/headers/include + + + _TI_headers_source + 2 + COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR/device_support/f28002x/headers/source + + + diff --git a/.settings/org.eclipse.cdt.codan.core.prefs b/.settings/org.eclipse.cdt.codan.core.prefs new file mode 100644 index 0000000..64bb653 --- /dev/null +++ b/.settings/org.eclipse.cdt.codan.core.prefs @@ -0,0 +1,75 @@ +eclipse.preferences.version=1 +inEditor=false +onBuild=false +org.eclipse.cdt.codan.checkers.errnoreturn=Warning +org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false} +org.eclipse.cdt.codan.checkers.errreturnvalue=Error +org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"} +org.eclipse.cdt.codan.checkers.nocommentinside=-Error +org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"} +org.eclipse.cdt.codan.checkers.nolinecomment=-Error +org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"} +org.eclipse.cdt.codan.checkers.noreturn=Error +org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false} +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"} +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"} +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"} +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"} +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false} +org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning +org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"} +org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning +org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true} +org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem=Error +org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"} +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error +org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"} +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"} +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"} +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"} +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"} +org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error +org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"} +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"} +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"} +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"} +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"} +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false} +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false} +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")} +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"} diff --git a/.settings/org.eclipse.cdt.debug.core.prefs b/.settings/org.eclipse.cdt.debug.core.prefs new file mode 100644 index 0000000..2adc7b1 --- /dev/null +++ b/.settings/org.eclipse.cdt.debug.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..bab329b --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,35 @@ +eclipse.preferences.version=1 +encoding//__DBG_FLASH/User_Src/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/User_Src/subdir_vars.mk=UTF-8 +encoding//__DBG_FLASH/_TI_common_source/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/_TI_common_source/subdir_vars.mk=UTF-8 +encoding//__DBG_FLASH/_TI_driverlib/ccs/Debug/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/_TI_driverlib/ccs/Debug/subdir_vars.mk=UTF-8 +encoding//__DBG_FLASH/_TI_driverlib/ccs/Release/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/_TI_driverlib/ccs/Release/subdir_vars.mk=UTF-8 +encoding//__DBG_FLASH/_TI_driverlib/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/_TI_driverlib/subdir_vars.mk=UTF-8 +encoding//__DBG_FLASH/_TI_headers_source/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/_TI_headers_source/subdir_vars.mk=UTF-8 +encoding//__DBG_FLASH/makefile=UTF-8 +encoding//__DBG_FLASH/objects.mk=UTF-8 +encoding//__DBG_FLASH/sources.mk=UTF-8 +encoding//__DBG_FLASH/subdir_rules.mk=UTF-8 +encoding//__DBG_FLASH/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/User_Src/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/User_Src/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/_TI_common_source/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/_TI_common_source/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/_TI_driverlib/ccs/Debug/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/_TI_driverlib/ccs/Debug/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/_TI_driverlib/ccs/Release/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/_TI_driverlib/ccs/Release/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/_TI_driverlib/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/_TI_driverlib/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/_TI_headers_source/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/_TI_headers_source/subdir_vars.mk=UTF-8 +encoding//__DBG_RAM/makefile=UTF-8 +encoding//__DBG_RAM/objects.mk=UTF-8 +encoding//__DBG_RAM/sources.mk=UTF-8 +encoding//__DBG_RAM/subdir_rules.mk=UTF-8 +encoding//__DBG_RAM/subdir_vars.mk=UTF-8 diff --git a/.settings/org.eclipse.ltk.core.refactoring.prefs b/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..b196c64 --- /dev/null +++ b/.settings/org.eclipse.ltk.core.refactoring.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/28002x_generic_flash_lnk.cmd b/28002x_generic_flash_lnk.cmd new file mode 100644 index 0000000..43bdcdc --- /dev/null +++ b/28002x_generic_flash_lnk.cmd @@ -0,0 +1,110 @@ +MEMORY +{ + BEGIN : origin = 0x080000, length = 0x000002 + BOOT_RSVD : origin = 0x00000002, length = 0x00000126 + RAMM0 : origin = 0x00000128, length = 0x000002D8 + RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */ +// RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + +/* RAMLS4 : origin = 0x0000A000, length = 0x00000800 + RAMLS5 : origin = 0x0000A800, length = 0x00000800 + RAMLS6 : origin = 0x0000B000, length = 0x00000800 + RAMLS7 : origin = 0x0000B800, length = 0x00000800*/ + + /* Combining all the LS RAMs */ + RAMLS4567 : origin = 0x0000A000, length = 0x00002000 + RAMGS0 : origin = 0x0000C000, length = 0x000007F8 +// RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + + +// FLASHBANK1 : origin = 0x00080000, length = 0x0000FFF0 +// FLASH_BANK1_RSVD : origin = 0x0008FFF0, length = 0x00000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + BOOTROM : origin = 0x003F0000, length = 0x00008000 + BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0 + RESET : origin = 0x003FFFC0, length = 0x00000002 + /* Flash sectors */ + /* BANK 0 */ + FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */ + FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */ + FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0 /* on-chip Flash */ +// FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + +} + + +SECTIONS +{ + codestart : > BEGIN, ALIGN(8) + .text : >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4, ALIGN(8) + .cinit : > FLASH_BANK0_SEC1, ALIGN(8) + .switch : > FLASH_BANK0_SEC1, ALIGN(8) + .reset : > RESET, TYPE = DSECT /* not used, */ + + .stack : > RAMM1 + + .init_array : > FLASH_BANK0_SEC1, ALIGN(8) + .bss : > RAMLS4567 + .bss:output : > RAMLS4567 + .bss:cio : > RAMGS0 + .const : > FLASH_BANK0_SEC1, ALIGN(8) + .data : > RAMLS4567 + .sysmem : > RAMLS4567 + + ramgs0 : > RAMGS0 + + /* Allocate IQ math areas: */ + IQmath : > RAMLS4567 + IQmathTables : > RAMLS4567 + + /* FPUmathTables used by rts2800_fpu32_fast_supplement_eabi.lib for its LUT implementation */ + FPUmathTables : LOAD = FLASH_BANK0_SEC5, + RUN = RAMLS4567, + RUN_START(FPUmathTablesRunStart), + LOAD_START(FPUmathTablesLoadStart), + LOAD_SIZE(FPUmathTablesLoadSize), + ALIGN(2) + + .TI.ramfunc : LOAD = FLASH_BANK0_SEC6, + RUN = RAMGS0, + LOAD_START(RamfuncsLoadStart), + LOAD_SIZE(RamfuncsLoadSize), + LOAD_END(RamfuncsLoadEnd), + RUN_START(RamfuncsRunStart), + RUN_SIZE(RamfuncsRunSize), + RUN_END(RamfuncsRunEnd), + ALIGN(8) + PAGE = 0 + { + /* 1. These function will be implemented by rts2800_fpu32_fast_supplement_eabi.lib instead of rts2800_fpu32_eabi.lib */ + --library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + --library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + --library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + --library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + --library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + + /* 2. These function will be replaced by TMU hardware instructions if --fp_mode = relaxed */ + //--library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + //--library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + //--library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + //--library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + //--library=rts2800_fpu32_fast_supplement_eabi.lib (.text) + } +} +/* +//=========================================================================== +// End of file. +//=========================================================================== +*/ diff --git a/28002x_generic_ram_lnk.cmd b/28002x_generic_ram_lnk.cmd new file mode 100644 index 0000000..42fc2bb --- /dev/null +++ b/28002x_generic_ram_lnk.cmd @@ -0,0 +1,84 @@ +MEMORY +{ + BEGIN : origin = 0x000000, length = 0x000002 + BOOT_RSVD : origin = 0x00000002, length = 0x00000126 + RAMM0 : origin = 0x00000128, length = 0x000002D8 + RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */ +// RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + +/* RAMLS4 : origin = 0x0000A000, length = 0x00000800 + RAMLS5 : origin = 0x0000A800, length = 0x00000800 + RAMLS6 : origin = 0x0000B000, length = 0x00000800 + RAMLS7 : origin = 0x0000B800, length = 0x00000800 */ + + /* Combining all the LS RAMs */ + RAMLS4567 : origin = 0x0000A000, length = 0x00002000 + RAMGS0 : origin = 0x0000C000, length = 0x000007F8 +// RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + + RESET : origin = 0x003FFFC0, length = 0x00000002 + + // FLASHBANK1 : origin = 0x00080000, length = 0x00010000 + /* Flash sectors */ + /* BANK 0 */ + FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE + FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 + FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 + FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 + FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 + FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 + FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 + FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 + FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 + FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 + FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 + FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 + FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 + FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 + FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 + FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF8 +// FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ + + BOOTROM : origin = 0x003F0000, length = 0x00008000 + BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0 +} + + +SECTIONS +{ + .text : > RAMLS4567 | RAMGS0 + .TI.ramfunc : > RAMM0 + .cinit : > RAMM0 + .switch : > RAMM0 + .reset : > RESET, TYPE = DSECT /* not used, */ + .cio : > RAMGS0 + codestart : > BEGIN + + .stack : > RAMM1 +#if defined(__TI_EABI__) + .bss : > RAMLS4567 + .bss:output : > RAMLS4567 + .init_array : > RAMM0 + .const : > RAMGS0 + .data : > RAMLS4567 | RAMGS0 + .sysmem : > RAMLS4567 +#else + .pinit : > RAMM0 + .ebss : > RAMLS4567 + .econst : > RAMGS0 + .esysmem : > RAMLS4567 +#endif + + ramgs0 : > RAMGS0 + + /* Allocate IQ math areas: */ + IQmath : > RAMLS4567 | RAMGS0 + IQmathTables : > RAMLS4567 | RAMGS0 + + FPUmathTables : >> RAMLS4567 | RAMGS0 +} +/* +//=========================================================================== +// End of file. +//=========================================================================== +*/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..f58c3c7 --- /dev/null +++ b/README.md @@ -0,0 +1,235 @@ +# :beers: F280025_ProjectTemplate ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/SummerFalls/F280025_ProjectTemplate?label=%E4%BB%A3%E7%A0%81%E5%A4%A7%E5%B0%8F) + +```c +/* + * ___ ___ ___ ___ + * ___ / /\ /__/| / /\ / /\ + * / /\ / /:/_ | |:| / /::\ / /:/_ + * / /:/ / /:/ /\ | |:| / /:/\:\ / /:/ /\ + * / /:/ / /:/ /:/_ __|__|:| / /:/~/::\ / /:/ /::\ + * / /::\ /__/:/ /:/ /\ /__/::::\____ /__/:/ /:/\:\ /__/:/ /:/\:\ + * /__/:/\:\ \ \:\/:/ /:/ ~\~~\::::/ \ \:\/:/__\/ \ \:\/:/~/:/ + * \__\/ \:\ \ \::/ /:/ |~~|:|~~ \ \::/ \ \::/ /:/ + * \ \:\ \ \:\/:/ | |:| \ \:\ \__\/ /:/ + * \__\/ \ \::/ | |:| \ \:\ /__/:/ + * \__\/ |__|/ \__\/ \__\/ + * ___ ___ ___ ___ ___ ___ ___ ___ + * ___ /__/\ / /\ ___ / /\ /__/\ /__/\ / /\ /__/\ ___ / /\ + * / /\ \ \:\ / /:/_ / /\ / /::\ \ \:\ | |::\ / /:/_ \ \:\ / /\ / /:/_ + * / /:/ \ \:\ / /:/ /\ / /:/ / /:/\:\ \ \:\ | |:|:\ / /:/ /\ \ \:\ / /:/ / /:/ /\ + * /__/::\ _____\__\:\ / /:/ /::\ / /:/ / /:/~/:/ ___ \ \:\ __|__|:|\:\ / /:/ /:/_ _____\__\:\ / /:/ / /:/ /::\ + * \__\/\:\__ /__/::::::::\ /__/:/ /:/\:\ / /::\ /__/:/ /:/___ /__/\ \__\:\ /__/::::| \:\ /__/:/ /:/ /\ /__/::::::::\ / /::\ /__/:/ /:/\:\ + * \ \:\/\ \ \:\~~\~~\/ \ \:\/:/~/:/ /__/:/\:\ \ \:\/:::::/ \ \:\ / /:/ \ \:\~~\__\/ \ \:\/:/ /:/ \ \:\~~\~~\/ /__/:/\:\ \ \:\/:/~/:/ + * \__\::/ \ \:\ ~~~ \ \::/ /:/ \__\/ \:\ \ \::/~~~~ \ \:\ /:/ \ \:\ \ \::/ /:/ \ \:\ ~~~ \__\/ \:\ \ \::/ /:/ + * /__/:/ \ \:\ \__\/ /:/ \ \:\ \ \:\ \ \:\/:/ \ \:\ \ \:\/:/ \ \:\ \ \:\ \__\/ /:/ + * \__\/ \ \:\ /__/:/ \__\/ \ \:\ \ \::/ \ \:\ \ \::/ \ \:\ \__\/ /__/:/ + * \__\/ \__\/ \__\/ \__\/ \__\/ \__\/ \__\/ \__\/ + */ +``` + +## :closed_book: 简介 + +基于 TI TMS320F280025(C) 的 ProjectTemplate`(工程模板)` + +## :speech_balloon: 工程模板详细说明 + +
+
+ +### 一、工程目录 + +
+ +![目录结构][目录结构] + +
+ +#### :card_file_box: **普通目录** + +- :file_folder: __DBG_FLASH + - > 在 FLASH 中调试/烧录代码时,工程编译后生成的目录,打包工程时,本目录可删除,并且本目录不受 Git 版本管理控制 +- :file_folder: __DBG_RAM + - > 在 RAM 中调试代码时,工程编译后生成的目录,打包工程时,本目录可删除,并且本目录不受 Git 版本管理控制 +- :file_folder: \_\_Docs\_\_ + - > 本目录仅用来存放工程说明相关文档或图片 +- :file_folder: User_Src + - > **本目录存放工程维护人员自行编写的源代码文件,跟 TI 库源文件目录进行区分** +- :file_folder: targetConfigs + - > 本目录存放目标配置文件(烧录器设置……) + +#### :card_file_box: **链接目录** + +> 如上图所示,以下目录为 `链接目录`,在工程所在的硬盘根目录下不可见,但在 IDE 环境中,可见以下目录左侧为“带有一个小箭头的文件夹图标”,意为 `Linked Folder` 之意,好处在于采用相对路径的方式,工程调用的 C2000WARE 库文件不受 C2000WARE 软件的安装位置所影响,解决同一工程拷贝到不同人的电脑上可能编译报错等问题。同时,这也极大方便了 C2000WARE 库版本的无缝切换。 +> +> :warning: **注意:** +> +> 1. 凡是 `链接目录` 下的代码文件,其真实的硬盘路径不在工程的目录下,而位于 C2000WARE 的安装目录下,其本质是 `库文件`,所以 **不得修改!** 请知悉。 +> 2. 以下 `链接目录` 的命名前缀采用 `_TI_`,好处在于在 IDE 开发环境中这几个库文件夹的排序位于 IDE 工程目录树的上方,方便与工程维护人员的业务代码目录(`User_Src\..`)区分开来。 +> 3. 本工程模板同时加入了 `位域库` 和 `DriverLib库`。对于实时性要求很高的场合,例如定时器中断,可以使用 `位域库`;对于实时性要求低的场合,例如外设初始化,可以使用 `DriverLib库`。这样做的目的是为了在代码效率和代码可读性、可维护性之间取得最佳的平衡。 + +- :file_folder: \_TI_common_include + - `COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR\device_support\f28002x\common\include` +- :file_folder: \_TI_common_source + - `COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR\device_support\f28002x\common\source` +- :file_folder: \_TI_driverlib + - `COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR\driverlib\f28002x\driverlib` +- :file_folder: \_TI_headers_include + - `COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR\device_support\f28002x\headers\include` +- :file_folder: \_TI_headers_source + - `COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR\device_support\f28002x\headers\source` + +
+
+ +### 二、部分关键工程文件 + +
+
+ +- :gear: TMS320F280025C.ccxml + - > 目标配置文件(烧录器设置……) +- :construction: 28002x_generic_ram_lnk.cmd + - > 工程链接文件 - RAM 调试模式 +- :construction: 28002x_generic_flash_lnk.cmd + - > 工程链接文件 - FLASH 调试/烧录模式 +- :construction: f28002x_headers_nonbios.cmd + - > `位域库` 依赖的外设地址空间映射文件 +- :page_with_curl: \.map + - > `map文件`,工程编译后产生,用于分析符号映射相关信息 + +
+
+ +### 三、静态库 + +
+ +![F28002x_三角函数库相关说明][F28002x_三角函数库相关说明] + +
+ +如上图所示,`rts2800_fpu32_eabi.lib` 为主要函数静态库,它主要提供了 C 标准库相关的库函数,覆盖范围最广,其中也包括三角函数 sin、cos 等等;而 `rts2800_fpu32_fast_supplement_eabi.lib` 则是对 `rts2800_fpu32_eabi.lib` 中部分三角函数的覆写,采用更快的 LUT 查找表方式实现;除了这两个静态库以外,`TMU 单元`则可对更小范围的三角函数进行硬件级别的支持,通过生成对应的硬件指令,以实现更快的代码执行速度和更小的代码体积。 + +- Floating Point mode (--fp_mode) = `relaxed` ---> 使能 TMU 单元 + - 此时 `rts2800_fpu32_fast_supplement_eabi.lib` 中的部分函数(如上图所示)被硬件指令集替代,通过这些硬件指令集实现的相关计算不完全符合 ISO 规范,并且会损失一些精度,但是可以有更快的执行速度以及更小的代码。 +- Floating Point mode (--fp_mode) = `strict` ---> 禁能 TMU 单元 + - 此时 `rts2800_fpu32_fast_supplement_eabi.lib` 中所有的库函数都将由 LUT 的方式实现,并且在程序链接阶段,该库将会覆盖 `rts2800_fpu32_eabi.lib` 中的同名函数(即优先被链接器链接)。 + +
+
+ +### 四、工程设置 + +
+ +![优化设置][优化设置] + +
+ +> - 优化等级 +> - 2 级优化:使能 DriverLib 函数内联、…… +> - 4 级优化:For sin32, cos32 and sincos32 on devices with limited memory、…… +> - 速度 vs. 代码尺寸优化 +> - 默认 2 级 +> - 浮点模式 +> - relaxed:使能 TMU 单元 +> - strict:关闭 TMU 单元 + +
+ +![库选择和切换][库选择和切换] + +
+ +> 在此可方便切换 `C2000WARE` 的库版本:配合`头文件包含设置(Include Options)`和`库引用设置(File Search Path)`以及工程中的`库源文件相对链接引用`,可实现无缝切换库版本并进行编译。 + +
+ +![头文件包含设置][头文件包含设置] + +
+ +> 工程头文件包含设置统一使用相对路径的方式,例如相对 `${COM_TI_C2000WARE_SOFTWARE_PACKAGE_INSTALL_DIR}/` 目录进行头文件的引用包含。 + +
+ +![库引用设置][库引用设置] + +
+ +> 与头文件包含设置类似,采用相对路径法添加 `.lib` 文件进行引用链接 +>> :warning: 注意:针对 `rts2800_fpu32_fast_supplement_eabi.lib` 和 `rts2800_fpu32_eabi.lib`,必须注意两个静态库文件的引用顺序,并且,勾选下方的 `Search libraries in priority order (--priority, -priority)` 前方的复选框以使能按顺序链接库文件。 + +
+ +![工程全局预定义宏_FLASH][工程全局预定义宏_FLASH] + +![工程全局预定义宏_RAM][工程全局预定义宏_RAM] + +
+ +> 工程全局预定义宏设置: :warning: 注意 `Configuration` 不同,预定义宏会有差别。 + +
+ +![语言设置][语言设置] + +
+ +> 部分 C 语法需要 C99 支持,故选择 C99 mode。 + +
+ +![堆栈大小设置][堆栈大小设置] + +
+ +> `堆`大小默认为空,可能需要设置一下,否则编译可能会有警告。 + +## :gear: 硬件 & 软件 需求 + +### 硬件需求 + +- TMS320F280025 Custom PCB Board +- Texas Instruments XDS100v3 USB Debug Probe + +### 软件需求 + +- Code Composer Studio 9.3.0 + +--- + +## :star: License + +MIT License + +Copyright © 2021 SummerFalls + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +[F28002x_三角函数库相关说明]: ./__Docs__/F28002x_三角函数库相关说明.png +[目录结构]: ./__Docs__/目录结构.png +[优化设置]: ./__Docs__/优化设置.png +[库选择和切换]: ./__Docs__/库选择和切换.png +[头文件包含设置]: ./__Docs__/头文件包含设置.png +[库引用设置]: ./__Docs__/库引用设置.png +[工程全局预定义宏_FLASH]: ./__Docs__/工程全局预定义宏_FLASH.png +[工程全局预定义宏_RAM]: ./__Docs__/工程全局预定义宏_RAM.png +[语言设置]: ./__Docs__/语言设置.png +[堆栈大小设置]: ./__Docs__/堆栈大小设置.png diff --git a/User_Src/User_Device.c b/User_Src/User_Device.c new file mode 100644 index 0000000..60ed0ac --- /dev/null +++ b/User_Src/User_Device.c @@ -0,0 +1,185 @@ +/* + * @ : User_Device.c + * @ : + * @ : Tomy + * @ : 20201215 + * @ 汾: V1.0 + * @ ʷ: V1.0 20201215 Summary + * + * MIT License. Copyright (c) 2021 SummerFalls. + */ + +#include "User_Device.h" +#include "driverlib.h" + +/******************************************************************************* +* @name : User_Device_Init +* @brief : Function to initialize the device. Primarily initializes system control to a +* known state by disabling the watchdog, setting up the SYSCLKOUT frequency, +* and enabling the clocks to the peripherals. +* @param : void +* @retval : void +*******************************************************************************/ +void User_Device_Init(void) +{ + // + // Disable the watchdog + // + SysCtl_disableWatchdog(); + +#ifdef _FLASH + // + // Copy FPU Math Tables from Flash to RAM + // + // The FPUmathTablesRunStart, FPUmathTablesLoadSize, and + // FPUmathTablesLoadStart symbols are created by the linker. Refer to the + // device .cmd file. + // + memcpy(&FPUmathTablesRunStart, &FPUmathTablesLoadStart, (uint32_t)&FPUmathTablesLoadSize); + + // + // Copy time critical code and flash setup code to RAM. This includes the + // following functions: InitFlash(); + // + // The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols + // are created by the linker. Refer to the device .cmd file. + // + memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize); + + // + // Call Flash Initialization to setup flash waitstates. This function must + // reside in RAM. + // + Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES); +#endif + + // + // Set up PLL control and clock dividers + // + SysCtl_setClock(DEVICE_SETCLOCK_CFG_USER); + + // + // Make sure the LSPCLK divider is set to the default (divide by 4) + // + SysCtl_setLowSpeedClock(SYSCTL_LSPCLK_PRESCALE_4); + + // + // These asserts will check that the #defines for the clock rates in + // device.h match the actual rates that have been configured. If they do + // not match, check that the calculations of DEVICE_SYSCLK_FREQ and + // DEVICE_LSPCLK_FREQ are accurate. Some examples will not perform as + // expected if these are not correct. + // + ASSERT(SysCtl_getClock(DEVICE_OSCSRC_FREQ) == DEVICE_SYSCLK_FREQ); + ASSERT(SysCtl_getLowSpeedClock(DEVICE_OSCSRC_FREQ) == DEVICE_LSPCLK_FREQ); + +#ifndef _FLASH + // + // Call Device_cal function when run using debugger + // This function is called as part of the Boot code. The function is called + // in the Device_init function since during debug time resets, the boot code + // will not be executed and the gel script will reinitialize all the + // registers and the calibrated values will be lost. + // Sysctl_deviceCal is a wrapper function for Device_Cal + // + SysCtl_deviceCal(); +#endif + + // + // Turn on all peripherals + // + User_Device_enableAllPeripherals(); + + // + // Lock VREGCTL Register + // The register VREGCTL is not supported in this device. It is locked to + // prevent any writes to this register + // + ASysCtl_lockVREG(); +} + +//***************************************************************************** +// +// Function to turn on all peripherals, enabling reads and writes to the +// peripherals' registers. +// +// Note that to reduce power, unused peripherals should be disabled. +// +//***************************************************************************** +void User_Device_enableAllPeripherals(void) +{ + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DMA); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER0); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER1); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER2); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CPUBGCRC); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_HRPWM); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ERAD); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM1); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM2); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM3); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM4); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM5); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM6); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM7); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP1); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP2); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP3); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EQEP1); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EQEP2); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCIA); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SPIA); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SPIB); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CB); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CANA); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCA); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCC); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS1); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS2); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS3); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS4); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSITXA); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXA); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_LINA); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_LINB); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DCC0); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DCC1); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1); + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2); + + SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_HICA); +} + +//***************************************************************************** +// +// Function to disable pin locks and enable pullups on GPIOs. +// +//***************************************************************************** +void User_Device_initGPIO(void) +{ + // + // Disable pin locks. + // + GPIO_unlockPortConfig(GPIO_PORT_A, 0xFFFFFFFF); + GPIO_unlockPortConfig(GPIO_PORT_B, 0xFFFFFFFF); + GPIO_unlockPortConfig(GPIO_PORT_H, 0xFFFFFFFF); +} + +/* -------------------------------------------- END OF FILE -------------------------------------------- */ diff --git a/User_Src/User_Device.h b/User_Src/User_Device.h new file mode 100644 index 0000000..2e5a7f5 --- /dev/null +++ b/User_Src/User_Device.h @@ -0,0 +1,106 @@ +/* + * @ : User_Device.h + * @ : + * @ : Tomy + * @ : 20201215 + * @ 汾: V1.0 + * @ ʷ: V1.0 20201215 Summary + * + * MIT License. Copyright (c) 2021 SummerFalls. + */ + +#ifndef USER_SRC_USER_DEVICE_H_ +#define USER_SRC_USER_DEVICE_H_ + +#include "driverlib.h" + +//***************************************************************************** +// +// Defines related to clock configuration +// +//***************************************************************************** +// +// 20MHz XTAL on controlCARD. For use with SysCtl_getClock(). +// +#define DEVICE_OSCSRC_FREQ 20000000U + +// +// Define to pass to SysCtl_setClock(). Will configure the clock as follows: +// PLLSYSCLK = 20MHz (XTAL_OSC) * 30 (IMULT) / (2 (REFDIV) * 3 (ODIV) * 1(SYSDIV)) +// PLLSYSCLK = 10MHz (INT_OSC2) * 60 (IMULT) / (2 (REFDIV) * 3 (ODIV) * 1(SYSDIV)) +// + +#define DEVICE_SETCLOCK_CFG_USER (SYSCTL_OSCSRC_OSC2 | SYSCTL_IMULT(60) | \ + SYSCTL_REFDIV(2) | SYSCTL_ODIV(3) | \ + SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \ + SYSCTL_DCC_BASE_0) + +// +// 100MHz SYSCLK frequency based on the above DEVICE_SETCLOCK_CFG. Update the +// code below if a different clock configuration is used! +// +#define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 30) / (2 * 3 * 1)) + + +// +// 25MHz LSPCLK frequency based on the above DEVICE_SYSCLK_FREQ and a default +// low speed peripheral clock divider of 4. Update the code below if a +// different LSPCLK divider is used! +// +#define DEVICE_LSPCLK_FREQ (DEVICE_SYSCLK_FREQ / 4) + +//***************************************************************************** +// +// Macro to call SysCtl_delay() to achieve a delay in microseconds. The macro +// will convert the desired delay in microseconds to the count value expected +// by the function. \b x is the number of microseconds to delay. +// +//***************************************************************************** +#define DEVICE_DELAY_US(x) SysCtl_delay(((((long double)(x)) / (1000000.0L / \ + (long double)DEVICE_SYSCLK_FREQ)) - 9.0L) / 5.0L) + +// +// Defines for setting FSI clock speeds +// +#define FSI_PRESCALE_50MHZ 1U +#define FSI_PRESCALE_25MHZ 2U +#define FSI_PRESCALE_10MHZ 5U +#define FSI_PRESCALE_5MHZ 10U + +//***************************************************************************** +// +// Defines, Globals, and Header Includes related to Flash Support +// +//***************************************************************************** +#ifdef _FLASH +#include + +extern uint16_t RamfuncsLoadStart; +extern uint16_t RamfuncsLoadEnd; +extern uint16_t RamfuncsLoadSize; +extern uint16_t RamfuncsRunStart; +extern uint16_t RamfuncsRunEnd; +extern uint16_t RamfuncsRunSize; +#endif + +#define DEVICE_FLASH_WAITSTATES 4 + +/* For rts2800_fpu32_fast_supplement_eabi.lib LUT */ +#ifdef _FLASH +extern uint16_t FPUmathTablesLoadStart; +extern uint16_t FPUmathTablesLoadSize; +extern uint16_t FPUmathTablesRunStart; +#endif + +//***************************************************************************** +// +// Function Prototypes +// +//***************************************************************************** +void User_Device_Init(void); +void User_Device_enableAllPeripherals(void); +void User_Device_initGPIO(void); + +#endif /* USER_SRC_USER_DEVICE_H_ */ + +/* -------------------------------------------- END OF FILE -------------------------------------------- */ diff --git a/User_Src/User_HAL.c b/User_Src/User_HAL.c new file mode 100644 index 0000000..bf9afb4 --- /dev/null +++ b/User_Src/User_HAL.c @@ -0,0 +1,33 @@ +/* + * @ : User_HAL.c + * @ : + * @ : Tomy + * @ : 20201215 + * @ 汾: V1.0 + * @ ʷ: V1.0 20201215 Summary + * + * MIT License. Copyright (c) 2021 SummerFalls. + */ + +#include "User_HAL.h" +#include "device.h" + +/******************************************************************************* +* @name : HAL_setupCpuTimer +* @brief : setup CPU Timer +* @param : void +* @retval : void +*******************************************************************************/ +void HAL_setupCpuTimer(uint32_t base, uint32_t periodCount) +{ + CPUTimer_setPreScaler(base, 0); // divide by 1 (SYSCLKOUT) + CPUTimer_setPeriod(base, periodCount); + CPUTimer_stopTimer(base); // Stop timer / reload / restart + CPUTimer_setEmulationMode(base, CPUTIMER_EMULATIONMODE_STOPAFTERNEXTDECREMENT); + CPUTimer_reloadTimerCounter(base); // Reload counter with period value + CPUTimer_resumeTimer(base); + + return; +} + +/* -------------------------------------------- END OF FILE -------------------------------------------- */ diff --git a/User_Src/User_HAL.h b/User_Src/User_HAL.h new file mode 100644 index 0000000..9ba248b --- /dev/null +++ b/User_Src/User_HAL.h @@ -0,0 +1,50 @@ +/* + * @ : User_HAL.h + * @ : + * @ : Tomy + * @ : 20201215 + * @ 汾: V1.0 + * @ ʷ: V1.0 20201215 Summary + * + * MIT License. Copyright (c) 2021 SummerFalls. + */ + +#ifndef USER_SRC_USER_HAL_H_ +#define USER_SRC_USER_HAL_H_ + +#include + +// +// Define the system frequency (MHz) +// +#define SYSTEM_FREQUENCY (DEVICE_SYSCLK_FREQ / 1000000U) + +// +// Timer definitions based on System Clock +// +#define MICROSEC SYSTEM_FREQUENCY +#define MICROSEC_50 50 * MICROSEC // 50 uS +#define MICROSEC_100 100 * MICROSEC // 0.1 mS +#define MICROSEC_150 150 * MICROSEC // 0.15 mS +#define MILLISEC 1000 * MICROSEC // 1 mS + +#define MILSEC_0_5 0.5 * MILLISEC // 0.5 mS +#define MILSEC_1 1.0 * MILLISEC // 1.0 mS +#define MILSEC_2 2.0 * MILLISEC // 2.0 mS +#define MILSEC_5 5.0 * MILLISEC // 5.0 mS +#define MILSEC_7_5 7.5 * MILLISEC // 7.5 mS +#define MILSEC_10 10 * MILLISEC // 10 mS +#define MILSEC_20 20 * MILLISEC // 20 mS +#define MILSEC_50 50 * MILLISEC // 50 mS +#define MILSEC_100 100 * MILLISEC // 100 mS +#define MILSEC_500 500 * MILLISEC // 500 mS +#define MILSEC_1000 1000 * MILLISEC // 1000 mS + +//! \brief Sets up the CPU timers +//! \param[in] base The cpu timer base +//! \param[in] periodCount The cpu timer period count +extern void HAL_setupCpuTimer(uint32_t base, uint32_t periodCount); + +#endif /* USER_SRC_USER_HAL_H_ */ + +/* -------------------------------------------- END OF FILE -------------------------------------------- */ diff --git "a/__Docs__/F28002x_\344\270\211\350\247\222\345\207\275\346\225\260\345\272\223\347\233\270\345\205\263\350\257\264\346\230\216.drawio" "b/__Docs__/F28002x_\344\270\211\350\247\222\345\207\275\346\225\260\345\272\223\347\233\270\345\205\263\350\257\264\346\230\216.drawio" new file mode 100644 index 0000000..189fc9f --- /dev/null +++ "b/__Docs__/F28002x_\344\270\211\350\247\222\345\207\275\346\225\260\345\272\223\347\233\270\345\205\263\350\257\264\346\230\216.drawio" @@ -0,0 +1 @@ +7Vpbb6M6EP41fjwV98tjIGTPQysdnXZ1His3cRJrCWbBadL++mMbm0DsqskGutU22VWFxxfG3zdjZgaAm2723ypYru/IAuXAsRZ74E6B44SOxf5ywUsjCNy4EawqvGhE9kFwj1+RFMp5qy1eoLo3kBKSU1z2hXNSFGhOezJYVWTXH7Ykef+uJVwhTXA/h7ku/Q8v6LqRRk54kP+N8Gqt7mwHcn8bqAbLndRruCC7jsjNgJtWhNDmarNPUc6xU7g082Zv9LaKVaigp0zwpMrPMN/KzUnF6IvabUW2xQLxCRZwk90aU3Rfwjnv3TF6mWxNNzlr2eyyphX5gVKSk4pJClKwYYmulVT0GVUU7TsiqeU3RDaIVi9syO4AcGs36w64XiSFUJK6auce9s0u5NbNMDhDo6Bo5Y052eC5nHcJErJXgSB9x5PNDk5BZMLJGQAnV8OporUTWdbjsty6ziOCT/gmx08aemxvtA9RhWr8Cp/EAI5MSXBBhWp+Avwpk8AtJXXj+3wCzPGqYNc5WvKlOGCYueREiinhHNSMElysHnhj+pfHJEtS0HupiME9zobfO4Lf1vG3PQP+Q8DvjWmmw2MT6NB4gQEa1xsAG/8d01zCmj7W27LM0Ybt8CuYqt+nw/V1Phx3JFMNDKYa5BwNhniwosLgpKA6lrDFO6M+k4UHfUgjg/MbEQ0GgNTwqM5mIElBFIEsAskUTGYg80CSgCQAmQ8mGYgzkIUgykBiqcHp7fcHkAUgnoGJzy+iGCQZX2Fig0kkugKQxHwFPn6mJsafyFWGP6zc0MCl6UE6hHdEBipb2ANORNQw6IFJKIiwBBEtRyHvSiZizEyRNQGxx7viCYg8JXEFxRFb/OHuOxdGUxD74oL9d6UBsI3yxQNxX7ZCwpXpLhWF3MC4kkIZNjhKxXSfD068MW1jzkhG1ZkHqQpBgePOZhb7HR2wbVveLxgoOrP9nlkZwgMnHsmq1L0uPiEEzzHvzYRpxJO0Y05vTfvDzgf3KNBzDedDOBaTekLCvfcY33qHNzkUKVY/dmBJxxrni1v4QrZcrZrC+Q/VStakwq9sPDwkbbBSjuBwR1jiPO84ELL4v97Me76iJFGQiv5RYNtHoju47w28ZZGYFMxJnsOyxk+t3htYrXCREErJRg5Su5z1lVqKn+mY6Lo1N4ZVDutaqdCLHoYOD8Lwpu/+sacZTezrNmNHzgBGo2dn9c+KPi5dPU2QnmnM1rvkS5F0sFvhhFPvIPlX7oGLCMNpmQs413ixQIWAm0L6pr+zs8NJLQYZ83wnZW370BaHQUkqdpAXTE2IBSmI2c4OcfvpseyY6XNO5u9FxWkn0aWGXcSWnszVuLiSdTpZvvNxZOnZ5ZzUV7JOJyuMPo4sPfdkSF1d6wy2bOu059YgdOl5LafLufJ1Bl+G4HQsvlzdvZb14wI/q6z2Ste7dPkfF2cYCqOqzMa3BvhbMhVTBz+3pKm5uZb4dUVNOc5cRDjU7Zo13yjd/ebSaofFUyoEQ5Rgo34S2ab+3bdaI+WQphLsoRoQikpSekI14DOl9e/QKI12mFTuqDxoKOSMVccxlAd/8V3GtUAwZIFgifdTWK9VF2L2BSmpjh9iUptbXCidBzBHxzqqKzqGwqKpXN0+ay6yyFizyJLsvm6E1nroJZUFI12DRGh6HRjtyytbF5UWxmPL1tjKyerK1kW1hfHY0ivzNS6+dDHofMJM5YXxGNPL4vhr18V/gTBDfWE8wvRg48SvzK7h7p8S7vpHXzm237699/ZVPbkv+szOlDmLUkebJzdfPvQ/iri5ufma50nrsJdEw+Z36ecfJ6x5+Hxa9HW+QXez/wE= \ No newline at end of file diff --git "a/__Docs__/F28002x_\344\270\211\350\247\222\345\207\275\346\225\260\345\272\223\347\233\270\345\205\263\350\257\264\346\230\216.png" "b/__Docs__/F28002x_\344\270\211\350\247\222\345\207\275\346\225\260\345\272\223\347\233\270\345\205\263\350\257\264\346\230\216.png" new file mode 100644 index 0000000..ee1d2da Binary files /dev/null and "b/__Docs__/F28002x_\344\270\211\350\247\222\345\207\275\346\225\260\345\272\223\347\233\270\345\205\263\350\257\264\346\230\216.png" differ diff --git "a/__Docs__/\344\274\230\345\214\226\350\256\276\347\275\256.png" "b/__Docs__/\344\274\230\345\214\226\350\256\276\347\275\256.png" new file mode 100644 index 0000000..6d53cd0 Binary files /dev/null and "b/__Docs__/\344\274\230\345\214\226\350\256\276\347\275\256.png" differ diff --git "a/__Docs__/\345\240\206\346\240\210\345\244\247\345\260\217\350\256\276\347\275\256.png" "b/__Docs__/\345\240\206\346\240\210\345\244\247\345\260\217\350\256\276\347\275\256.png" new file mode 100644 index 0000000..af5899d Binary files /dev/null and "b/__Docs__/\345\240\206\346\240\210\345\244\247\345\260\217\350\256\276\347\275\256.png" differ diff --git "a/__Docs__/\345\244\264\346\226\207\344\273\266\345\214\205\345\220\253\350\256\276\347\275\256.png" "b/__Docs__/\345\244\264\346\226\207\344\273\266\345\214\205\345\220\253\350\256\276\347\275\256.png" new file mode 100644 index 0000000..5e5a8b5 Binary files /dev/null and "b/__Docs__/\345\244\264\346\226\207\344\273\266\345\214\205\345\220\253\350\256\276\347\275\256.png" differ diff --git "a/__Docs__/\345\267\245\347\250\213\345\205\250\345\261\200\351\242\204\345\256\232\344\271\211\345\256\217_FLASH.png" "b/__Docs__/\345\267\245\347\250\213\345\205\250\345\261\200\351\242\204\345\256\232\344\271\211\345\256\217_FLASH.png" new file mode 100644 index 0000000..bbd8bda Binary files /dev/null and "b/__Docs__/\345\267\245\347\250\213\345\205\250\345\261\200\351\242\204\345\256\232\344\271\211\345\256\217_FLASH.png" differ diff --git "a/__Docs__/\345\267\245\347\250\213\345\205\250\345\261\200\351\242\204\345\256\232\344\271\211\345\256\217_RAM.png" "b/__Docs__/\345\267\245\347\250\213\345\205\250\345\261\200\351\242\204\345\256\232\344\271\211\345\256\217_RAM.png" new file mode 100644 index 0000000..c1e67fd Binary files /dev/null and "b/__Docs__/\345\267\245\347\250\213\345\205\250\345\261\200\351\242\204\345\256\232\344\271\211\345\256\217_RAM.png" differ diff --git "a/__Docs__/\345\272\223\345\274\225\347\224\250\350\256\276\347\275\256.png" "b/__Docs__/\345\272\223\345\274\225\347\224\250\350\256\276\347\275\256.png" new file mode 100644 index 0000000..b1519d1 Binary files /dev/null and "b/__Docs__/\345\272\223\345\274\225\347\224\250\350\256\276\347\275\256.png" differ diff --git "a/__Docs__/\345\272\223\351\200\211\346\213\251\345\222\214\345\210\207\346\215\242.png" "b/__Docs__/\345\272\223\351\200\211\346\213\251\345\222\214\345\210\207\346\215\242.png" new file mode 100644 index 0000000..bca6e3f Binary files /dev/null and "b/__Docs__/\345\272\223\351\200\211\346\213\251\345\222\214\345\210\207\346\215\242.png" differ diff --git "a/__Docs__/\347\233\256\345\275\225\347\273\223\346\236\204.png" "b/__Docs__/\347\233\256\345\275\225\347\273\223\346\236\204.png" new file mode 100644 index 0000000..a4e158c Binary files /dev/null and "b/__Docs__/\347\233\256\345\275\225\347\273\223\346\236\204.png" differ diff --git "a/__Docs__/\350\257\255\350\250\200\350\256\276\347\275\256.png" "b/__Docs__/\350\257\255\350\250\200\350\256\276\347\275\256.png" new file mode 100644 index 0000000..2e164d2 Binary files /dev/null and "b/__Docs__/\350\257\255\350\250\200\350\256\276\347\275\256.png" differ diff --git a/f28002x_headers_nonbios.cmd b/f28002x_headers_nonbios.cmd new file mode 100644 index 0000000..188603c --- /dev/null +++ b/f28002x_headers_nonbios.cmd @@ -0,0 +1,268 @@ +MEMORY +{ + ADCA_RESULT : origin = 0x000B00, length = 0x000020 + ADCC_RESULT : origin = 0x000B40, length = 0x000020 + ADCA : origin = 0x007400, length = 0x000080 + ADCC : origin = 0x007500, length = 0x000080 + + ANALOG_SUBSYS : origin = 0x05D700, length = 0x000100 + + BGCRC : origin = 0x006340, length = 0x000080 + + CANA : origin = 0x048000, length = 0x000800 + + CLB_LOGIC_CONFIG1 : origin = 0x00003000, length = 0x00000100 + CLB_LOGIC_CONFIG2 : origin = 0x00003200, length = 0x00000100 + CLB_LOGIC_CONTROL1 : origin = 0x00003100, length = 0x00000080 + CLB_LOGIC_CONTROL2 : origin = 0x00003300, length = 0x00000080 + CLB_DATA_EXCHANGE1 : origin = 0x00003180, length = 0x00000080 + CLB_DATA_EXCHANGE2 : origin = 0x00003380, length = 0x00000080 + + CLB_XBAR : origin = 0x007A40, length = 0x000040 + + CMPSS1 : origin = 0x005C80, length = 0x000020 + CMPSS2 : origin = 0x005CA0, length = 0x000020 + CMPSS3 : origin = 0x005CC0, length = 0x000020 + CMPSS4 : origin = 0x005CE0, length = 0x000020 + + CPU_TIMER0 : origin = 0x000C00, length = 0x000008 /* CPU Timer0 registers */ + CPU_TIMER1 : origin = 0x000C08, length = 0x000008 /* CPU Timer1 registers */ + CPU_TIMER2 : origin = 0x000C10, length = 0x000008 /* CPU Timer2 registers */ + + DCC0 : origin = 0x05E700, length = 0x000040 + DCC1 : origin = 0x05E740, length = 0x000040 + + DCSM_BANK0_Z1 : origin = 0x05F000, length = 0x000030 + DCSM_BANK0_Z2 : origin = 0x05F040, length = 0x000030 + DCSM_BANK1_Z1 : origin = 0x05F100, length = 0x000030 + DCSM_BANK1_Z2 : origin = 0x05F140, length = 0x000030 + DCSM_COMMON : origin = 0x05F070, length = 0x000010 /* Common Dual code security module registers */ + DCSM_COMMON2 : origin = 0x05F080, length = 0x000010 /* Common Dual code security module registers */ + + DMA : origin = 0x001000, length = 0x000200 + + ECAP1 : origin = 0x005200, length = 0x000040 /* Enhanced Capture 1 registers */ + ECAP2 : origin = 0x005240, length = 0x000040 /* Enhanced Capture 2 registers */ + ECAP3 : origin = 0x005280, length = 0x000040 /* Enhanced Capture 3 registers */ + + EPWM1 : origin = 0x004000, length = 0x000100 /* Enhanced PWM 1 registers */ + EPWM2 : origin = 0x004100, length = 0x000100 /* Enhanced PWM 2 registers */ + EPWM3 : origin = 0x004200, length = 0x000100 /* Enhanced PWM 3 registers */ + EPWM4 : origin = 0x004300, length = 0x000100 /* Enhanced PWM 4 registers */ + EPWM5 : origin = 0x004400, length = 0x000100 /* Enhanced PWM 5 registers */ + EPWM6 : origin = 0x004500, length = 0x000100 /* Enhanced PWM 6 registers */ + EPWM7 : origin = 0x004600, length = 0x000100 /* Enhanced PWM 7 registers */ + + EPWM_XBAR : origin = 0x007A00, length = 0x000040 + + EQEP1 : origin = 0x005100, length = 0x000040 /* Enhanced QEP 1 registers */ + EQEP2 : origin = 0x005140, length = 0x000040 /* Enhanced QEP 2 registers */ + + FLASH0_CTRL : origin = 0x05F800, length = 0x000300 + FLASH0_ECC : origin = 0x05FB00, length = 0x000040 + + FSITXA : origin = 0x006600, length = 0x000080 + FSIRXA : origin = 0x006680, length = 0x000080 + + GPIOCTRL : origin = 0x007C00, length = 0x000200 /* GPIO control registers */ + GPIODAT : origin = 0x007F00, length = 0x000040 /* GPIO data registers */ + + HIC : origin = 0x006500, length = 0x000100 + + I2CA : origin = 0x007300, length = 0x000040 /* I2C-A registers */ + I2CB : origin = 0x007340, length = 0x000040 /* I2C-A registers */ + + INPUT_XBAR : origin = 0x007900, length = 0x000020 + + LINA : origin = 0x006A00, length = 0x000100 + LINB : origin = 0x006B00, length = 0x000100 + + MEMCFG : origin = 0x05F400, length = 0x000080 /* Mem Config registers */ + ACCESSPROTECTION : origin = 0x05F500, length = 0x000040 /* Access Protection registers */ + MEMORYERROR : origin = 0x05F540, length = 0x000040 /* Access Protection registers */ + + NMIINTRUPT : origin = 0x007060, length = 0x000010 /* NMI Watchdog Interrupt Registers */ + + OUTPUT_XBAR : origin = 0x007A80, length = 0x000040 + + PIE_CTRL : origin = 0x000CE0, length = 0x000020 /* PIE control registers */ + + PIE_VECT : origin = 0x000D00, length = 0x000200 /* PIE Vector Table */ + + PMBUSA : origin = 0x006400, length = 0x000020 + + SCIA : origin = 0x007200, length = 0x000010 /* SCI-A registers */ + + SPIA : origin = 0x006100, length = 0x000010 + SPIB : origin = 0x006110, length = 0x000010 + + WD : origin = 0x007000, length = 0x000040 + DMACLASRCSEL : origin = 0x007980, length = 0x000040 + DEV_CFG : origin = 0x05D000, length = 0x0001A0 + CLK_CFG : origin = 0x05D200, length = 0x000100 + CPU_SYS : origin = 0x05D300, length = 0x000100 + PERIPH_AC : origin = 0x05D500, length = 0x000200 + + ERAD_GLOBAL : origin = 0x05E800, length = 0x000014 + ERAD_HWBP1 : origin = 0x05E900, length = 0x000008 + ERAD_HWBP2 : origin = 0x05E908, length = 0x000008 + ERAD_HWBP3 : origin = 0x05E910, length = 0x000008 + ERAD_HWBP4 : origin = 0x05E918, length = 0x000008 + ERAD_HWBP5 : origin = 0x05E920, length = 0x000008 + ERAD_HWBP6 : origin = 0x05E928, length = 0x000008 + ERAD_HWBP7 : origin = 0x05E930, length = 0x000008 + ERAD_HWBP8 : origin = 0x05E938, length = 0x000008 + ERAD_CTR1 : origin = 0x05E980, length = 0x000010 + ERAD_CTR2 : origin = 0x05E990, length = 0x000010 + ERAD_CTR3 : origin = 0x05E9A0, length = 0x000010 + ERAD_CTR4 : origin = 0x05E9B0, length = 0x000010 + + XBAR : origin = 0x007920, length = 0x000020 + SYNC_SOC : origin = 0x007940, length = 0x000010 + + XINT : origin = 0x007070, length = 0x000010 +} + +SECTIONS +{ +/*** PIE Vect Table and Boot ROM Variables Structures ***/ + UNION run = PIE_VECT + { + PieVectTableFile + GROUP + { + EmuKeyVar + EmuBModeVar + FlashCallbackVar + FlashScalingVar + } + } + + AdcaResultFile : > ADCA_RESULT, type=NOINIT + AdccResultFile : > ADCC_RESULT, type=NOINIT + + AdcaRegsFile : > ADCA, type=NOINIT + AdccRegsFile : > ADCC, type=NOINIT + + AnalogSubsysRegsFile : > ANALOG_SUBSYS, type=NOINIT + + BgcrcRegsFile : > BGCRC, type=NOINIT + + CanaRegsFile : > CANA, type=NOINIT + + Clb1LogicCfgRegsFile : > CLB_LOGIC_CONFIG1, type=NOINIT + Clb2LogicCfgRegsFile : > CLB_LOGIC_CONFIG2, type=NOINIT + Clb1LogicCtrlRegsFile : > CLB_LOGIC_CONTROL1, type=NOINIT + Clb2LogicCtrlRegsFile : > CLB_LOGIC_CONTROL2, type=NOINIT + Clb1DataExchgRegsFile : > CLB_DATA_EXCHANGE1, type=NOINIT + Clb2DataExchgRegsFile : > CLB_DATA_EXCHANGE2, type=NOINIT + + ClbXbarRegsFile : > CLB_XBAR, type=NOINIT + + Cmpss1RegsFile : > CMPSS1, type=NOINIT + Cmpss2RegsFile : > CMPSS2, type=NOINIT + Cmpss3RegsFile : > CMPSS3, type=NOINIT + Cmpss4RegsFile : > CMPSS4, type=NOINIT + + CpuTimer0RegsFile : > CPU_TIMER0, type=NOINIT + CpuTimer1RegsFile : > CPU_TIMER1, type=NOINIT + CpuTimer2RegsFile : > CPU_TIMER2, type=NOINIT + + Dcc0RegsFile : > DCC0, type=NOINIT + Dcc1RegsFile : > DCC1, type=NOINIT + + DcsmBank0Z1RegsFile : > DCSM_BANK0_Z1, type=NOINIT + DcsmBank0Z2RegsFile : > DCSM_BANK0_Z2, type=NOINIT + DcsmBank1Z1RegsFile : > DCSM_BANK1_Z1, type=NOINIT + DcsmBank1Z2RegsFile : > DCSM_BANK1_Z2, type=NOINIT + DcsmCommonRegsFile : > DCSM_COMMON, type=NOINIT + DcsmCommon2RegsFile : > DCSM_COMMON2, type=NOINIT + + DmaRegsFile : > DMA, type=NOINIT + + ECap1RegsFile : > ECAP1, type=NOINIT + ECap2RegsFile : > ECAP2, type=NOINIT + ECap3RegsFile : > ECAP3, type=NOINIT + + EPwm1RegsFile : > EPWM1, type=NOINIT + EPwm2RegsFile : > EPWM2, type=NOINIT + EPwm3RegsFile : > EPWM3, type=NOINIT + EPwm4RegsFile : > EPWM4, type=NOINIT + EPwm5RegsFile : > EPWM5, type=NOINIT + EPwm6RegsFile : > EPWM6, type=NOINIT + EPwm7RegsFile : > EPWM7, type=NOINIT + + EPwmXbarRegsFile : > EPWM_XBAR, type=NOINIT + + EQep1RegsFile : > EQEP1, type=NOINIT + EQep2RegsFile : > EQEP2, type=NOINIT + + EnhancedDebugGlobalRegsFile : > ERAD_GLOBAL, type=NOINIT + EnhancedDebugHWBP1RegsFile : > ERAD_HWBP1, type=NOINIT + EnhancedDebugHWBP2RegsFile : > ERAD_HWBP2, type=NOINIT + EnhancedDebugHWBP3RegsFile : > ERAD_HWBP3, type=NOINIT + EnhancedDebugHWBP4RegsFile : > ERAD_HWBP4, type=NOINIT + EnhancedDebugHWBP5RegsFile : > ERAD_HWBP5, type=NOINIT + EnhancedDebugHWBP6RegsFile : > ERAD_HWBP6, type=NOINIT + EnhancedDebugHWBP7RegsFile : > ERAD_HWBP7, type=NOINIT + EnhancedDebugHWBP8RegsFile : > ERAD_HWBP8, type=NOINIT + EnhancedDebugCounter1RegsFile : > ERAD_CTR1, type=NOINIT + EnhancedDebugCounter2RegsFile : > ERAD_CTR2, type=NOINIT + EnhancedDebugCounter3RegsFile : > ERAD_CTR3, type=NOINIT + EnhancedDebugCounter4RegsFile : > ERAD_CTR4, type=NOINIT + + Flash0CtrlRegsFile : > FLASH0_CTRL, type=NOINIT + Flash0EccRegsFile : > FLASH0_ECC, type=NOINIT + + FsiTxaRegsFile : > FSITXA, type=NOINIT + FsiRxaRegsFile : > FSIRXA, type=NOINIT + + GpioCtrlRegsFile : > GPIOCTRL, type=NOINIT + GpioDataRegsFile : > GPIODAT, type=NOINIT + + HicRegsFile : > HIC, type=NOINIT + + I2caRegsFile : > I2CA, type=NOINIT + I2cbRegsFile : > I2CB, type=NOINIT + + InputXbarRegsFile : > INPUT_XBAR, type=NOINIT + XbarRegsFile : > XBAR, type=NOINIT + + LinaRegsFile : > LINA, type=NOINIT + LinbRegsFile : > LINB, type=NOINIT + + MemCfgRegsFile : > MEMCFG, type=NOINIT + AccessProtectionRegsFile : > ACCESSPROTECTION, type=NOINIT + MemoryErrorRegsFile : > MEMORYERROR, type=NOINIT + + NmiIntruptRegsFile : > NMIINTRUPT, type=NOINIT + + OutputXbarRegsFile : > OUTPUT_XBAR, type=NOINIT + + PieCtrlRegsFile : > PIE_CTRL, type=NOINIT + + PmbusaRegsFile : > PMBUSA, type=NOINIT + + SciaRegsFile : > SCIA, type=NOINIT + + SpiaRegsFile : > SPIA, type=NOINIT + SpibRegsFile : > SPIB, type=NOINIT + + WdRegsFile : > WD, type=NOINIT + DmaClaSrcSelRegsFile : > DMACLASRCSEL, type=NOINIT + DevCfgRegsFile : > DEV_CFG, type=NOINIT + ClkCfgRegsFile : > CLK_CFG, type=NOINIT + CpuSysRegsFile : > CPU_SYS, type=NOINIT + SysPeriphAcRegsFile : > PERIPH_AC, type=NOINIT + + SyncSocRegsFile : > SYNC_SOC, type=NOINIT + + XintRegsFile : > XINT, type=NOINIT + +} + +/* +//=========================================================================== +// End of file. +//=========================================================================== +*/ diff --git a/main.c b/main.c new file mode 100644 index 0000000..57764b3 --- /dev/null +++ b/main.c @@ -0,0 +1,252 @@ +/* + * @ : main.c + * @ : + * @ : Tomy + * @ : 20201215 + * @ 汾: V1.0 + * @ ʷ: V1.0 20201215 Summary + * + * MIT License. Copyright (c) 2021 SummerFalls. + */ + +#include +#include +#include +#include +#include + +/* LIB_0: driverlib */ +#include "device.h" + +/* LIB_1: Bit-field */ +#include "f28x_project.h" + +/* C2000Ware_X_XX_XX_XX_Software\libraries\math\FPUfastRTS\c28\lib\rts2800_fpu32_fast_supplement_eabi.lib */ +#include "fastrts.h" +#include "fpu32/C28x_FPU_FastRTS.h" + +/* C2000Ware_X_XX_XX_XX_Software\libraries\math\IQmath\c28\lib\IQmath_fpu32_eabi.lib */ +/* Properties -> Build -> C2000 Compiler -> Predefined Symbols: MATH_TYPE=FLOAT_MATH */ +#include "IQmathLib.h" + +/* User Include Header Files */ +#include "User_Device.h" +#include "User_HAL.h" + +// +// State Machine function prototypes +// + +// Alpha states +void A0(void); //state A0 +void B0(void); //state B0 + +// A branch states +void A1(void); //state A1 +void A2(void); //state A2 +void A3(void); //state A3 + +// B branch states +void B1(void); //state B1 +void B2(void); //state B2 +void B3(void); //state B3 + +// +// Global variables used in this system +// + +// Variable declarations +void (*Alpha_State_Ptr)(void); // Base States pointer +void (*A_Task_Ptr)(void); // State pointer A branch +void (*B_Task_Ptr)(void); // State pointer B branch + +uint16_t vTimer0[4]; // Virtual Timers slaved off CPU Timer 0 (A events) +uint16_t vTimer1[4]; // Virtual Timers slaved off CPU Timer 1 (B events) + + +/* For Math Library Test */ +float fa = 55.55232f; +float fb = 123.44f; +float fc = 0.0f; +_iq testIQ = _IQ(0.15); +float64_t v64 = 0.0; +float32u_t in, out_s, out_c; +int32_t vint32 = 0; + +void main(void) +{ + /* Device_init() replaced by User_Device_Init() for the macro DEVICE_SETCLOCK_CFG */ + User_Device_Init(); + + // + // Timing sync for background loops + // + HAL_setupCpuTimer(CPUTIMER0_BASE, MICROSEC_50); // A tasks + HAL_setupCpuTimer(CPUTIMER1_BASE, MICROSEC_100); // B tasks + + // Tasks State-machine init + Alpha_State_Ptr = &A0; + A_Task_Ptr = &A1; + B_Task_Ptr = &B1; + + // + // Initializations COMPLETE + // - IDLE loop. Just loop forever + // + for(;;) //infinite loop + { + // State machine entry & exit point + //=========================================================== + (*Alpha_State_Ptr)(); // jump to an Alpha state (A0,B0,...) + //=========================================================== + } +} + +//============================================================================= +// STATE-MACHINE SEQUENCING AND SYNCRONIZATION FOR SLOW BACKGROUND TASKS +//============================================================================= + +//--------------------------------- FRAMEWORK --------------------------------- +void A0(void) +{ + // loop rate synchronizer for A-tasks + if(CPUTimer_getTimerOverflowStatus(CPUTIMER0_BASE)) + { + CPUTimer_clearOverflowFlag(CPUTIMER0_BASE); // clear flag + + //----------------------------------------------------------- + (*A_Task_Ptr)(); // jump to an A Task (A1,A2,A3,...) + //----------------------------------------------------------- + + vTimer0[0]++; // virtual timer 0, instance 0 (spare) + } + + Alpha_State_Ptr = &B0; // Comment out to allow only A tasks +} + +void B0(void) +{ + // loop rate synchronizer for B-tasks + if(CPUTimer_getTimerOverflowStatus(CPUTIMER1_BASE)) + { + CPUTimer_clearOverflowFlag(CPUTIMER1_BASE); // clear flag + + //----------------------------------------------------------- + (*B_Task_Ptr)(); // jump to a B Task (B1,B2,B3,...) + //----------------------------------------------------------- + + vTimer1[0]++; // virtual timer 1, instance 0 (spare) + } + + Alpha_State_Ptr = &A0; // Allow A state tasks +} + +//============================================================================== +// A - TASKS (executed in every 50 usec) +//============================================================================== + +//-------------------------------------------------------- +void A1(void) // SPARE (not used) +//-------------------------------------------------------- +{ + //------------------- + //the next time CpuTimer0 'counter' reaches Period value go to A2 + A_Task_Ptr = &A2; + //------------------- +} + +//----------------------------------------------------------------- +void A2(void) // SPARE (not used) +//----------------------------------------------------------------- +{ + //------------------- + //the next time CpuTimer0 'counter' reaches Period value go to A3 + A_Task_Ptr = &A3; + //------------------- +} + +//----------------------------------------- +void A3(void) // SPARE (not used) +//----------------------------------------- +{ + //----------------- + //the next time CpuTimer0 'counter' reaches Period value go to A1 + A_Task_Ptr = &A1; + //----------------- +} + +//============================================================================== +// B - TASKS (executed in every 100 usec) +//============================================================================== + +//----------------------------------- USER ------------------------------------- + +//---------------------------------------- +void B1(void) // Toggle GPIO-00 +//---------------------------------------- +{ + //----------------- + //the next time CpuTimer1 'counter' reaches Period value go to B2 + B_Task_Ptr = &B2; + //----------------- + + // + // Run the test for rts2800_fpu32_fast_supplement_eabi.libIQmath_fpu32_eabi.libTMU + // + fc = fa + fb * 2; + testIQ = _IQ(1.9) * _IQ(3.8); + testIQ = 1.9 * 3.8; + testIQ = 1.9f * 3.8f; + v64 = 1.9 * 3.8; + vint32 = 1.9 * v64; + vint32 = 1.9f * v64; + testIQ = testIQ * _IQsin(30.0); + testIQ = cos(testIQ); + testIQ = sinf(testIQ); + + + testIQ = fabsf(-32947.223F); + testIQ = isqrtf(2.718281828459e+00F); + testIQ = sqrtf(3.120923179706e+00F); + testIQ = sinf(3.067961575771F); + testIQ = cosf(46.33178F); + testIQ = atanf(0.695312500000F); + testIQ = atan2f(7.0F, -7.0F); + + /* Runs the sincos routine ---------------------------------------- */ + out_s.f32 = FLT_MAX; + out_c.f32 = FLT_MAX; + in.f32 = -2.589359569951F; + sincosf(in.f32, (float32_t *)&out_s, (float32_t *)&out_c); + + /* Runs the FD$$DIV routine in the ASM file: fs_div28.asm ---------------------------------------- */ + fa = 2.718281828459e+00F; + fb = -2.000000000000e+00F; + fc = fa / fb; + fc = testIQ / fc; + + /* ---------------------------------------- */ + testIQ = expf(3.06796157577F); + testIQ = logf(63.06835937500F); + testIQ = powf(1.44337660406F, -1.84077694546F); +} + +//---------------------------------------- +void B2(void) // SPARE +//---------------------------------------- +{ + //----------------- + //the next time CpuTimer1 'counter' reaches Period value go to B3 + B_Task_Ptr = &B3; + //----------------- +} + +//---------------------------------------- +void B3(void) // SPARE +//---------------------------------------- +{ + //----------------- + //the next time CpuTimer1 'counter' reaches Period value go to B1 + B_Task_Ptr = &B1; + //----------------- +} diff --git a/targetConfigs/TMS320F280025C.ccxml b/targetConfigs/TMS320F280025C.ccxml new file mode 100644 index 0000000..f77f931 --- /dev/null +++ b/targetConfigs/TMS320F280025C.ccxml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/targetConfigs/readme.txt b/targetConfigs/readme.txt new file mode 100644 index 0000000..d783fef --- /dev/null +++ b/targetConfigs/readme.txt @@ -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. \ No newline at end of file