Improvements:
- HAL re-organized - FreeRTOS running stable - UART finished - SPI1 & SPI3 finished and functional - Display driver added (functional) git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@172 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,3 +3,11 @@
|
||||
*** SESSION sep. 11, 2017 08:26:16.00 ------------------------------------------
|
||||
*** SESSION sep. 12, 2017 09:08:37.66 ------------------------------------------
|
||||
*** SESSION sep. 12, 2017 12:28:02.99 ------------------------------------------
|
||||
*** SESSION sep. 13, 2017 08:31:48.14 ------------------------------------------
|
||||
*** SESSION sep. 13, 2017 08:34:07.49 ------------------------------------------
|
||||
*** SESSION sep. 13, 2017 08:56:22.06 ------------------------------------------
|
||||
*** SESSION sep. 13, 2017 09:06:20.00 ------------------------------------------
|
||||
*** SESSION sep. 13, 2017 10:19:50.15 ------------------------------------------
|
||||
*** SESSION sep. 13, 2017 16:09:45.61 ------------------------------------------
|
||||
*** SESSION sep. 15, 2017 11:33:26.35 ------------------------------------------
|
||||
*** SESSION sep. 19, 2017 14:17:27.20 ------------------------------------------
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,13 +4,13 @@
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector">
|
||||
<language id="org.eclipse.cdt.core.gcc">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -52,6 +52,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -331,7 +334,7 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
@@ -340,10 +343,10 @@
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_TYPEINFO_EQUALITY_INLINE" value="0">
|
||||
@@ -1009,7 +1012,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -1044,22 +1047,22 @@
|
||||
</entry>
|
||||
</language>
|
||||
<language id="org.eclipse.cdt.core.g++">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/arm-none-eabi">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/arm-none-eabi">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/backward">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/backward">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -1101,6 +1104,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -1386,22 +1392,25 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_GNU_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUG__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GNUG__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_EXPERIMENTAL_CXX0X__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_RTTI" value="1">
|
||||
@@ -1767,6 +1776,12 @@
|
||||
<entry kind="macro" name="__STDC_HOSTED__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_16__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_32__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -2064,7 +2079,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -2094,21 +2109,105 @@
|
||||
<entry kind="macro" name="__arm__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cplusplus" value="199711L">
|
||||
<entry kind="macro" name="__cplusplus" value="201402L">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_aggregate_nsdmi" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_alias_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_attributes" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_binary_literals" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_constexpr" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype" value="200707">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype_auto" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_delegating_constructors" value="200604">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_digit_separators" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_exceptions" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_generic_lambdas" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_hex_float" value="201603">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_inheriting_constructors" value="200802">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_init_captures" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_initializer_lists" value="200806">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_lambdas" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_nsdmi" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_range_based_for" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_raw_strings" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_ref_qualifiers" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_return_type_deduction" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rtti" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_runtime_arrays" value="198712">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_reference" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_references" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_sized_deallocation" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_static_assert" value="200410">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_characters" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_literals" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_user_defined_literals" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variable_templates" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variadic_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__has_include(STR)" value="__has_include__(STR)">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -2123,13 +2222,13 @@
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector">
|
||||
<language id="org.eclipse.cdt.core.gcc">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -2171,6 +2270,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -2450,7 +2552,7 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
@@ -2459,10 +2561,10 @@
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_TYPEINFO_EQUALITY_INLINE" value="0">
|
||||
@@ -3128,7 +3230,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -3163,22 +3265,22 @@
|
||||
</entry>
|
||||
</language>
|
||||
<language id="org.eclipse.cdt.core.g++">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/arm-none-eabi">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/arm-none-eabi">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/backward">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/backward">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -3220,6 +3322,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -3505,22 +3610,25 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_GNU_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUG__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GNUG__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_EXPERIMENTAL_CXX0X__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_RTTI" value="1">
|
||||
@@ -3886,6 +3994,12 @@
|
||||
<entry kind="macro" name="__STDC_HOSTED__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_16__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_32__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -4183,7 +4297,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -4213,21 +4327,105 @@
|
||||
<entry kind="macro" name="__arm__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cplusplus" value="199711L">
|
||||
<entry kind="macro" name="__cplusplus" value="201402L">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_aggregate_nsdmi" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_alias_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_attributes" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_binary_literals" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_constexpr" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype" value="200707">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype_auto" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_delegating_constructors" value="200604">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_digit_separators" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_exceptions" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_generic_lambdas" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_hex_float" value="201603">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_inheriting_constructors" value="200802">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_init_captures" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_initializer_lists" value="200806">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_lambdas" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_nsdmi" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_range_based_for" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_raw_strings" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_ref_qualifiers" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_return_type_deduction" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rtti" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_runtime_arrays" value="198712">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_reference" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_references" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_sized_deallocation" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_static_assert" value="200410">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_characters" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_literals" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_user_defined_literals" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variable_templates" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variadic_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__has_include(STR)" value="__has_include__(STR)">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
|
||||
Binary file not shown.
@@ -4,13 +4,13 @@
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector">
|
||||
<language id="org.eclipse.cdt.core.gcc">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -52,6 +52,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -331,7 +334,7 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
@@ -340,10 +343,10 @@
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_TYPEINFO_EQUALITY_INLINE" value="0">
|
||||
@@ -1009,7 +1012,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -1044,22 +1047,22 @@
|
||||
</entry>
|
||||
</language>
|
||||
<language id="org.eclipse.cdt.core.g++">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/arm-none-eabi">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/arm-none-eabi">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/backward">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/backward">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -1101,6 +1104,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -1386,22 +1392,25 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_GNU_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUG__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GNUG__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_EXPERIMENTAL_CXX0X__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_RTTI" value="1">
|
||||
@@ -1767,6 +1776,12 @@
|
||||
<entry kind="macro" name="__STDC_HOSTED__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_16__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_32__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -2064,7 +2079,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -2094,21 +2109,105 @@
|
||||
<entry kind="macro" name="__arm__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cplusplus" value="199711L">
|
||||
<entry kind="macro" name="__cplusplus" value="201402L">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_aggregate_nsdmi" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_alias_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_attributes" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_binary_literals" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_constexpr" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype" value="200707">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype_auto" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_delegating_constructors" value="200604">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_digit_separators" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_exceptions" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_generic_lambdas" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_hex_float" value="201603">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_inheriting_constructors" value="200802">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_init_captures" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_initializer_lists" value="200806">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_lambdas" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_nsdmi" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_range_based_for" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_raw_strings" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_ref_qualifiers" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_return_type_deduction" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rtti" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_runtime_arrays" value="198712">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_reference" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_references" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_sized_deallocation" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_static_assert" value="200410">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_characters" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_literals" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_user_defined_literals" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variable_templates" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variadic_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__has_include(STR)" value="__has_include__(STR)">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -2123,13 +2222,13 @@
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector">
|
||||
<language id="org.eclipse.cdt.core.gcc">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -2171,6 +2270,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -2450,7 +2552,7 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
@@ -2459,10 +2561,10 @@
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_TYPEINFO_EQUALITY_INLINE" value="0">
|
||||
@@ -3128,7 +3230,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -3163,22 +3265,34 @@
|
||||
</entry>
|
||||
</language>
|
||||
<language id="org.eclipse.cdt.core.g++">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1">
|
||||
<entry kind="includePath" name="/${ProjName}/#undef __ARM_FEATURE_FMA">
|
||||
<flag value="BUILTIN|READONLY|LOCAL|VALUE_WORKSPACE_PATH"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="/${ProjName}/#undef __ARM_NEON__">
|
||||
<flag value="BUILTIN|READONLY|LOCAL|VALUE_WORKSPACE_PATH"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="/${ProjName}/#undef __ARM_NEON">
|
||||
<flag value="BUILTIN|READONLY|LOCAL|VALUE_WORKSPACE_PATH"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="/${ProjName}/#undef __ARM_NEON_FP">
|
||||
<flag value="BUILTIN|READONLY|LOCAL|VALUE_WORKSPACE_PATH"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/arm-none-eabi">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/arm-none-eabi">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include/c++/5.4.1/backward">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include/c++/6.3.1/backward">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/lib/gcc/arm-none-eabi/5.4.1/include-fixed">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/lib/gcc/arm-none-eabi/6.3.1/include-fixed">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/arm-none-eabi/include">
|
||||
<entry kind="includePath" name="C:/Users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/arm-none-eabi/include">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ACCUM_EPSILON__" value="0x1P-15K">
|
||||
@@ -3220,6 +3334,9 @@
|
||||
<entry kind="macro" name="__ARM_EABI__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_FEATURE_COPROC" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__ARM_PCS" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -3505,22 +3622,25 @@
|
||||
<entry kind="macro" name="__GCC_IEC_559_COMPLEX" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_GNU_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="4">
|
||||
<entry kind="macro" name="__GNUC_MINOR__" value="3">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC_PATCHLEVEL__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUC__" value="5">
|
||||
<entry kind="macro" name="__GNUC_STDC_INLINE__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GNUG__" value="5">
|
||||
<entry kind="macro" name="__GNUC__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1009">
|
||||
<entry kind="macro" name="__GNUG__" value="6">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_ABI_VERSION" value="1010">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_EXPERIMENTAL_CXX0X__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__GXX_RTTI" value="1">
|
||||
@@ -3886,6 +4006,12 @@
|
||||
<entry kind="macro" name="__STDC_HOSTED__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_16__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC_UTF_32__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__STDC__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
@@ -4183,7 +4309,7 @@
|
||||
<entry kind="macro" name="__UTQ_IBIT__" value="0">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VERSION__" value=""5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]"">
|
||||
<entry kind="macro" name="__VERSION__" value=""6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]"">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__VFP_FP__" value="1">
|
||||
@@ -4213,21 +4339,105 @@
|
||||
<entry kind="macro" name="__arm__" value="1">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cplusplus" value="199711L">
|
||||
<entry kind="macro" name="__cplusplus" value="201402L">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_aggregate_nsdmi" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_alias_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_attributes" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_binary_literals" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_constexpr" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype" value="200707">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_decltype_auto" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_delegating_constructors" value="200604">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_digit_separators" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_exceptions" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_generic_lambdas" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_hex_float" value="201603">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_inheriting_constructors" value="200802">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_init_captures" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_initializer_lists" value="200806">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_lambdas" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_nsdmi" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_range_based_for" value="200907">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_raw_strings" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_ref_qualifiers" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_return_type_deduction" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rtti" value="199711">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_runtime_arrays" value="198712">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_reference" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_rvalue_references" value="200610">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_sized_deallocation" value="201309">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_static_assert" value="200410">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_characters" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_unicode_literals" value="200710">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_user_defined_literals" value="200809">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variable_templates" value="201304">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__cpp_variadic_templates" value="200704">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
<entry kind="macro" name="__has_include(STR)" value="__has_include__(STR)">
|
||||
<flag value="BUILTIN|READONLY"/>
|
||||
</entry>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
<item value="${workspace_loc:/FreeRTOS/Source/portable/GCC/ARM_CM3}" key="org.eclipse.cdt.utils.ui.controls.FileListControl"/>
|
||||
<item value="${workspace_loc:/HAL/Misc/inc}" key="org.eclipse.cdt.utils.ui.controls.FileListControl"/>
|
||||
<item value="484" key="org.eclipse.cdt.uiformatter_pagemodify_dialog.preferred_x"/>
|
||||
<item value="0" key="org.eclipse.cdt.uiformatter_pagemodify_dialog.preferred_y"/>
|
||||
<item value="0" key="org.eclipse.cdt.uiformatter_page.white_space_tab_page.node"/>
|
||||
@@ -11,8 +11,22 @@
|
||||
<item value="0" key="org.eclipse.cdt.uiformatter_page.white_space.c_view.inner"/>
|
||||
<item value="1" key="org.eclipse.cdt.uiformatter_page.line_wrapping_tab_page.last_category_index"/>
|
||||
<item value="H:\codeStyle" key="org.eclipse.cdt.ui.codeformatter.savepath.loadpath"/>
|
||||
<section name="org.eclipse.cdt.ui.OPEN_ACTION_SELECTION_DIALOG_SECTION">
|
||||
<item value="891" key="DIALOG_WIDTH"/>
|
||||
<item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
|
||||
<item value="438" key="DIALOG_HEIGHT"/>
|
||||
<item value="769" key="DIALOG_X_ORIGIN"/>
|
||||
<item value="296" key="DIALOG_Y_ORIGIN"/>
|
||||
</section>
|
||||
<section name="org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration">
|
||||
</section>
|
||||
<section name="PDOMSearchPage">
|
||||
<item value="false" key="caseSensitive"/>
|
||||
<item value="227191" key="searchFlags"/>
|
||||
<list key="previousPatterns">
|
||||
<item value="GPIO_pins_define"/>
|
||||
</list>
|
||||
</section>
|
||||
<section name="org.eclipse.cdt.internal.ui.preferences.EditTemplateDialog_dialogBounds">
|
||||
<item value="1936" key="DIALOG_WIDTH"/>
|
||||
<item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
|
||||
@@ -25,4 +39,21 @@
|
||||
</section>
|
||||
<section name="completion_proposal_size">
|
||||
</section>
|
||||
<section name="org.eclipse.cdt.internal.ui.typehierarchy.OpenTypeInHierarchyActionSettings">
|
||||
<item value="true" key="show_enums"/>
|
||||
<item value="true" key="show_unions"/>
|
||||
<item value="false" key="show_macros"/>
|
||||
<item value="true" key="show_classes"/>
|
||||
<item value="false" key="show_functions"/>
|
||||
<item value="true" key="show_lowlevel"/>
|
||||
<item value="false" key="show_namespaces"/>
|
||||
<item value="false" key="show_enumerators"/>
|
||||
<item value="true" key="show_structs"/>
|
||||
<item value="744" key="x"/>
|
||||
<item value="432" key="width"/>
|
||||
<item value="138" key="y"/>
|
||||
<item value="true" key="show_typedefs"/>
|
||||
<item value="false" key="show_variables"/>
|
||||
<item value="663" key="height"/>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -1,23 +1,35 @@
|
||||
12:43:23 **** Build of configuration Debug for project hsb-mrts ****
|
||||
make All
|
||||
12:38:32 **** Build of configuration Debug for project hsb-mrts ****
|
||||
make all
|
||||
Building file: ../startup/startup_stm32.s
|
||||
Invoking: MCU GCC Assembler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-as -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -g -o "startup/startup_stm32.o" "../startup/startup_stm32.s"
|
||||
Finished building: ../startup/startup_stm32.s
|
||||
|
||||
Building file: ../startup/sysmem.c
|
||||
Invoking: MCU GCC Compiler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/LED/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"startup/sysmem.d" -MT"startup/sysmem.o" -o "startup/sysmem.o" "../startup/sysmem.c"
|
||||
Finished building: ../startup/sysmem.c
|
||||
|
||||
Building file: ../src/freeRTOSFixes.c
|
||||
Invoking: MCU GCC Compiler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/LED/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/freeRTOSFixes.d" -MT"src/freeRTOSFixes.o" -o "src/freeRTOSFixes.o" "../src/freeRTOSFixes.c"
|
||||
../src/freeRTOSFixes.c: In function 'OS_logTaskInfo':
|
||||
../src/freeRTOSFixes.c:65:27: warning: variable 'highWaterMark' set but not used [-Wunused-but-set-variable]
|
||||
unsigned portBASE_TYPE highWaterMark;
|
||||
^~~~~~~~~~~~~
|
||||
Finished building: ../src/freeRTOSFixes.c
|
||||
|
||||
Building file: ../src/main.c
|
||||
Invoking: MCU GCC Compiler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
|
||||
Finished building: ../src/main.c
|
||||
|
||||
Building target: hsb-mrts.elf
|
||||
Invoking: MCU GCC Linker
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -Wl,-Map=output.map -Wl,--gc-sections -o "hsb-mrts.elf" @"objects.list" -lm
|
||||
src/freeRTOSFixes.o: In function `_init':
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug/../src/freeRTOSFixes.c:61: multiple definition of `_init'
|
||||
c:/users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/armv7-m/crti.o:(.init+0x0): first defined here
|
||||
startup/sysmem.o: In function `_sbrk':
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug/../startup/sysmem.c:63: multiple definition of `_sbrk'
|
||||
src/freeRTOSFixes.o:freeRTOSFixes.c:(.text._sbrk+0x0): first defined here
|
||||
c:/users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-m\libc.a(lib_a-exit.o): In function `exit':
|
||||
exit.c:(.text.exit+0x16): undefined reference to `_exit'
|
||||
src/main.o: In function `main':
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug/../src/main.c:72: undefined reference to `vTaskStartScheduler'
|
||||
collect2.exe: error: ld returned 1 exit status
|
||||
make: *** [hsb-mrts.elf] Error 1
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/LED/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
|
||||
In file included from ../src/main.c:34:0:
|
||||
C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc/platform.h:37:23: fatal error: stm32f10x.h: No such file or directory
|
||||
#include "stm32f10x.h"
|
||||
^
|
||||
compilation terminated.
|
||||
make: *** [src/main.o] Error 1
|
||||
src/subdir.mk:21: recipe for target 'src/main.o' failed
|
||||
|
||||
@@ -1,26 +1,38 @@
|
||||
12:43:23 **** Build of configuration Debug for project hsb-mrts ****
|
||||
make All
|
||||
12:38:32 **** Build of configuration Debug for project hsb-mrts ****
|
||||
make all
|
||||
Building file: ../startup/startup_stm32.s
|
||||
Invoking: MCU GCC Assembler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-as -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -g -o "startup/startup_stm32.o" "../startup/startup_stm32.s"
|
||||
Finished building: ../startup/startup_stm32.s
|
||||
|
||||
Building file: ../startup/sysmem.c
|
||||
Invoking: MCU GCC Compiler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/LED/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"startup/sysmem.d" -MT"startup/sysmem.o" -o "startup/sysmem.o" "../startup/sysmem.c"
|
||||
Finished building: ../startup/sysmem.c
|
||||
|
||||
Building file: ../src/freeRTOSFixes.c
|
||||
Invoking: MCU GCC Compiler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/LED/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/freeRTOSFixes.d" -MT"src/freeRTOSFixes.o" -o "src/freeRTOSFixes.o" "../src/freeRTOSFixes.c"
|
||||
../src/freeRTOSFixes.c: In function 'OS_logTaskInfo':
|
||||
../src/freeRTOSFixes.c:65:27: warning: variable 'highWaterMark' set but not used [-Wunused-but-set-variable]
|
||||
unsigned portBASE_TYPE highWaterMark;
|
||||
^~~~~~~~~~~~~
|
||||
Finished building: ../src/freeRTOSFixes.c
|
||||
|
||||
Building file: ../src/main.c
|
||||
Invoking: MCU GCC Compiler
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
|
||||
Finished building: ../src/main.c
|
||||
|
||||
Building target: hsb-mrts.elf
|
||||
Invoking: MCU GCC Linker
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -Wl,-Map=output.map -Wl,--gc-sections -o "hsb-mrts.elf" @"objects.list" -lm
|
||||
src/freeRTOSFixes.o: In function `_init':
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug/../src/freeRTOSFixes.c:61: multiple definition of `_init'
|
||||
c:/users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/armv7-m/crti.o:(.init+0x0): first defined here
|
||||
startup/sysmem.o: In function `_sbrk':
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug/../startup/sysmem.c:63: multiple definition of `_sbrk'
|
||||
src/freeRTOSFixes.o:freeRTOSFixes.c:(.text._sbrk+0x0): first defined here
|
||||
c:/users/mmi/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.13.3.201707031232/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7-m\libc.a(lib_a-exit.o): In function `exit':
|
||||
exit.c:(.text.exit+0x16): undefined reference to `_exit'
|
||||
src/main.o: In function `main':
|
||||
C:\workspace\0387-hsb-mrts\trunk\S - Software\0 - HSB MRTS Kathode-MCP\3 - Implementation\0 - Code\hsb-mrts\Debug/../src/main.c:72: undefined reference to `vTaskStartScheduler'
|
||||
collect2.exe: error: ld returned 1 exit status
|
||||
make: *** [hsb-mrts.elf] Error 1
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -DSTM32F107VCTx -DSTM32F1 -DSTM32 -DDEBUG -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/LED/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/portable/GCC/ARM_CM3" -I"C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/FreeRTOS/Source/include" -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
|
||||
In file included from ../src/main.c:34:0:
|
||||
C:/workspace/0387-hsb-mrts/trunk/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc/platform.h:37:23: fatal error: stm32f10x.h: No such file or directory
|
||||
#include "stm32f10x.h"
|
||||
^
|
||||
compilation terminated.
|
||||
make: *** [src/main.o] Error 1
|
||||
src/subdir.mk:21: recipe for target 'src/main.o' failed
|
||||
|
||||
12:43:23 Build Finished (took 846ms)
|
||||
12:38:34 Build Finished (took 1s.547ms)
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
.GLB _vSoftwareInterruptISR
|
||||
.GLB _vSoftwareInterruptEntry
|
||||
|
||||
.SECTION P,CODE
|
||||
|
||||
_vSoftwareInterruptEntry:
|
||||
|
||||
BRA _vSoftwareInterruptISR
|
||||
|
||||
.RVECTOR 27, _vSoftwareInterruptEntry
|
||||
|
||||
.END
|
||||
|
||||
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
GROUP{
|
||||
libgcc.a
|
||||
libg.a
|
||||
libc.a
|
||||
libm.a
|
||||
libnosys.a
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the MSP430 port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/* Constants required for hardware setup. The tick ISR runs off the ACLK,
|
||||
not the MCLK. */
|
||||
#define portACLK_FREQUENCY_HZ ( ( TickType_t ) 32768 )
|
||||
#define portINITIAL_CRITICAL_NESTING ( ( uint16_t ) 10 )
|
||||
#define portFLAGS_INT_ENABLED ( ( StackType_t ) 0x08 )
|
||||
|
||||
/* We require the address of the pxCurrentTCB variable, but don't want to know
|
||||
any details of its type. */
|
||||
typedef void TCB_t;
|
||||
extern volatile TCB_t * volatile pxCurrentTCB;
|
||||
|
||||
/* Each task maintains a count of the critical section nesting depth. Each
|
||||
time a critical section is entered the count is incremented. Each time a
|
||||
critical section is exited the count is decremented - with interrupts only
|
||||
being re-enabled if the count is zero.
|
||||
|
||||
usCriticalNesting will get set to zero when the scheduler starts, but must
|
||||
not be initialised to zero as this will cause problems during the startup
|
||||
sequence. */
|
||||
volatile uint16_t usCriticalNesting = portINITIAL_CRITICAL_NESTING;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
/*
|
||||
* Sets up the periodic ISR used for the RTOS tick. This uses timer 0, but
|
||||
* could have alternatively used the watchdog timer or timer 1.
|
||||
*/
|
||||
void prvSetupTimerInterrupt( void );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Initialise the stack of a task to look exactly as if a call to
|
||||
* portSAVE_CONTEXT had been called.
|
||||
*
|
||||
* See the header file portable.h.
|
||||
*/
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
{
|
||||
/*
|
||||
Place a few bytes of known values on the bottom of the stack.
|
||||
This is just useful for debugging and can be included if required.
|
||||
|
||||
*pxTopOfStack = ( StackType_t ) 0x1111;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x2222;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x3333;
|
||||
pxTopOfStack--;
|
||||
*/
|
||||
|
||||
/* The msp430 automatically pushes the PC then SR onto the stack before
|
||||
executing an ISR. We want the stack to look just as if this has happened
|
||||
so place a pointer to the start of the task on the stack first - followed
|
||||
by the flags we want the task to use when it starts up. */
|
||||
*pxTopOfStack = ( StackType_t ) pxCode;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = portFLAGS_INT_ENABLED;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* Next the general purpose registers. */
|
||||
*pxTopOfStack = ( StackType_t ) 0x4444;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x5555;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x6666;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x7777;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x8888;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x9999;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xaaaa;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xbbbb;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xcccc;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xdddd;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xeeee;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* When the task starts is will expect to find the function parameter in
|
||||
R15. */
|
||||
*pxTopOfStack = ( StackType_t ) pvParameters;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* A variable is used to keep track of the critical section nesting.
|
||||
This variable has to be stored as part of the task context and is
|
||||
initially set to zero. */
|
||||
*pxTopOfStack = ( StackType_t ) portNO_CRITICAL_SECTION_NESTING;
|
||||
|
||||
/* Return a pointer to the top of the stack we have generated so this can
|
||||
be stored in the task control block for the task. */
|
||||
return pxTopOfStack;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the MSP430 port will get stopped. If required simply
|
||||
disable the tick interrupt here. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Hardware initialisation to generate the RTOS tick. This uses timer 0
|
||||
* but could alternatively use the watchdog timer or timer 1.
|
||||
*/
|
||||
void prvSetupTimerInterrupt( void )
|
||||
{
|
||||
/* Ensure the timer is stopped. */
|
||||
TACTL = 0;
|
||||
|
||||
/* Run the timer of the ACLK. */
|
||||
TACTL = TASSEL_1;
|
||||
|
||||
/* Clear everything to start with. */
|
||||
TACTL |= TACLR;
|
||||
|
||||
/* Set the compare match value according to the tick rate we want. */
|
||||
TACCR0 = portACLK_FREQUENCY_HZ / configTICK_RATE_HZ;
|
||||
|
||||
/* Enable the interrupts. */
|
||||
TACCTL0 = CCIE;
|
||||
|
||||
/* Start up clean. */
|
||||
TACTL |= TACLR;
|
||||
|
||||
/* Up mode. */
|
||||
TACTL |= MC_1;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -1,286 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V1.00:
|
||||
|
||||
+ Call to taskYIELD() from within tick ISR has been replaced by the more
|
||||
efficient portSWITCH_CONTEXT().
|
||||
+ ISR function definitions renamed to include the prv prefix.
|
||||
|
||||
Changes from V2.6.1
|
||||
|
||||
+ Replaced the sUsingPreemption variable with the configUSE_PREEMPTION
|
||||
macro to be consistent with the later ports.
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the Flashlite 186
|
||||
* port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#include <dos.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "portasm.h"
|
||||
|
||||
/*lint -e950 Non ANSI reserved words okay in this file only. */
|
||||
|
||||
#define portTIMER_EOI_TYPE ( 8 )
|
||||
#define portRESET_PIC() portOUTPUT_WORD( ( uint16_t ) 0xff22, portTIMER_EOI_TYPE )
|
||||
#define portTIMER_INT_NUMBER 0x12
|
||||
|
||||
#define portTIMER_1_CONTROL_REGISTER ( ( uint16_t ) 0xff5e )
|
||||
#define portTIMER_0_CONTROL_REGISTER ( ( uint16_t ) 0xff56 )
|
||||
#define portTIMER_INTERRUPT_ENABLE ( ( uint16_t ) 0x2000 )
|
||||
|
||||
/* Setup the hardware to generate the required tick frequency. */
|
||||
static void prvSetTickFrequency( uint32_t ulTickRateHz );
|
||||
|
||||
/* Set the hardware back to the state as per before the scheduler started. */
|
||||
static void prvExitFunction( void );
|
||||
|
||||
/* The ISR used depends on whether the preemptive or cooperative scheduler
|
||||
is being used. */
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
/* Tick service routine used by the scheduler when preemptive scheduling is
|
||||
being used. */
|
||||
static void __interrupt __far prvPreemptiveTick( void );
|
||||
#else
|
||||
/* Tick service routine used by the scheduler when cooperative scheduling is
|
||||
being used. */
|
||||
static void __interrupt __far prvNonPreemptiveTick( void );
|
||||
#endif
|
||||
|
||||
/* Trap routine used by taskYIELD() to manually cause a context switch. */
|
||||
static void __interrupt __far prvYieldProcessor( void );
|
||||
|
||||
/*lint -e956 File scopes necessary here. */
|
||||
|
||||
/* Set true when the vectors are set so the scheduler will service the tick. */
|
||||
static BaseType_t xSchedulerRunning = pdFALSE;
|
||||
|
||||
/* Points to the original routine installed on the vector we use for manual
|
||||
context switches. This is then used to restore the original routine during
|
||||
prvExitFunction(). */
|
||||
static void ( __interrupt __far *pxOldSwitchISR )();
|
||||
|
||||
/* Used to restore the original DOS context when the scheduler is ended. */
|
||||
static jmp_buf xJumpBuf;
|
||||
|
||||
/*lint +e956 */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
/* This is called with interrupts already disabled. */
|
||||
|
||||
/* Remember what was on the interrupts we are going to use
|
||||
so we can put them back later if required. */
|
||||
pxOldSwitchISR = _dos_getvect( portSWITCH_INT_NUMBER );
|
||||
|
||||
/* Put our manual switch (yield) function on a known
|
||||
vector. */
|
||||
_dos_setvect( portSWITCH_INT_NUMBER, prvYieldProcessor );
|
||||
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
{
|
||||
/* Put our tick switch function on the timer interrupt. */
|
||||
_dos_setvect( portTIMER_INT_NUMBER, prvPreemptiveTick );
|
||||
}
|
||||
#else
|
||||
{
|
||||
/* We want the timer interrupt to just increment the tick count. */
|
||||
_dos_setvect( portTIMER_INT_NUMBER, prvNonPreemptiveTick );
|
||||
}
|
||||
#endif
|
||||
|
||||
prvSetTickFrequency( configTICK_RATE_HZ );
|
||||
|
||||
/* Clean up function if we want to return to DOS. */
|
||||
if( setjmp( xJumpBuf ) != 0 )
|
||||
{
|
||||
prvExitFunction();
|
||||
xSchedulerRunning = pdFALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xSchedulerRunning = pdTRUE;
|
||||
|
||||
/* Kick off the scheduler by setting up the context of the first task. */
|
||||
portFIRST_CONTEXT();
|
||||
}
|
||||
|
||||
return xSchedulerRunning;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The ISR used depends on whether the preemptive or cooperative scheduler
|
||||
is being used. */
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
static void __interrupt __far prvPreemptiveTick( void )
|
||||
{
|
||||
/* Get the scheduler to update the task states following the tick. */
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* Switch in the context of the next task to be run. */
|
||||
portSWITCH_CONTEXT();
|
||||
}
|
||||
|
||||
/* Reset the PIC ready for the next time. */
|
||||
portRESET_PIC();
|
||||
}
|
||||
#else
|
||||
static void __interrupt __far prvNonPreemptiveTick( void )
|
||||
{
|
||||
/* Same as preemptive tick, but the cooperative scheduler is being used
|
||||
so we don't have to switch in the context of the next task. */
|
||||
xTaskIncrementTick();
|
||||
portRESET_PIC();
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void __interrupt __far prvYieldProcessor( void )
|
||||
{
|
||||
/* Switch in the context of the next task to be run. */
|
||||
portSWITCH_CONTEXT();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Jump back to the processor state prior to starting the
|
||||
scheduler. This means we are not going to be using a
|
||||
task stack frame so the task can be deleted. */
|
||||
longjmp( xJumpBuf, 1 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvExitFunction( void )
|
||||
{
|
||||
const uint16_t usTimerDisable = 0x0000;
|
||||
uint16_t usTimer0Control;
|
||||
|
||||
/* Interrupts should be disabled here anyway - but no
|
||||
harm in making sure. */
|
||||
portDISABLE_INTERRUPTS();
|
||||
if( xSchedulerRunning == pdTRUE )
|
||||
{
|
||||
/* Put back the switch interrupt routines that was in place
|
||||
before the scheduler started. */
|
||||
_dos_setvect( portSWITCH_INT_NUMBER, pxOldSwitchISR );
|
||||
}
|
||||
|
||||
/* Disable the timer used for the tick to ensure the scheduler is
|
||||
not called before restoring interrupts. There was previously nothing
|
||||
on this timer so there is no old ISR to restore. */
|
||||
portOUTPUT_WORD( portTIMER_1_CONTROL_REGISTER, usTimerDisable );
|
||||
|
||||
/* Restart the DOS tick. */
|
||||
usTimer0Control = portINPUT_WORD( portTIMER_0_CONTROL_REGISTER );
|
||||
usTimer0Control |= portTIMER_INTERRUPT_ENABLE;
|
||||
portOUTPUT_WORD( portTIMER_0_CONTROL_REGISTER, usTimer0Control );
|
||||
|
||||
|
||||
portENABLE_INTERRUPTS();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetTickFrequency( uint32_t ulTickRateHz )
|
||||
{
|
||||
const uint16_t usMaxCountRegister = 0xff5a;
|
||||
const uint16_t usTimerPriorityRegister = 0xff32;
|
||||
const uint16_t usTimerEnable = 0xC000;
|
||||
const uint16_t usRetrigger = 0x0001;
|
||||
const uint16_t usTimerHighPriority = 0x0000;
|
||||
uint16_t usTimer0Control;
|
||||
|
||||
/* ( CPU frequency / 4 ) / clock 2 max count [inpw( 0xff62 ) = 7] */
|
||||
|
||||
const uint32_t ulClockFrequency = ( uint32_t ) 0x7f31a0UL;
|
||||
|
||||
uint32_t ulTimerCount = ulClockFrequency / ulTickRateHz;
|
||||
|
||||
portOUTPUT_WORD( portTIMER_1_CONTROL_REGISTER, usTimerEnable | portTIMER_INTERRUPT_ENABLE | usRetrigger );
|
||||
portOUTPUT_WORD( usMaxCountRegister, ( uint16_t ) ulTimerCount );
|
||||
portOUTPUT_WORD( usTimerPriorityRegister, usTimerHighPriority );
|
||||
|
||||
/* Stop the DOS tick - don't do this if you want to maintain a TOD clock. */
|
||||
usTimer0Control = portINPUT_WORD( portTIMER_0_CONTROL_REGISTER );
|
||||
usTimer0Control &= ~portTIMER_INTERRUPT_ENABLE;
|
||||
portOUTPUT_WORD( portTIMER_0_CONTROL_REGISTER, usTimer0Control );
|
||||
}
|
||||
|
||||
|
||||
/*lint +e950 */
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
GROUP (libc.a)
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/ Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -xc -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,85 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void _init(void) {return;}
|
||||
char * sbrk( size_t x )
|
||||
{
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) x;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -1,68 +0,0 @@
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
.GLB _vSoftwareInterruptISR
|
||||
.GLB _vSoftwareInterruptEntry
|
||||
|
||||
.SECTION P,CODE
|
||||
|
||||
_vSoftwareInterruptEntry:
|
||||
|
||||
BRA _vSoftwareInterruptISR
|
||||
|
||||
.RVECTOR 27, _vSoftwareInterruptEntry
|
||||
|
||||
.END
|
||||
|
||||
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/ Libraries/CMSIS/DeviceSupport/ST/STM32F10x/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -xc -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,110 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "task.h"
|
||||
#include "freeRTOSFixes.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void _init(void) {return;}
|
||||
|
||||
void OS_logTaskInfo(xTaskHandle taskHandle)
|
||||
{
|
||||
unsigned portBASE_TYPE highWaterMark;
|
||||
char text[128];
|
||||
|
||||
snprintf(text, sizeof(text), "Task %s\n", pcTaskGetTaskName(taskHandle));
|
||||
// Shell_sendString(text);
|
||||
|
||||
highWaterMark = uxTaskGetStackHighWaterMark(taskHandle);
|
||||
// snprintf(text, sizeof(text), "Stack high water mark : %lu long words\n", highWaterMark);
|
||||
// Shell_sendString(text);
|
||||
}
|
||||
|
||||
// Implementation for libc, needed for printf related functions.
|
||||
caddr_t _sbrk(int incr)
|
||||
{
|
||||
extern char _end;
|
||||
static char* heap_end;
|
||||
char* prev_heap_end;
|
||||
|
||||
if(heap_end == 0)
|
||||
{
|
||||
heap_end = &_end;
|
||||
}
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
heap_end += incr;
|
||||
return (caddr_t)prev_heap_end;
|
||||
}
|
||||
|
||||
// Stack overflow hook
|
||||
void vApplicationStackOverflowHook(xTaskHandle xTask, signed portCHAR* pcTaskName)
|
||||
{
|
||||
// Logger_fatal(FATALCODE_STACKOVERFLOW);
|
||||
}
|
||||
|
||||
// Malloc failed hook
|
||||
void vApplicationMallocFailedHook(void)
|
||||
{
|
||||
// Logger_fatal(FATALCODE_MALLOCFAILED);
|
||||
}
|
||||
|
||||
// Assert for StdPeriph library
|
||||
void assert_failed(uint8_t* file, uint32_t line)
|
||||
{
|
||||
// Logger_log((char*)file, "", line, LOGTYPE_ERROR, "assert failed");
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,313 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the SH2A port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Library includes. */
|
||||
#include "string.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The SR assigned to a newly created task. The only important thing in this
|
||||
value is for all interrupts to be enabled. */
|
||||
#define portINITIAL_SR ( 0UL )
|
||||
|
||||
/* Dimensions the array into which the floating point context is saved.
|
||||
Allocate enough space for FPR0 to FPR15, FPUL and FPSCR, each of which is 4
|
||||
bytes big. If this number is changed then the 72 in portasm.src also needs
|
||||
changing. */
|
||||
#define portFLOP_REGISTERS_TO_STORE ( 18 )
|
||||
#define portFLOP_STORAGE_SIZE ( portFLOP_REGISTERS_TO_STORE * 4 )
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
|
||||
#error configSUPPORT_DYNAMIC_ALLOCATION must be 1 to use this port.
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The TRAPA handler used to force a context switch.
|
||||
*/
|
||||
void vPortYield( void );
|
||||
|
||||
/*
|
||||
* Function to start the first task executing - defined in portasm.src.
|
||||
*/
|
||||
extern void vPortStartFirstTask( void );
|
||||
|
||||
/*
|
||||
* Obtains the current GBR value - defined in portasm.src.
|
||||
*/
|
||||
extern uint32_t ulPortGetGBR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
{
|
||||
/* Mark the end of the stack - used for debugging only and can be removed. */
|
||||
*pxTopOfStack = 0x11111111UL;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x22222222UL;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x33333333UL;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* SR. */
|
||||
*pxTopOfStack = portINITIAL_SR;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* PC. */
|
||||
*pxTopOfStack = ( uint32_t ) pxCode;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* PR. */
|
||||
*pxTopOfStack = 15;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* 14. */
|
||||
*pxTopOfStack = 14;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R13. */
|
||||
*pxTopOfStack = 13;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R12. */
|
||||
*pxTopOfStack = 12;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R11. */
|
||||
*pxTopOfStack = 11;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R10. */
|
||||
*pxTopOfStack = 10;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R9. */
|
||||
*pxTopOfStack = 9;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R8. */
|
||||
*pxTopOfStack = 8;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R7. */
|
||||
*pxTopOfStack = 7;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R6. */
|
||||
*pxTopOfStack = 6;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R5. */
|
||||
*pxTopOfStack = 5;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R4. */
|
||||
*pxTopOfStack = ( uint32_t ) pvParameters;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R3. */
|
||||
*pxTopOfStack = 3;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R2. */
|
||||
*pxTopOfStack = 2;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R1. */
|
||||
*pxTopOfStack = 1;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R0 */
|
||||
*pxTopOfStack = 0;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* MACL. */
|
||||
*pxTopOfStack = 16;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* MACH. */
|
||||
*pxTopOfStack = 17;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* GBR. */
|
||||
*pxTopOfStack = ulPortGetGBR();
|
||||
|
||||
/* GBR = global base register.
|
||||
VBR = vector base register.
|
||||
TBR = jump table base register.
|
||||
R15 is the stack pointer. */
|
||||
|
||||
return pxTopOfStack;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
extern void vApplicationSetupTimerInterrupt( void );
|
||||
|
||||
/* Call an application function to set up the timer that will generate the
|
||||
tick interrupt. This way the application can decide which peripheral to
|
||||
use. A demo application is provided to show a suitable example. */
|
||||
vApplicationSetupTimerInterrupt();
|
||||
|
||||
/* Start the first task. This will only restore the standard registers and
|
||||
not the flop registers. This does not really matter though because the only
|
||||
flop register that is initialised to a particular value is fpscr, and it is
|
||||
only initialised to the current value, which will still be the current value
|
||||
when the first task starts executing. */
|
||||
trapa( portSTART_SCHEDULER_TRAP_NO );
|
||||
|
||||
/* Should not get here. */
|
||||
return pdFAIL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortYield( void )
|
||||
{
|
||||
int32_t lInterruptMask;
|
||||
|
||||
/* Ensure the yield trap runs at the same priority as the other interrupts
|
||||
that can cause a context switch. */
|
||||
lInterruptMask = get_imask();
|
||||
|
||||
/* taskYIELD() can only be called from a task, not an interrupt, so the
|
||||
current interrupt mask can only be 0 or portKERNEL_INTERRUPT_PRIORITY and
|
||||
the mask can be set without risk of accidentally lowering the mask value. */
|
||||
set_imask( portKERNEL_INTERRUPT_PRIORITY );
|
||||
|
||||
trapa( portYIELD_TRAP_NO );
|
||||
|
||||
/* Restore the interrupt mask to whatever it was previously (when the
|
||||
function was entered). */
|
||||
set_imask( ( int ) lInterruptMask );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xPortUsesFloatingPoint( TaskHandle_t xTask )
|
||||
{
|
||||
uint32_t *pulFlopBuffer;
|
||||
BaseType_t xReturn;
|
||||
extern void * volatile pxCurrentTCB;
|
||||
|
||||
/* This function tells the kernel that the task referenced by xTask is
|
||||
going to use the floating point registers and therefore requires the
|
||||
floating point registers saved as part of its context. */
|
||||
|
||||
/* Passing NULL as xTask is used to indicate that the calling task is the
|
||||
subject task - so pxCurrentTCB is the task handle. */
|
||||
if( xTask == NULL )
|
||||
{
|
||||
xTask = ( TaskHandle_t ) pxCurrentTCB;
|
||||
}
|
||||
|
||||
/* Allocate a buffer large enough to hold all the flop registers. */
|
||||
pulFlopBuffer = ( uint32_t * ) pvPortMalloc( portFLOP_STORAGE_SIZE );
|
||||
|
||||
if( pulFlopBuffer != NULL )
|
||||
{
|
||||
/* Start with the registers in a benign state. */
|
||||
memset( ( void * ) pulFlopBuffer, 0x00, portFLOP_STORAGE_SIZE );
|
||||
|
||||
/* The first thing to get saved in the buffer is the FPSCR value -
|
||||
initialise this to the current FPSCR value. */
|
||||
*pulFlopBuffer = get_fpscr();
|
||||
|
||||
/* Use the task tag to point to the flop buffer. Pass pointer to just
|
||||
above the buffer because the flop save routine uses a pre-decrement. */
|
||||
vTaskSetApplicationTaskTag( xTask, ( void * ) ( pulFlopBuffer + portFLOP_REGISTERS_TO_STORE ) );
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file FreeRTOSConfig.h
|
||||
/// @brief File description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @defgroup {group_name} {group_description}
|
||||
/// Description
|
||||
|
||||
/// @file FreeRTOSConfig.h
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
#ifndef FREERTOSCONFIG_H_
|
||||
#define FREERTOSCONFIG_H_
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
#define configUSE_TICKLESS_IDLE 0
|
||||
#define configCPU_CLOCK_HZ ((unsigned long) 120000000)
|
||||
#define configTICK_RATE_HZ ((portTickType) 1000)
|
||||
#define configMAX_PRIORITIES ((unsigned portBASE_TYPE) 5)
|
||||
#define configMINIMAL_STACK_SIZE ((unsigned short) 768)
|
||||
#define configTOTAL_HEAP_SIZE ((size_t) 0xF600)
|
||||
#define configMAX_TASK_NAME_LEN (16)
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configUSE_RECURSIVE_MUTEXES 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 0
|
||||
#define configUSE_ALTERNATIVE_API 0 /* Deprecated! */
|
||||
#define configQUEUE_REGISTRY_SIZE (10)
|
||||
|
||||
/* Hook function related definitions. */
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
|
||||
/* Run time stats gathering related definitions. */
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
|
||||
/* Co-routine related definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES (1)
|
||||
|
||||
/* Software timer related definitions. */
|
||||
#define configUSE_TIMERS 1
|
||||
#define configTIMER_TASK_PRIORITY (4)
|
||||
#define configTIMER_QUEUE_LENGTH (10)
|
||||
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
|
||||
|
||||
/* Interrupt nesting behaviour configuration. */
|
||||
#define configKERNEL_INTERRUPT_PRIORITY 255
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191
|
||||
|
||||
/* Define to trap errors during development. */
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) for(;;)
|
||||
|
||||
/* Optional functions - most linkers will remove unused functions anyway. */
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_xResumeFromISR 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
#define INCLUDE_xTaskGetSchedulerState 1
|
||||
#define INCLUDE_xTaskGetCurrentTaskHandle 1
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||
#define INCLUDE_xTaskGetIdleTaskHandle 0
|
||||
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
|
||||
#define INCLUDE_pcTaskGetTaskName 1
|
||||
#define INCLUDE_eTaskGetState 0
|
||||
|
||||
#define vPortSVCHandler SVC_Handler
|
||||
#define xPortPendSVHandler PendSV_Handler
|
||||
#define xPortSysTickHandler SysTick_Handler
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif /* FREERTOSCONFIG_H_ */
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-exceptions -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map -lc
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,59 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -xc -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,128 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,84 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "freeRTOSFixes.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void vApplicationTickHook ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef PORTMACRO_H
|
||||
#define PORTMACRO_H
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Port specific definitions.
|
||||
*
|
||||
* The settings in this file configure FreeRTOS correctly for the
|
||||
* given hardware and compiler.
|
||||
*
|
||||
* These settings should not be altered.
|
||||
*-----------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Type definitions. */
|
||||
#define portCHAR char
|
||||
#define portFLOAT float
|
||||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT int
|
||||
#define portSTACK_TYPE uint16_t
|
||||
#define portBASE_TYPE short
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef short BaseType_t;
|
||||
typedef unsigned short UBaseType_t;
|
||||
|
||||
|
||||
#if( configUSE_16_BIT_TICKS == 1 )
|
||||
typedef uint16_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||
#else
|
||||
typedef uint32_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Interrupt control macros. */
|
||||
#define portDISABLE_INTERRUPTS() _DINT(); _NOP()
|
||||
#define portENABLE_INTERRUPTS() _EINT();
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Critical section control macros. */
|
||||
#define portNO_CRITICAL_SECTION_NESTING ( ( uint16_t ) 0 )
|
||||
|
||||
#define portENTER_CRITICAL() \
|
||||
{ \
|
||||
extern volatile uint16_t usCriticalNesting; \
|
||||
\
|
||||
portDISABLE_INTERRUPTS(); \
|
||||
\
|
||||
/* Now interrupts are disabled usCriticalNesting can be accessed */ \
|
||||
/* directly. Increment ulCriticalNesting to keep a count of how many */ \
|
||||
/* times portENTER_CRITICAL() has been called. */ \
|
||||
usCriticalNesting++; \
|
||||
}
|
||||
|
||||
#define portEXIT_CRITICAL() \
|
||||
{ \
|
||||
extern volatile uint16_t usCriticalNesting; \
|
||||
\
|
||||
if( usCriticalNesting > portNO_CRITICAL_SECTION_NESTING ) \
|
||||
{ \
|
||||
/* Decrement the nesting count as we are leaving a critical section. */ \
|
||||
usCriticalNesting--; \
|
||||
\
|
||||
/* If the nesting level has reached zero then interrupts should be */ \
|
||||
/* re-enabled. */ \
|
||||
if( usCriticalNesting == portNO_CRITICAL_SECTION_NESTING ) \
|
||||
{ \
|
||||
portENABLE_INTERRUPTS(); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task utilities. */
|
||||
|
||||
/*
|
||||
* Manual context switch called by portYIELD or taskYIELD.
|
||||
*/
|
||||
extern void vPortYield( void );
|
||||
#define portYIELD() vPortYield()
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hardware specifics. */
|
||||
#define portBYTE_ALIGNMENT 2
|
||||
#define portSTACK_GROWTH ( -1 )
|
||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
#define portNOP()
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
||||
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) __toplevel
|
||||
|
||||
#if configINTERRUPT_EXAMPLE_METHOD == 2
|
||||
|
||||
extern void vTaskSwitchContext( void );
|
||||
#define portYIELD_FROM_ISR( x ) if( x ) vTaskSwitchContext()
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* PORTMACRO_H */
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
GROUP
|
||||
(
|
||||
libgcc.a
|
||||
libc.a
|
||||
libm.a
|
||||
libnosys.a
|
||||
)
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,53 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file FreeRTOSConfig.h
|
||||
/// @brief File description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @defgroup {group_name} {group_description}
|
||||
/// Description
|
||||
|
||||
/// @file FreeRTOSConfig.h
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
#ifndef FREERTOSCONFIG_H_
|
||||
#define FREERTOSCONFIG_H_
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif /* FREERTOSCONFIG_H_ */
|
||||
@@ -1,131 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,187 +0,0 @@
|
||||
;
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
|
||||
; * The definition of the "register test" tasks, as described at the top of
|
||||
; * main.c
|
||||
|
||||
.include data_model.h
|
||||
|
||||
.global xTaskIncrementTick
|
||||
.global vTaskSwitchContext
|
||||
.global vPortSetupTimerInterrupt
|
||||
.global pxCurrentTCB
|
||||
.global usCriticalNesting
|
||||
|
||||
.def vPortPreemptiveTickISR
|
||||
.def vPortCooperativeTickISR
|
||||
.def vPortYield
|
||||
.def xPortStartScheduler
|
||||
|
||||
;-----------------------------------------------------------
|
||||
|
||||
portSAVE_CONTEXT .macro
|
||||
|
||||
;Save the remaining registers.
|
||||
pushm_x #12, r15
|
||||
mov.w &usCriticalNesting, r14
|
||||
push_x r14
|
||||
mov_x &pxCurrentTCB, r12
|
||||
mov_x sp, 0( r12 )
|
||||
.endm
|
||||
;-----------------------------------------------------------
|
||||
|
||||
portRESTORE_CONTEXT .macro
|
||||
|
||||
mov_x &pxCurrentTCB, r12
|
||||
mov_x @r12, sp
|
||||
pop_x r15
|
||||
mov.w r15, &usCriticalNesting
|
||||
popm_x #12, r15
|
||||
nop
|
||||
pop.w sr
|
||||
nop
|
||||
ret_x
|
||||
.endm
|
||||
;-----------------------------------------------------------
|
||||
|
||||
;*
|
||||
;* The RTOS tick ISR.
|
||||
;*
|
||||
;* If the cooperative scheduler is in use this simply increments the tick
|
||||
;* count.
|
||||
;*
|
||||
;* If the preemptive scheduler is in use a context switch can also occur.
|
||||
;*/
|
||||
|
||||
.text
|
||||
.align 2
|
||||
|
||||
vPortPreemptiveTickISR: .asmfunc
|
||||
|
||||
; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs
|
||||
;to save it manually before it gets modified (interrupts get disabled).
|
||||
push.w sr
|
||||
portSAVE_CONTEXT
|
||||
|
||||
call_x #xTaskIncrementTick
|
||||
call_x #vTaskSwitchContext
|
||||
|
||||
portRESTORE_CONTEXT
|
||||
.endasmfunc
|
||||
;-----------------------------------------------------------
|
||||
|
||||
.align 2
|
||||
|
||||
vPortCooperativeTickISR: .asmfunc
|
||||
|
||||
; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs
|
||||
;to save it manually before it gets modified (interrupts get disabled).
|
||||
push.w sr
|
||||
portSAVE_CONTEXT
|
||||
|
||||
call_x #xTaskIncrementTick
|
||||
|
||||
portRESTORE_CONTEXT
|
||||
|
||||
.endasmfunc
|
||||
;-----------------------------------------------------------
|
||||
|
||||
;
|
||||
; Manual context switch called by the portYIELD() macro.
|
||||
;
|
||||
|
||||
.align 2
|
||||
|
||||
vPortYield: .asmfunc
|
||||
|
||||
; The sr needs saving before it is modified.
|
||||
push.w sr
|
||||
|
||||
; Now the SR is stacked we can disable interrupts.
|
||||
dint
|
||||
nop
|
||||
|
||||
; Save the context of the current task.
|
||||
portSAVE_CONTEXT
|
||||
|
||||
; Select the next task to run.
|
||||
call_x #vTaskSwitchContext
|
||||
|
||||
; Restore the context of the new task.
|
||||
portRESTORE_CONTEXT
|
||||
.endasmfunc
|
||||
;-----------------------------------------------------------
|
||||
|
||||
|
||||
;
|
||||
; Start off the scheduler by initialising the RTOS tick timer, then restoring
|
||||
; the context of the first task.
|
||||
;
|
||||
|
||||
.align 2
|
||||
|
||||
xPortStartScheduler: .asmfunc
|
||||
|
||||
; Setup the hardware to generate the tick. Interrupts are disabled
|
||||
; when this function is called.
|
||||
call_x #vPortSetupTimerInterrupt
|
||||
|
||||
; Restore the context of the first task that is going to run.
|
||||
portRESTORE_CONTEXT
|
||||
.endasmfunc
|
||||
;-----------------------------------------------------------
|
||||
|
||||
.end
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
DEV_DIR = Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
|
||||
COR_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I$(DEV_DIR) -I$(COR_DIR) -I. -Werror=implicit-function-declaration
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,75 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,89 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void _init(void) {return;}
|
||||
char * _sbrk( size_t x )
|
||||
{
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) x;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void vApplicationTickHook ()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
DEV_DIR = Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
|
||||
COR_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I$(DEV_DIR) -I$(COR_DIR) -I. -Werror
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef PORTMACRO_H
|
||||
#define PORTMACRO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Port specific definitions.
|
||||
*
|
||||
* The settings in this file configure FreeRTOS correctly for the
|
||||
* given hardware and compiler.
|
||||
*
|
||||
* These settings should not be altered.
|
||||
*-----------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Type definitions. */
|
||||
#define portCHAR char
|
||||
#define portFLOAT float
|
||||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT short
|
||||
#define portSTACK_TYPE uint32_t
|
||||
#define portBASE_TYPE long
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef long BaseType_t;
|
||||
typedef unsigned long UBaseType_t;
|
||||
|
||||
|
||||
#if( configUSE_16_BIT_TICKS == 1 )
|
||||
typedef uint16_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||
#else
|
||||
typedef uint32_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hardware specifics. */
|
||||
#define portBYTE_ALIGNMENT 4
|
||||
#define portSTACK_GROWTH -1
|
||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
uint32_t ulPortSetIPL( uint32_t );
|
||||
#define portDISABLE_INTERRUPTS() ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#define portENABLE_INTERRUPTS() ulPortSetIPL( 0 )
|
||||
|
||||
|
||||
extern void vPortEnterCritical( void );
|
||||
extern void vPortExitCritical( void );
|
||||
#define portENTER_CRITICAL() vPortEnterCritical()
|
||||
#define portEXIT_CRITICAL() vPortExitCritical()
|
||||
|
||||
extern UBaseType_t uxPortSetInterruptMaskFromISR( void );
|
||||
extern void vPortClearInterruptMaskFromISR( UBaseType_t );
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) ulPortSetIPL( uxSavedStatusRegister )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task utilities. */
|
||||
#define portNOP() asm volatile ( "nop" )
|
||||
|
||||
/* Context switches are requested using the force register. */
|
||||
#define portYIELD() INTC_SFRC = 0x3E; portNOP(); portNOP(); portNOP(); portNOP(); portNOP()
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
||||
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__((noreturn))
|
||||
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) \
|
||||
{ \
|
||||
portYIELD(); \
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PORTMACRO_H */
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -xc -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
GROUP: (libc.a)
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -1,202 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void _init(void) {return;}
|
||||
char * _sbrk( size_t x )
|
||||
{
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) x;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void vApplicationTickHook ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void vApplicationStackOverflowHook ()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "freeRTOSFixes.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void _init(void) {return;}
|
||||
|
||||
void OS_logTaskInfo(xTaskHandle taskHandle)
|
||||
{
|
||||
unsigned portBASE_TYPE highWaterMark;
|
||||
char text[128];
|
||||
|
||||
snprintf(text, sizeof(text), "Task %s\n", pcTaskGetTaskName(taskHandle));
|
||||
// Shell_sendString(text);
|
||||
|
||||
highWaterMark = uxTaskGetStackHighWaterMark(taskHandle);
|
||||
// snprintf(text, sizeof(text), "Stack high water mark : %lu long words\n", highWaterMark);
|
||||
// Shell_sendString(text);
|
||||
}
|
||||
|
||||
// Implementation for libc, needed for printf related functions.
|
||||
caddr_t _sbrk(int incr)
|
||||
{
|
||||
extern char _end;
|
||||
static char* heap_end;
|
||||
char* prev_heap_end;
|
||||
|
||||
if(heap_end == 0)
|
||||
{
|
||||
heap_end = &_end;
|
||||
}
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
heap_end += incr;
|
||||
return (caddr_t)prev_heap_end;
|
||||
}
|
||||
|
||||
// Stack overflow hook
|
||||
void vApplicationStackOverflowHook(xTaskHandle xTask, signed portCHAR* pcTaskName)
|
||||
{
|
||||
// Logger_fatal(FATALCODE_STACKOVERFLOW);
|
||||
}
|
||||
|
||||
// Malloc failed hook
|
||||
void vApplicationMallocFailedHook(void)
|
||||
{
|
||||
// Logger_fatal(FATALCODE_MALLOCFAILED);
|
||||
}
|
||||
|
||||
// Assert for StdPeriph library
|
||||
void assert_failed(uint8_t* file, uint32_t line)
|
||||
{
|
||||
// Logger_log((char*)file, "", line, LOGTYPE_ERROR, "assert failed");
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
freeRTOSFixes.c \
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -lc -lm -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,68 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
STM32_STDPERIPH_INC = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
CORE_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
DEVICE_SUPPORT_DIR = Libraries/CMSIS/CM3/DrviceSupport/ST/STM32F10x
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
|
||||
INCLUDE_DIRS = \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(CIRE_DIR) \
|
||||
-I$(DEVICE_SUPPORT_DIR) \
|
||||
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INCLUDE_DIRS)-I. -Wall -Werror -D"assert_param(expr)=((void)0)"
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,162 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V1.00:
|
||||
|
||||
+ pxPortInitialiseStack() now initialises the stack of new tasks to the
|
||||
same format used by the compiler. This allows the compiler generated
|
||||
interrupt mechanism to be used for context switches.
|
||||
|
||||
Changes from V2.6.1
|
||||
|
||||
+ Move usPortCheckFreeStackSpace() to tasks.c.
|
||||
*/
|
||||
|
||||
|
||||
#include <dos.h>
|
||||
#include <stdlib.h>
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* See header file for description. */
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
{
|
||||
StackType_t DS_Reg = 0;
|
||||
|
||||
/* Place a few bytes of known values on the bottom of the stack.
|
||||
This is just useful for debugging. */
|
||||
|
||||
*pxTopOfStack = 0x1111;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x2222;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x3333;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x4444;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x5555;
|
||||
pxTopOfStack--;
|
||||
|
||||
|
||||
/*lint -e950 -e611 -e923 Lint doesn't like this much - but nothing I can do about it. */
|
||||
|
||||
/* We are going to start the scheduler using a return from interrupt
|
||||
instruction to load the program counter, so first there would be the
|
||||
function call with parameters preamble. */
|
||||
|
||||
*pxTopOfStack = FP_SEG( pvParameters );
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = FP_OFF( pvParameters );
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = FP_SEG( pxCode );
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = FP_OFF( pxCode );
|
||||
pxTopOfStack--;
|
||||
|
||||
/* Next the status register and interrupt return address. */
|
||||
*pxTopOfStack = portINITIAL_SW;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = FP_SEG( pxCode );
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = FP_OFF( pxCode );
|
||||
pxTopOfStack--;
|
||||
|
||||
/* The remaining registers would be pushed on the stack by our context
|
||||
switch function. These are loaded with values simply to make debugging
|
||||
easier. */
|
||||
*pxTopOfStack = ( StackType_t ) 0xAAAA; /* AX */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xBBBB; /* BX */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xCCCC; /* CX */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xDDDD; /* DX */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xEEEE; /* ES */
|
||||
pxTopOfStack--;
|
||||
|
||||
/* We need the true data segment. */
|
||||
__asm{ MOV DS_Reg, DS };
|
||||
|
||||
*pxTopOfStack = DS_Reg; /* DS */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0x0123; /* SI */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xDDDD; /* DI */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) 0xBBBB; /* BP */
|
||||
|
||||
/*lint +e950 +e611 +e923 */
|
||||
|
||||
return pxTopOfStack;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,68 +0,0 @@
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
.GLB _vSoftwareInterruptISR
|
||||
.GLB _vSoftwareInterruptEntry
|
||||
|
||||
.SECTION P,CODE
|
||||
|
||||
_vSoftwareInterruptEntry:
|
||||
|
||||
BRA _vSoftwareInterruptISR
|
||||
|
||||
.RVECTOR 27, _vSoftwareInterruptEntry
|
||||
|
||||
.END
|
||||
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file freeRTOSFixes.h
|
||||
/// @brief File description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @defgroup {group_name} {group_description}
|
||||
/// Description
|
||||
|
||||
/// @file freeRTOSFixes.h
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
#ifndef FREERTOSFIXES_H_
|
||||
#define FREERTOSFIXES_H_
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#endif /* FREERTOSFIXES_H_ */
|
||||
@@ -1,204 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
GROUP (libc.a)
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
STM32_STDPERIPH_INC = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
CORE_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
DEVICE_SUPPORT_DIR = Libraries/CMSIS/CM3/DrviceSupport/ST/STM32F10x
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
|
||||
INCLUDE_DIRS = \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(CIRE_DIR) \
|
||||
#-I$(DEVICE_SUPPORT_DIR) \
|
||||
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT $(INCLUDE_DIRS) -I. -Wall -Werror -D"assert_param(expr)=((void)0)"
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,78 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,688 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the RX100 port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/* Standard C includes. */
|
||||
#include "limits.h"
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Library includes. */
|
||||
#include "string.h"
|
||||
|
||||
/* Hardware specifics. */
|
||||
#include "iodefine.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||
PSW is set with U and I set, and PM and IPL clear. */
|
||||
#define portINITIAL_PSW ( ( StackType_t ) 0x00030000 )
|
||||
|
||||
/* The peripheral clock is divided by this value before being supplying the
|
||||
CMT. */
|
||||
#if ( configUSE_TICKLESS_IDLE == 0 )
|
||||
/* If tickless idle is not used then the divisor can be fixed. */
|
||||
#define portCLOCK_DIVISOR 8UL
|
||||
#elif ( configPERIPHERAL_CLOCK_HZ >= 12000000 )
|
||||
#define portCLOCK_DIVISOR 512UL
|
||||
#elif ( configPERIPHERAL_CLOCK_HZ >= 6000000 )
|
||||
#define portCLOCK_DIVISOR 128UL
|
||||
#elif ( configPERIPHERAL_CLOCK_HZ >= 1000000 )
|
||||
#define portCLOCK_DIVISOR 32UL
|
||||
#else
|
||||
#define portCLOCK_DIVISOR 8UL
|
||||
#endif
|
||||
|
||||
|
||||
/* Keys required to lock and unlock access to certain system registers
|
||||
respectively. */
|
||||
#define portUNLOCK_KEY 0xA50B
|
||||
#define portLOCK_KEY 0xA500
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The following lines are to ensure vSoftwareInterruptEntry can be referenced,
|
||||
and therefore installed in the vector table, when the FreeRTOS code is built
|
||||
as a library. */
|
||||
extern BaseType_t vSoftwareInterruptEntry;
|
||||
const BaseType_t * p_vSoftwareInterruptEntry = &vSoftwareInterruptEntry;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Function to start the first task executing - written in asm code as direct
|
||||
* access to registers is required.
|
||||
*/
|
||||
static void prvStartFirstTask( void );
|
||||
|
||||
/*
|
||||
* Software interrupt handler. Performs the actual context switch (saving and
|
||||
* restoring of registers). Written in asm code as direct register access is
|
||||
* required.
|
||||
*/
|
||||
static void prvYieldHandler( void );
|
||||
|
||||
/*
|
||||
* The entry point for the software interrupt handler. This is the function
|
||||
* that calls the inline asm function prvYieldHandler(). It is installed in
|
||||
* the vector table, but the code that installs it is in prvYieldHandler rather
|
||||
* than using a #pragma.
|
||||
*/
|
||||
void vSoftwareInterruptISR( void );
|
||||
|
||||
/*
|
||||
* Sets up the periodic ISR used for the RTOS tick using the CMT.
|
||||
* The application writer can define configSETUP_TICK_INTERRUPT() (in
|
||||
* FreeRTOSConfig.h) such that their own tick interrupt configuration is used
|
||||
* in place of prvSetupTimerInterrupt().
|
||||
*/
|
||||
static void prvSetupTimerInterrupt( void );
|
||||
#ifndef configSETUP_TICK_INTERRUPT
|
||||
/* The user has not provided their own tick interrupt configuration so use
|
||||
the definition in this file (which uses the interval timer). */
|
||||
#define configSETUP_TICK_INTERRUPT() prvSetupTimerInterrupt()
|
||||
#endif /* configSETUP_TICK_INTERRUPT */
|
||||
|
||||
/*
|
||||
* Called after the sleep mode registers have been configured, prvSleep()
|
||||
* executes the pre and post sleep macros, and actually calls the wait
|
||||
* instruction.
|
||||
*/
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
static void prvSleep( TickType_t xExpectedIdleTime );
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* These is accessed by the inline assembler functions. */
|
||||
extern void *pxCurrentTCB;
|
||||
extern void vTaskSwitchContext( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Calculate how many clock increments make up a single tick period. */
|
||||
static const uint32_t ulMatchValueForOneTick = ( ( configPERIPHERAL_CLOCK_HZ / portCLOCK_DIVISOR ) / configTICK_RATE_HZ );
|
||||
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
|
||||
/* Holds the maximum number of ticks that can be suppressed - which is
|
||||
basically how far into the future an interrupt can be generated. Set
|
||||
during initialisation. This is the maximum possible value that the
|
||||
compare match register can hold divided by ulMatchValueForOneTick. */
|
||||
static const TickType_t xMaximumPossibleSuppressedTicks = USHRT_MAX / ( ( configPERIPHERAL_CLOCK_HZ / portCLOCK_DIVISOR ) / configTICK_RATE_HZ );
|
||||
|
||||
/* Flag set from the tick interrupt to allow the sleep processing to know if
|
||||
sleep mode was exited because of a tick interrupt, or an interrupt
|
||||
generated by something else. */
|
||||
static volatile uint32_t ulTickFlag = pdFALSE;
|
||||
|
||||
/* The CMT counter is stopped temporarily each time it is re-programmed.
|
||||
The following constant offsets the CMT counter match value by the number of
|
||||
CMT counts that would typically be missed while the counter was stopped to
|
||||
compensate for the lost time. The large difference between the divided CMT
|
||||
clock and the CPU clock means it is likely ulStoppedTimerCompensation will
|
||||
equal zero - and be optimised away. */
|
||||
static const uint32_t ulStoppedTimerCompensation = 100UL / ( configCPU_CLOCK_HZ / ( configPERIPHERAL_CLOCK_HZ / portCLOCK_DIVISOR ) );
|
||||
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
{
|
||||
/* Offset to end up on 8 byte boundary. */
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R0 is not included as it is the stack pointer. */
|
||||
*pxTopOfStack = 0x00;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x00;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = portINITIAL_PSW;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) pxCode;
|
||||
|
||||
/* When debugging it can be useful if every register is set to a known
|
||||
value. Otherwise code space can be saved by just setting the registers
|
||||
that need to be set. */
|
||||
#ifdef USE_FULL_REGISTER_INITIALISATION
|
||||
{
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x12345678; /* r15. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0xaaaabbbb;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0xdddddddd;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0xcccccccc;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0xbbbbbbbb;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0xaaaaaaaa;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x99999999;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x88888888;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x77777777;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x66666666;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x55555555;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x44444444;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x33333333;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x22222222;
|
||||
pxTopOfStack--;
|
||||
}
|
||||
#else
|
||||
{
|
||||
/* Leave space for the registers that will get popped from the stack
|
||||
when the task first starts executing. */
|
||||
pxTopOfStack -= 15;
|
||||
}
|
||||
#endif
|
||||
|
||||
*pxTopOfStack = ( StackType_t ) pvParameters; /* R1 */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x12345678; /* Accumulator. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x87654321; /* Accumulator. */
|
||||
|
||||
return pxTopOfStack;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
/* Use pxCurrentTCB just so it does not get optimised away. */
|
||||
if( pxCurrentTCB != NULL )
|
||||
{
|
||||
/* Call an application function to set up the timer that will generate
|
||||
the tick interrupt. This way the application can decide which
|
||||
peripheral to use. If tickless mode is used then the default
|
||||
implementation defined in this file (which uses CMT0) should not be
|
||||
overridden. */
|
||||
configSETUP_TICK_INTERRUPT();
|
||||
|
||||
/* Enable the software interrupt. */
|
||||
_IEN( _ICU_SWINT ) = 1;
|
||||
|
||||
/* Ensure the software interrupt is clear. */
|
||||
_IR( _ICU_SWINT ) = 0;
|
||||
|
||||
/* Ensure the software interrupt is set to the kernel priority. */
|
||||
_IPR( _ICU_SWINT ) = configKERNEL_INTERRUPT_PRIORITY;
|
||||
|
||||
/* Start the first task. */
|
||||
prvStartFirstTask();
|
||||
}
|
||||
|
||||
/* Execution should not reach here as the tasks are now running!
|
||||
prvSetupTimerInterrupt() is called here to prevent the compiler outputting
|
||||
a warning about a statically declared function not being referenced in the
|
||||
case that the application writer has provided their own tick interrupt
|
||||
configuration routine (and defined configSETUP_TICK_INTERRUPT() such that
|
||||
their own routine will be called in place of prvSetupTimerInterrupt()). */
|
||||
prvSetupTimerInterrupt();
|
||||
|
||||
/* Just to make sure the function is not optimised away. */
|
||||
( void ) vSoftwareInterruptISR();
|
||||
|
||||
/* Should not get here. */
|
||||
return pdFAIL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#pragma inline_asm prvStartFirstTask
|
||||
static void prvStartFirstTask( void )
|
||||
{
|
||||
/* When starting the scheduler there is nothing that needs moving to the
|
||||
interrupt stack because the function is not called from an interrupt.
|
||||
Just ensure the current stack is the user stack. */
|
||||
SETPSW U
|
||||
|
||||
/* Obtain the location of the stack associated with which ever task
|
||||
pxCurrentTCB is currently pointing to. */
|
||||
MOV.L #_pxCurrentTCB, R15
|
||||
MOV.L [R15], R15
|
||||
MOV.L [R15], R0
|
||||
|
||||
/* Restore the registers from the stack of the task pointed to by
|
||||
pxCurrentTCB. */
|
||||
POP R15
|
||||
MVTACLO R15 /* Accumulator low 32 bits. */
|
||||
POP R15
|
||||
MVTACHI R15 /* Accumulator high 32 bits. */
|
||||
POPM R1-R15 /* R1 to R15 - R0 is not included as it is the SP. */
|
||||
RTE /* This pops the remaining registers. */
|
||||
NOP
|
||||
NOP
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#pragma interrupt ( prvTickISR( vect = configTICK_VECTOR, enable ) )
|
||||
void prvTickISR( void )
|
||||
{
|
||||
/* Increment the tick, and perform any processing the new tick value
|
||||
necessitates. */
|
||||
set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||
{
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
}
|
||||
set_ipl( configKERNEL_INTERRUPT_PRIORITY );
|
||||
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
{
|
||||
/* The CPU woke because of a tick. */
|
||||
ulTickFlag = pdTRUE;
|
||||
|
||||
/* If this is the first tick since exiting tickless mode then the CMT
|
||||
compare match value needs resetting. */
|
||||
CMT0.CMCOR = ( uint16_t ) ulMatchValueForOneTick;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSoftwareInterruptISR( void )
|
||||
{
|
||||
prvYieldHandler();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#pragma inline_asm prvYieldHandler
|
||||
static void prvYieldHandler( void )
|
||||
{
|
||||
/* Re-enable interrupts. */
|
||||
SETPSW I
|
||||
|
||||
/* Move the data that was automatically pushed onto the interrupt stack
|
||||
when the interrupt occurred from the interrupt stack to the user stack.
|
||||
|
||||
R15 is saved before it is clobbered. */
|
||||
PUSH.L R15
|
||||
|
||||
/* Read the user stack pointer. */
|
||||
MVFC USP, R15
|
||||
|
||||
/* Move the address down to the data being moved. */
|
||||
SUB #12, R15
|
||||
MVTC R15, USP
|
||||
|
||||
/* Copy the data across. */
|
||||
MOV.L [ R0 ], [ R15 ] ; R15
|
||||
MOV.L 4[ R0 ], 4[ R15 ] ; PC
|
||||
MOV.L 8[ R0 ], 8[ R15 ] ; PSW
|
||||
|
||||
/* Move the interrupt stack pointer to its new correct position. */
|
||||
ADD #12, R0
|
||||
|
||||
/* All the rest of the registers are saved directly to the user stack. */
|
||||
SETPSW U
|
||||
|
||||
/* Save the rest of the general registers (R15 has been saved already). */
|
||||
PUSHM R1-R14
|
||||
|
||||
/* Save the accumulator. */
|
||||
MVFACHI R15
|
||||
PUSH.L R15
|
||||
MVFACMI R15 ; Middle order word.
|
||||
SHLL #16, R15 ; Shifted left as it is restored to the low order word.
|
||||
PUSH.L R15
|
||||
|
||||
/* Save the stack pointer to the TCB. */
|
||||
MOV.L #_pxCurrentTCB, R15
|
||||
MOV.L [ R15 ], R15
|
||||
MOV.L R0, [ R15 ]
|
||||
|
||||
/* Ensure the interrupt mask is set to the syscall priority while the
|
||||
kernel structures are being accessed. */
|
||||
MVTIPL #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||
|
||||
/* Select the next task to run. */
|
||||
BSR.A _vTaskSwitchContext
|
||||
|
||||
/* Reset the interrupt mask as no more data structure access is
|
||||
required. */
|
||||
MVTIPL #configKERNEL_INTERRUPT_PRIORITY
|
||||
|
||||
/* Load the stack pointer of the task that is now selected as the Running
|
||||
state task from its TCB. */
|
||||
MOV.L #_pxCurrentTCB,R15
|
||||
MOV.L [ R15 ], R15
|
||||
MOV.L [ R15 ], R0
|
||||
|
||||
/* Restore the context of the new task. The PSW (Program Status Word) and
|
||||
PC will be popped by the RTE instruction. */
|
||||
POP R15
|
||||
MVTACLO R15
|
||||
POP R15
|
||||
MVTACHI R15
|
||||
POPM R1-R15
|
||||
RTE
|
||||
NOP
|
||||
NOP
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
|
||||
/* The following line is just to prevent the symbol getting optimised away. */
|
||||
( void ) vTaskSwitchContext();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupTimerInterrupt( void )
|
||||
{
|
||||
/* Unlock. */
|
||||
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
||||
|
||||
/* Enable CMT0. */
|
||||
MSTP( CMT0 ) = 0;
|
||||
|
||||
/* Lock again. */
|
||||
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
||||
|
||||
/* Interrupt on compare match. */
|
||||
CMT0.CMCR.BIT.CMIE = 1;
|
||||
|
||||
/* Set the compare match value. */
|
||||
CMT0.CMCOR = ( uint16_t ) ulMatchValueForOneTick;
|
||||
|
||||
/* Divide the PCLK. */
|
||||
#if portCLOCK_DIVISOR == 512
|
||||
{
|
||||
CMT0.CMCR.BIT.CKS = 3;
|
||||
}
|
||||
#elif portCLOCK_DIVISOR == 128
|
||||
{
|
||||
CMT0.CMCR.BIT.CKS = 2;
|
||||
}
|
||||
#elif portCLOCK_DIVISOR == 32
|
||||
{
|
||||
CMT0.CMCR.BIT.CKS = 1;
|
||||
}
|
||||
#elif portCLOCK_DIVISOR == 8
|
||||
{
|
||||
CMT0.CMCR.BIT.CKS = 0;
|
||||
}
|
||||
#else
|
||||
{
|
||||
#error Invalid portCLOCK_DIVISOR setting
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Enable the interrupt... */
|
||||
_IEN( _CMT0_CMI0 ) = 1;
|
||||
|
||||
/* ...and set its priority to the application defined kernel priority. */
|
||||
_IPR( _CMT0_CMI0 ) = configKERNEL_INTERRUPT_PRIORITY;
|
||||
|
||||
/* Start the timer. */
|
||||
CMT.CMSTR0.BIT.STR0 = 1;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
|
||||
static void prvSleep( TickType_t xExpectedIdleTime )
|
||||
{
|
||||
/* Allow the application to define some pre-sleep processing. */
|
||||
configPRE_SLEEP_PROCESSING( xExpectedIdleTime );
|
||||
|
||||
/* xExpectedIdleTime being set to 0 by configPRE_SLEEP_PROCESSING()
|
||||
means the application defined code has already executed the WAIT
|
||||
instruction. */
|
||||
if( xExpectedIdleTime > 0 )
|
||||
{
|
||||
wait();
|
||||
}
|
||||
|
||||
/* Allow the application to define some post sleep processing. */
|
||||
configPOST_SLEEP_PROCESSING( xExpectedIdleTime );
|
||||
}
|
||||
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
|
||||
void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
|
||||
{
|
||||
uint32_t ulMatchValue, ulCompleteTickPeriods, ulCurrentCount;
|
||||
eSleepModeStatus eSleepAction;
|
||||
|
||||
/* THIS FUNCTION IS CALLED WITH THE SCHEDULER SUSPENDED. */
|
||||
|
||||
/* Make sure the CMT reload value does not overflow the counter. */
|
||||
if( xExpectedIdleTime > xMaximumPossibleSuppressedTicks )
|
||||
{
|
||||
xExpectedIdleTime = xMaximumPossibleSuppressedTicks;
|
||||
}
|
||||
|
||||
/* Calculate the reload value required to wait xExpectedIdleTime tick
|
||||
periods. */
|
||||
ulMatchValue = ulMatchValueForOneTick * xExpectedIdleTime;
|
||||
if( ulMatchValue > ulStoppedTimerCompensation )
|
||||
{
|
||||
/* Compensate for the fact that the CMT is going to be stopped
|
||||
momentarily. */
|
||||
ulMatchValue -= ulStoppedTimerCompensation;
|
||||
}
|
||||
|
||||
/* Stop the CMT momentarily. The time the CMT is stopped for is
|
||||
accounted for as best it can be, but using the tickless mode will
|
||||
inevitably result in some tiny drift of the time maintained by the
|
||||
kernel with respect to calendar time. */
|
||||
CMT.CMSTR0.BIT.STR0 = 0;
|
||||
while( CMT.CMSTR0.BIT.STR0 == 1 )
|
||||
{
|
||||
/* Nothing to do here. */
|
||||
}
|
||||
|
||||
/* Critical section using the global interrupt bit as the i bit is
|
||||
automatically reset by the WAIT instruction. */
|
||||
clrpsw_i();
|
||||
|
||||
/* The tick flag is set to false before sleeping. If it is true when
|
||||
sleep mode is exited then sleep mode was probably exited because the
|
||||
tick was suppressed for the entire xExpectedIdleTime period. */
|
||||
ulTickFlag = pdFALSE;
|
||||
|
||||
/* If a context switch is pending then abandon the low power entry as
|
||||
the context switch might have been pended by an external interrupt that
|
||||
requires processing. */
|
||||
eSleepAction = eTaskConfirmSleepModeStatus();
|
||||
if( eSleepAction == eAbortSleep )
|
||||
{
|
||||
/* Restart tick. */
|
||||
CMT.CMSTR0.BIT.STR0 = 1;
|
||||
setpsw_i();
|
||||
}
|
||||
else if( eSleepAction == eNoTasksWaitingTimeout )
|
||||
{
|
||||
/* Protection off. */
|
||||
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
||||
|
||||
/* Ready for software standby with all clocks stopped. */
|
||||
SYSTEM.SBYCR.BIT.SSBY = 1;
|
||||
|
||||
/* Protection on. */
|
||||
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
||||
|
||||
/* Sleep until something happens. Calling prvSleep() will
|
||||
automatically reset the i bit in the PSW. */
|
||||
prvSleep( xExpectedIdleTime );
|
||||
|
||||
/* Restart the CMT. */
|
||||
CMT.CMSTR0.BIT.STR0 = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Protection off. */
|
||||
SYSTEM.PRCR.WORD = portUNLOCK_KEY;
|
||||
|
||||
/* Ready for deep sleep mode. */
|
||||
SYSTEM.MSTPCRC.BIT.DSLPE = 1;
|
||||
SYSTEM.MSTPCRA.BIT.MSTPA28 = 1;
|
||||
SYSTEM.SBYCR.BIT.SSBY = 0;
|
||||
|
||||
/* Protection on. */
|
||||
SYSTEM.PRCR.WORD = portLOCK_KEY;
|
||||
|
||||
/* Adjust the match value to take into account that the current
|
||||
time slice is already partially complete. */
|
||||
ulMatchValue -= ( uint32_t ) CMT0.CMCNT;
|
||||
CMT0.CMCOR = ( uint16_t ) ulMatchValue;
|
||||
|
||||
/* Restart the CMT to count up to the new match value. */
|
||||
CMT0.CMCNT = 0;
|
||||
CMT.CMSTR0.BIT.STR0 = 1;
|
||||
|
||||
/* Sleep until something happens. Calling prvSleep() will
|
||||
automatically reset the i bit in the PSW. */
|
||||
prvSleep( xExpectedIdleTime );
|
||||
|
||||
/* Stop CMT. Again, the time the SysTick is stopped for is
|
||||
accounted for as best it can be, but using the tickless mode will
|
||||
inevitably result in some tiny drift of the time maintained by the
|
||||
kernel with respect to calendar time. */
|
||||
CMT.CMSTR0.BIT.STR0 = 0;
|
||||
while( CMT.CMSTR0.BIT.STR0 == 1 )
|
||||
{
|
||||
/* Nothing to do here. */
|
||||
}
|
||||
|
||||
ulCurrentCount = ( uint32_t ) CMT0.CMCNT;
|
||||
|
||||
if( ulTickFlag != pdFALSE )
|
||||
{
|
||||
/* The tick interrupt has already executed, although because
|
||||
this function is called with the scheduler suspended the actual
|
||||
tick processing will not occur until after this function has
|
||||
exited. Reset the match value with whatever remains of this
|
||||
tick period. */
|
||||
ulMatchValue = ulMatchValueForOneTick - ulCurrentCount;
|
||||
CMT0.CMCOR = ( uint16_t ) ulMatchValue;
|
||||
|
||||
/* The tick interrupt handler will already have pended the tick
|
||||
processing in the kernel. As the pending tick will be
|
||||
processed as soon as this function exits, the tick value
|
||||
maintained by the tick is stepped forward by one less than the
|
||||
time spent sleeping. The actual stepping of the tick appears
|
||||
later in this function. */
|
||||
ulCompleteTickPeriods = xExpectedIdleTime - 1UL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Something other than the tick interrupt ended the sleep.
|
||||
How many complete tick periods passed while the processor was
|
||||
sleeping? */
|
||||
ulCompleteTickPeriods = ulCurrentCount / ulMatchValueForOneTick;
|
||||
|
||||
/* The match value is set to whatever fraction of a single tick
|
||||
period remains. */
|
||||
ulMatchValue = ulCurrentCount - ( ulCompleteTickPeriods * ulMatchValueForOneTick );
|
||||
CMT0.CMCOR = ( uint16_t ) ulMatchValue;
|
||||
}
|
||||
|
||||
/* Restart the CMT so it runs up to the match value. The match value
|
||||
will get set to the value required to generate exactly one tick period
|
||||
the next time the CMT interrupt executes. */
|
||||
CMT0.CMCNT = 0;
|
||||
CMT.CMSTR0.BIT.STR0 = 1;
|
||||
|
||||
/* Wind the tick forward by the number of tick periods that the CPU
|
||||
remained in a low power state. */
|
||||
vTaskStepTick( ulCompleteTickPeriods );
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,126 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,651 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the ARM CM4F port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#ifndef __TI_VFP_SUPPORT__
|
||||
#error This port can only be used when the project options are configured to enable hardware floating point support.
|
||||
#endif
|
||||
|
||||
#if configMAX_SYSCALL_INTERRUPT_PRIORITY == 0
|
||||
#error configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to 0. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html
|
||||
#endif
|
||||
|
||||
#ifndef configSYSTICK_CLOCK_HZ
|
||||
#define configSYSTICK_CLOCK_HZ configCPU_CLOCK_HZ
|
||||
/* Ensure the SysTick is clocked at the same frequency as the core. */
|
||||
#define portNVIC_SYSTICK_CLK_BIT ( 1UL << 2UL )
|
||||
#else
|
||||
/* The way the SysTick is clocked is not modified in case it is not the same
|
||||
as the core. */
|
||||
#define portNVIC_SYSTICK_CLK_BIT ( 0 )
|
||||
#endif
|
||||
|
||||
/* Constants required to manipulate the core. Registers first... */
|
||||
#define portNVIC_SYSTICK_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000e010 ) )
|
||||
#define portNVIC_SYSTICK_LOAD_REG ( * ( ( volatile uint32_t * ) 0xe000e014 ) )
|
||||
#define portNVIC_SYSTICK_CURRENT_VALUE_REG ( * ( ( volatile uint32_t * ) 0xe000e018 ) )
|
||||
#define portNVIC_SYSPRI2_REG ( * ( ( volatile uint32_t * ) 0xe000ed20 ) )
|
||||
/* ...then bits in the registers. */
|
||||
#define portNVIC_SYSTICK_INT_BIT ( 1UL << 1UL )
|
||||
#define portNVIC_SYSTICK_ENABLE_BIT ( 1UL << 0UL )
|
||||
#define portNVIC_SYSTICK_COUNT_FLAG_BIT ( 1UL << 16UL )
|
||||
#define portNVIC_PENDSVCLEAR_BIT ( 1UL << 27UL )
|
||||
#define portNVIC_PEND_SYSTICK_CLEAR_BIT ( 1UL << 25UL )
|
||||
|
||||
#define portNVIC_PENDSV_PRI ( ( ( uint32_t ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )
|
||||
#define portNVIC_SYSTICK_PRI ( ( ( uint32_t ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
|
||||
|
||||
/* Constants required to check the validity of an interrupt priority. */
|
||||
#define portFIRST_USER_INTERRUPT_NUMBER ( 16 )
|
||||
#define portNVIC_IP_REGISTERS_OFFSET_16 ( 0xE000E3F0 )
|
||||
#define portAIRCR_REG ( * ( ( volatile uint32_t * ) 0xE000ED0C ) )
|
||||
#define portMAX_8_BIT_VALUE ( ( uint8_t ) 0xff )
|
||||
#define portTOP_BIT_OF_BYTE ( ( uint8_t ) 0x80 )
|
||||
#define portMAX_PRIGROUP_BITS ( ( uint8_t ) 7 )
|
||||
#define portPRIORITY_GROUP_MASK ( 0x07UL << 8UL )
|
||||
#define portPRIGROUP_SHIFT ( 8UL )
|
||||
|
||||
/* Masks off all bits but the VECTACTIVE bits in the ICSR register. */
|
||||
#define portVECTACTIVE_MASK ( 0xFFUL )
|
||||
|
||||
/* Constants required to manipulate the VFP. */
|
||||
#define portFPCCR ( ( volatile uint32_t * ) 0xe000ef34 ) /* Floating point context control register. */
|
||||
#define portASPEN_AND_LSPEN_BITS ( 0x3UL << 30UL )
|
||||
|
||||
/* Constants required to set up the initial stack. */
|
||||
#define portINITIAL_XPSR ( 0x01000000 )
|
||||
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )
|
||||
|
||||
/* The systick is a 24-bit counter. */
|
||||
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )
|
||||
|
||||
/* A fiddle factor to estimate the number of SysTick counts that would have
|
||||
occurred while the SysTick counter is stopped during tickless idle
|
||||
calculations. */
|
||||
#define portMISSED_COUNTS_FACTOR ( 45UL )
|
||||
|
||||
/* For strict compliance with the Cortex-M spec the task start address should
|
||||
have bit-0 clear, as it is loaded into the PC on exit from an ISR. */
|
||||
#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )
|
||||
|
||||
/* Required to allow portasm.asm access the configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||
setting. */
|
||||
const uint32_t ulMaxSyscallInterruptPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY;
|
||||
|
||||
/* Each task maintains its own interrupt status in the critical nesting
|
||||
variable. */
|
||||
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;
|
||||
|
||||
/*
|
||||
* Setup the timer to generate the tick interrupts. The implementation in this
|
||||
* file is weak to allow application writers to change the timer used to
|
||||
* generate the tick interrupt.
|
||||
*/
|
||||
void vPortSetupTimerInterrupt( void );
|
||||
|
||||
/*
|
||||
* Exception handlers.
|
||||
*/
|
||||
void xPortSysTickHandler( void );
|
||||
|
||||
/*
|
||||
* Start first task is a separate function so it can be tested in isolation.
|
||||
*/
|
||||
extern void vPortStartFirstTask( void );
|
||||
|
||||
/*
|
||||
* Turn the VFP on.
|
||||
*/
|
||||
extern void vPortEnableVFP( void );
|
||||
|
||||
/*
|
||||
* Used to catch tasks that attempt to return from their implementing function.
|
||||
*/
|
||||
static void prvTaskExitError( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The number of SysTick increments that make up one tick period.
|
||||
*/
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
static uint32_t ulTimerCountsForOneTick = 0;
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
/*
|
||||
* The maximum number of tick periods that can be suppressed is limited by the
|
||||
* 24 bit resolution of the SysTick timer.
|
||||
*/
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
static uint32_t xMaximumPossibleSuppressedTicks = 0;
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
/*
|
||||
* Compensate for the CPU cycles that pass while the SysTick is stopped (low
|
||||
* power functionality only.
|
||||
*/
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
static uint32_t ulStoppedTimerCompensation = 0;
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
/*
|
||||
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
||||
* FreeRTOS API functions are not called from interrupts that have been assigned
|
||||
* a priority above configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
||||
*/
|
||||
#if ( configASSERT_DEFINED == 1 )
|
||||
static uint8_t ucMaxSysCallPriority = 0;
|
||||
static uint32_t ulMaxPRIGROUPValue = 0;
|
||||
static const volatile uint8_t * const pcInterruptPriorityRegisters = ( uint8_t * ) portNVIC_IP_REGISTERS_OFFSET_16;
|
||||
#endif /* configASSERT_DEFINED */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
{
|
||||
/* Simulate the stack frame as it would be created by a context switch
|
||||
interrupt. */
|
||||
|
||||
/* Offset added to account for the way the MCU uses the stack on entry/exit
|
||||
of interrupts, and to ensure alignment. */
|
||||
pxTopOfStack--;
|
||||
|
||||
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */
|
||||
|
||||
/* Save code space by skipping register initialisation. */
|
||||
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */
|
||||
*pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */
|
||||
|
||||
/* A save method is being used that requires each task to maintain its
|
||||
own exec return value. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = portINITIAL_EXEC_RETURN;
|
||||
|
||||
pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */
|
||||
|
||||
return pxTopOfStack;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvTaskExitError( void )
|
||||
{
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT( uxCriticalNesting == ~0UL );
|
||||
portDISABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
#if( configASSERT_DEFINED == 1 )
|
||||
{
|
||||
volatile uint32_t ulOriginalPriority;
|
||||
volatile uint8_t * const pucFirstUserPriorityRegister = ( uint8_t * ) ( portNVIC_IP_REGISTERS_OFFSET_16 + portFIRST_USER_INTERRUPT_NUMBER );
|
||||
volatile uint8_t ucMaxPriorityValue;
|
||||
|
||||
/* Determine the maximum priority from which ISR safe FreeRTOS API
|
||||
functions can be called. ISR safe functions are those that end in
|
||||
"FromISR". FreeRTOS maintains separate thread and ISR API functions to
|
||||
ensure interrupt entry is as fast and simple as possible.
|
||||
|
||||
Save the interrupt priority value that is about to be clobbered. */
|
||||
ulOriginalPriority = *pucFirstUserPriorityRegister;
|
||||
|
||||
/* Determine the number of priority bits available. First write to all
|
||||
possible bits. */
|
||||
*pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
|
||||
|
||||
/* Read the value back to see how many bits stuck. */
|
||||
ucMaxPriorityValue = *pucFirstUserPriorityRegister;
|
||||
|
||||
/* Use the same mask on the maximum system call priority. */
|
||||
ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;
|
||||
|
||||
/* Calculate the maximum acceptable priority group value for the number
|
||||
of bits read back. */
|
||||
ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS;
|
||||
while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
|
||||
{
|
||||
ulMaxPRIGROUPValue--;
|
||||
ucMaxPriorityValue <<= ( uint8_t ) 0x01;
|
||||
}
|
||||
|
||||
/* Shift the priority group value back to its position within the AIRCR
|
||||
register. */
|
||||
ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;
|
||||
ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK;
|
||||
|
||||
/* Restore the clobbered interrupt priority register to its original
|
||||
value. */
|
||||
*pucFirstUserPriorityRegister = ulOriginalPriority;
|
||||
}
|
||||
#endif /* conifgASSERT_DEFINED */
|
||||
|
||||
/* Make PendSV and SysTick the lowest priority interrupts. */
|
||||
portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI;
|
||||
portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI;
|
||||
|
||||
/* Start the timer that generates the tick ISR. Interrupts are disabled
|
||||
here already. */
|
||||
vPortSetupTimerInterrupt();
|
||||
|
||||
/* Initialise the critical nesting count ready for the first task. */
|
||||
uxCriticalNesting = 0;
|
||||
|
||||
/* Ensure the VFP is enabled - it should be anyway. */
|
||||
vPortEnableVFP();
|
||||
|
||||
/* Lazy save always. */
|
||||
*( portFPCCR ) |= portASPEN_AND_LSPEN_BITS;
|
||||
|
||||
/* Start the first task. */
|
||||
vPortStartFirstTask();
|
||||
|
||||
/* Should not get here! */
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEnterCritical( void )
|
||||
{
|
||||
portDISABLE_INTERRUPTS();
|
||||
uxCriticalNesting++;
|
||||
|
||||
/* This is not the interrupt safe version of the enter critical function so
|
||||
assert() if it is being called from an interrupt context. Only API
|
||||
functions that end in "FromISR" can be used in an interrupt. Only assert if
|
||||
the critical nesting count is 1 to protect against recursive calls if the
|
||||
assert function also uses a critical section. */
|
||||
if( uxCriticalNesting == 1 )
|
||||
{
|
||||
configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
portENABLE_INTERRUPTS();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
/* The SysTick runs at the lowest interrupt priority, so when this interrupt
|
||||
executes all interrupts must be unmasked. There is therefore no need to
|
||||
save and then restore the interrupt mask value as its value is already
|
||||
known. */
|
||||
( void ) portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
{
|
||||
/* Increment the RTOS tick. */
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* A context switch is required. Context switching is performed in
|
||||
the PendSV interrupt. Pend the PendSV interrupt. */
|
||||
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
|
||||
}
|
||||
}
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
|
||||
#pragma WEAK( vPortSuppressTicksAndSleep )
|
||||
void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
|
||||
{
|
||||
uint32_t ulReloadValue, ulCompleteTickPeriods, ulCompletedSysTickDecrements, ulSysTickCTRL;
|
||||
TickType_t xModifiableIdleTime;
|
||||
|
||||
/* Make sure the SysTick reload value does not overflow the counter. */
|
||||
if( xExpectedIdleTime > xMaximumPossibleSuppressedTicks )
|
||||
{
|
||||
xExpectedIdleTime = xMaximumPossibleSuppressedTicks;
|
||||
}
|
||||
|
||||
/* Stop the SysTick momentarily. The time the SysTick is stopped for
|
||||
is accounted for as best it can be, but using the tickless mode will
|
||||
inevitably result in some tiny drift of the time maintained by the
|
||||
kernel with respect to calendar time. */
|
||||
portNVIC_SYSTICK_CTRL_REG &= ~portNVIC_SYSTICK_ENABLE_BIT;
|
||||
|
||||
/* Calculate the reload value required to wait xExpectedIdleTime
|
||||
tick periods. -1 is used because this code will execute part way
|
||||
through one of the tick periods. */
|
||||
ulReloadValue = portNVIC_SYSTICK_CURRENT_VALUE_REG + ( ulTimerCountsForOneTick * ( xExpectedIdleTime - 1UL ) );
|
||||
if( ulReloadValue > ulStoppedTimerCompensation )
|
||||
{
|
||||
ulReloadValue -= ulStoppedTimerCompensation;
|
||||
}
|
||||
|
||||
/* Enter a critical section but don't use the taskENTER_CRITICAL()
|
||||
method as that will mask interrupts that should exit sleep mode. */
|
||||
__asm( " cpsid i" );
|
||||
__asm( " dsb" );
|
||||
__asm( " isb" );
|
||||
|
||||
|
||||
/* If a context switch is pending or a task is waiting for the scheduler
|
||||
to be unsuspended then abandon the low power entry. */
|
||||
if( eTaskConfirmSleepModeStatus() == eAbortSleep )
|
||||
{
|
||||
/* Restart from whatever is left in the count register to complete
|
||||
this tick period. */
|
||||
portNVIC_SYSTICK_LOAD_REG = portNVIC_SYSTICK_CURRENT_VALUE_REG;
|
||||
|
||||
/* Restart SysTick. */
|
||||
portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_ENABLE_BIT;
|
||||
|
||||
/* Reset the reload register to the value required for normal tick
|
||||
periods. */
|
||||
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
|
||||
|
||||
/* Re-enable interrupts - see comments above __disable_interrupt()
|
||||
call above. */
|
||||
__asm( " cpsie i" );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set the new reload value. */
|
||||
portNVIC_SYSTICK_LOAD_REG = ulReloadValue;
|
||||
|
||||
/* Clear the SysTick count flag and set the count value back to
|
||||
zero. */
|
||||
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
|
||||
|
||||
/* Restart SysTick. */
|
||||
portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_ENABLE_BIT;
|
||||
|
||||
/* Sleep until something happens. configPRE_SLEEP_PROCESSING() can
|
||||
set its parameter to 0 to indicate that its implementation contains
|
||||
its own wait for interrupt or wait for event instruction, and so wfi
|
||||
should not be executed again. However, the original expected idle
|
||||
time variable must remain unmodified, so a copy is taken. */
|
||||
xModifiableIdleTime = xExpectedIdleTime;
|
||||
configPRE_SLEEP_PROCESSING( xModifiableIdleTime );
|
||||
if( xModifiableIdleTime > 0 )
|
||||
{
|
||||
__asm( " dsb" );
|
||||
__asm( " wfi" );
|
||||
__asm( " isb" );
|
||||
}
|
||||
configPOST_SLEEP_PROCESSING( xExpectedIdleTime );
|
||||
|
||||
/* Stop SysTick. Again, the time the SysTick is stopped for is
|
||||
accounted for as best it can be, but using the tickless mode will
|
||||
inevitably result in some tiny drift of the time maintained by the
|
||||
kernel with respect to calendar time. */
|
||||
ulSysTickCTRL = portNVIC_SYSTICK_CTRL_REG;
|
||||
portNVIC_SYSTICK_CTRL_REG = ( ulSysTickCTRL & ~portNVIC_SYSTICK_ENABLE_BIT );
|
||||
|
||||
/* Re-enable interrupts - see comments above __disable_interrupt()
|
||||
call above. */
|
||||
__asm( " cpsie i" );
|
||||
|
||||
if( ( ulSysTickCTRL & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
|
||||
{
|
||||
uint32_t ulCalculatedLoadValue;
|
||||
|
||||
/* The tick interrupt has already executed, and the SysTick
|
||||
count reloaded with ulReloadValue. Reset the
|
||||
portNVIC_SYSTICK_LOAD_REG with whatever remains of this tick
|
||||
period. */
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL ) - ( ulReloadValue - portNVIC_SYSTICK_CURRENT_VALUE_REG );
|
||||
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
that took too long. */
|
||||
if( ( ulCalculatedLoadValue < ulStoppedTimerCompensation ) || ( ulCalculatedLoadValue > ulTimerCountsForOneTick ) )
|
||||
{
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL );
|
||||
}
|
||||
|
||||
portNVIC_SYSTICK_LOAD_REG = ulCalculatedLoadValue;
|
||||
|
||||
/* The tick interrupt handler will already have pended the tick
|
||||
processing in the kernel. As the pending tick will be
|
||||
processed as soon as this function exits, the tick value
|
||||
maintained by the tick is stepped forward by one less than the
|
||||
time spent waiting. */
|
||||
ulCompleteTickPeriods = xExpectedIdleTime - 1UL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Something other than the tick interrupt ended the sleep.
|
||||
Work out how long the sleep lasted rounded to complete tick
|
||||
periods (not the ulReload value which accounted for part
|
||||
ticks). */
|
||||
ulCompletedSysTickDecrements = ( xExpectedIdleTime * ulTimerCountsForOneTick ) - portNVIC_SYSTICK_CURRENT_VALUE_REG;
|
||||
|
||||
/* How many complete tick periods passed while the processor
|
||||
was waiting? */
|
||||
ulCompleteTickPeriods = ulCompletedSysTickDecrements / ulTimerCountsForOneTick;
|
||||
|
||||
/* The reload value is set to whatever fraction of a single tick
|
||||
period remains. */
|
||||
portNVIC_SYSTICK_LOAD_REG = ( ( ulCompleteTickPeriods + 1UL ) * ulTimerCountsForOneTick ) - ulCompletedSysTickDecrements;
|
||||
}
|
||||
|
||||
/* Restart SysTick so it runs from portNVIC_SYSTICK_LOAD_REG
|
||||
again, then set portNVIC_SYSTICK_LOAD_REG back to its standard
|
||||
value. The critical section is used to ensure the tick interrupt
|
||||
can only execute once in the case that the reload register is near
|
||||
zero. */
|
||||
portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
portNVIC_SYSTICK_CTRL_REG |= portNVIC_SYSTICK_ENABLE_BIT;
|
||||
vTaskStepTick( ulCompleteTickPeriods );
|
||||
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* #if configUSE_TICKLESS_IDLE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Setup the systick timer to generate the tick interrupts at the required
|
||||
* frequency.
|
||||
*/
|
||||
#pragma WEAK( vPortSetupTimerInterrupt )
|
||||
void vPortSetupTimerInterrupt( void )
|
||||
{
|
||||
/* Calculate the constants required to configure the tick interrupt. */
|
||||
#if configUSE_TICKLESS_IDLE == 1
|
||||
{
|
||||
ulTimerCountsForOneTick = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ );
|
||||
xMaximumPossibleSuppressedTicks = portMAX_24_BIT_NUMBER / ulTimerCountsForOneTick;
|
||||
ulStoppedTimerCompensation = portMISSED_COUNTS_FACTOR / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ );
|
||||
}
|
||||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
/* Configure SysTick to interrupt at the requested rate. */
|
||||
portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
|
||||
portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( configASSERT_DEFINED == 1 )
|
||||
|
||||
void vPortValidateInterruptPriority( void )
|
||||
{
|
||||
extern uint32_t ulPortGetIPSR( void );
|
||||
uint32_t ulCurrentInterrupt;
|
||||
uint8_t ucCurrentPriority;
|
||||
|
||||
ulCurrentInterrupt = ulPortGetIPSR();
|
||||
|
||||
/* Is the interrupt number a user defined interrupt? */
|
||||
if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
|
||||
{
|
||||
/* Look up the interrupt's priority. */
|
||||
ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
|
||||
|
||||
/* The following assertion will fail if a service routine (ISR) for
|
||||
an interrupt that has been assigned a priority above
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY calls an ISR safe FreeRTOS API
|
||||
function. ISR safe FreeRTOS API functions must *only* be called
|
||||
from interrupts that have been assigned a priority at or below
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
||||
|
||||
Numerically low interrupt priority numbers represent logically high
|
||||
interrupt priorities, therefore the priority of the interrupt must
|
||||
be set to a value equal to or numerically *higher* than
|
||||
configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
||||
|
||||
Interrupts that use the FreeRTOS API must not be left at their
|
||||
default priority of zero as that is the highest possible priority,
|
||||
which is guaranteed to be above configMAX_SYSCALL_INTERRUPT_PRIORITY,
|
||||
and therefore also guaranteed to be invalid.
|
||||
|
||||
FreeRTOS maintains separate thread and ISR API functions to ensure
|
||||
interrupt entry is as fast and simple as possible.
|
||||
|
||||
The following links provide detailed information:
|
||||
http://www.freertos.org/RTOS-Cortex-M3-M4.html
|
||||
http://www.freertos.org/FAQHelp.html */
|
||||
configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );
|
||||
}
|
||||
|
||||
/* Priority grouping: The interrupt controller (NVIC) allows the bits
|
||||
that define each interrupt's priority to be split between bits that
|
||||
define the interrupt's pre-emption priority bits and bits that define
|
||||
the interrupt's sub-priority. For simplicity all bits must be defined
|
||||
to be pre-emption priority bits. The following assertion will fail if
|
||||
this is not the case (if some bits represent a sub-priority).
|
||||
|
||||
If the application only uses CMSIS libraries for interrupt
|
||||
configuration then the correct setting can be achieved on all Cortex-M
|
||||
devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the
|
||||
scheduler. Note however that some vendor specific peripheral libraries
|
||||
assume a non-zero priority group setting, in which cases using a value
|
||||
of zero will result in unpredicable behaviour. */
|
||||
configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue );
|
||||
}
|
||||
|
||||
#endif /* configASSERT_DEFINED */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void _init(void) {return;}
|
||||
char * _sbrk( size_t x )
|
||||
{
|
||||
/* Just to remove compiler warning. */
|
||||
( void ) x;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
STM32_STDPERIPH_INC = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
CORE_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
DEVICE_SUPPORT_DIR = Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
|
||||
INCLUDE_DIRS = \
|
||||
-I$(DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(CIRE_DIR) \
|
||||
|
||||
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT $(INCLUDE_DIRS) -I. -Wall -Werror -D"assert_param(expr)=((void)0)"
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,244 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PORTMACRO_H
|
||||
#define PORTMACRO_H
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Port specific definitions.
|
||||
*
|
||||
* The settings in this file configure FreeRTOS correctly for the
|
||||
* given hardware and compiler.
|
||||
*
|
||||
* These settings should not be altered.
|
||||
*-----------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Type definitions. */
|
||||
#define portCHAR char
|
||||
#define portFLOAT float
|
||||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT short
|
||||
#define portSTACK_TYPE uint8_t
|
||||
#define portBASE_TYPE char
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef signed char BaseType_t;
|
||||
typedef unsigned char UBaseType_t;
|
||||
|
||||
#if( configUSE_16_BIT_TICKS == 1 )
|
||||
typedef uint16_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||
#else
|
||||
typedef uint32_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hardware specifics. */
|
||||
#define portBYTE_ALIGNMENT 1
|
||||
#define portSTACK_GROWTH ( -1 )
|
||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
#define portYIELD() __asm( "swi" );
|
||||
#define portNOP() __asm( "nop" );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Critical section handling. */
|
||||
#define portENABLE_INTERRUPTS() __asm( "cli" )
|
||||
#define portDISABLE_INTERRUPTS() __asm( "sei" )
|
||||
|
||||
/*
|
||||
* Disable interrupts before incrementing the count of critical section nesting.
|
||||
* The nesting count is maintained so we know when interrupts should be
|
||||
* re-enabled. Once interrupts are disabled the nesting count can be accessed
|
||||
* directly. Each task maintains its own nesting count.
|
||||
*/
|
||||
#define portENTER_CRITICAL() \
|
||||
{ \
|
||||
extern volatile UBaseType_t uxCriticalNesting; \
|
||||
\
|
||||
portDISABLE_INTERRUPTS(); \
|
||||
uxCriticalNesting++; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Interrupts are disabled so we can access the nesting count directly. If the
|
||||
* nesting is found to be 0 (no nesting) then we are leaving the critical
|
||||
* section and interrupts can be re-enabled.
|
||||
*/
|
||||
#define portEXIT_CRITICAL() \
|
||||
{ \
|
||||
extern volatile UBaseType_t uxCriticalNesting; \
|
||||
\
|
||||
uxCriticalNesting--; \
|
||||
if( uxCriticalNesting == 0 ) \
|
||||
{ \
|
||||
portENABLE_INTERRUPTS(); \
|
||||
} \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task utilities. */
|
||||
|
||||
/*
|
||||
* These macros are very simple as the processor automatically saves and
|
||||
* restores its registers as interrupts are entered and exited. In
|
||||
* addition to the (automatically stacked) registers we also stack the
|
||||
* critical nesting count. Each task maintains its own critical nesting
|
||||
* count as it is legitimate for a task to yield from within a critical
|
||||
* section. If the banked memory model is being used then the PPAGE
|
||||
* register is also stored as part of the tasks context.
|
||||
*/
|
||||
|
||||
#ifdef BANKED_MODEL
|
||||
/*
|
||||
* Load the stack pointer for the task, then pull the critical nesting
|
||||
* count and PPAGE register from the stack. The remains of the
|
||||
* context are restored by the RTI instruction.
|
||||
*/
|
||||
#define portRESTORE_CONTEXT() \
|
||||
{ \
|
||||
extern volatile void * pxCurrentTCB; \
|
||||
extern volatile UBaseType_t uxCriticalNesting; \
|
||||
\
|
||||
__asm( "ldx pxCurrentTCB" ); \
|
||||
__asm( "lds 0, x" ); \
|
||||
__asm( "pula" ); \
|
||||
__asm( "staa uxCriticalNesting" ); \
|
||||
__asm( "pula" ); \
|
||||
__asm( "staa 0x30" ); /* 0x30 = PPAGE */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* By the time this macro is called the processor has already stacked the
|
||||
* registers. Simply stack the nesting count and PPAGE value, then save
|
||||
* the task stack pointer.
|
||||
*/
|
||||
#define portSAVE_CONTEXT() \
|
||||
{ \
|
||||
extern volatile void * pxCurrentTCB; \
|
||||
extern volatile UBaseType_t uxCriticalNesting; \
|
||||
\
|
||||
__asm( "ldaa 0x30" ); /* 0x30 = PPAGE */ \
|
||||
__asm( "psha" ); \
|
||||
__asm( "ldaa uxCriticalNesting" ); \
|
||||
__asm( "psha" ); \
|
||||
__asm( "ldx pxCurrentTCB" ); \
|
||||
__asm( "sts 0, x" ); \
|
||||
}
|
||||
#else
|
||||
|
||||
/*
|
||||
* These macros are as per the BANKED versions above, but without saving
|
||||
* and restoring the PPAGE register.
|
||||
*/
|
||||
|
||||
#define portRESTORE_CONTEXT() \
|
||||
{ \
|
||||
extern volatile void * pxCurrentTCB; \
|
||||
extern volatile UBaseType_t uxCriticalNesting; \
|
||||
\
|
||||
__asm( "ldx pxCurrentTCB" ); \
|
||||
__asm( "lds 0, x" ); \
|
||||
__asm( "pula" ); \
|
||||
__asm( "staa uxCriticalNesting" ); \
|
||||
}
|
||||
|
||||
#define portSAVE_CONTEXT() \
|
||||
{ \
|
||||
extern volatile void * pxCurrentTCB; \
|
||||
extern volatile UBaseType_t uxCriticalNesting; \
|
||||
\
|
||||
__asm( "ldaa uxCriticalNesting" ); \
|
||||
__asm( "psha" ); \
|
||||
__asm( "ldx pxCurrentTCB" ); \
|
||||
__asm( "sts 0, x" ); \
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Utility macro to call macros above in correct order in order to perform a
|
||||
* task switch from within a standard ISR. This macro can only be used if
|
||||
* the ISR does not use any local (stack) variables. If the ISR uses stack
|
||||
* variables portYIELD() should be used in it's place.
|
||||
*/
|
||||
#define portTASK_SWITCH_FROM_ISR() \
|
||||
portSAVE_CONTEXT(); \
|
||||
vTaskSwitchContext(); \
|
||||
portRESTORE_CONTEXT();
|
||||
|
||||
|
||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
||||
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||
|
||||
#endif /* PORTMACRO_H */
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,68 +0,0 @@
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
.GLB _vSoftwareInterruptISR
|
||||
.GLB _vSoftwareInterruptEntry
|
||||
|
||||
.SECTION P,CODE
|
||||
|
||||
_vSoftwareInterruptEntry:
|
||||
|
||||
BRA _vSoftwareInterruptISR
|
||||
|
||||
.RVECTOR 27, _vSoftwareInterruptEntry
|
||||
|
||||
.END
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
DEV_DIR = Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
|
||||
COR_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I$(DEV_DIR) -I$(COR_DIR) -I. -Wall -Werror
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,183 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PORTMACRO_H
|
||||
#define PORTMACRO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Hardware specifics. */
|
||||
#include "machine.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Port specific definitions.
|
||||
*
|
||||
* The settings in this file configure FreeRTOS correctly for the
|
||||
* given hardware and compiler.
|
||||
*
|
||||
* These settings should not be altered.
|
||||
*-----------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Type definitions - these are a bit legacy and not really used now, other than
|
||||
portSTACK_TYPE and portBASE_TYPE. */
|
||||
#define portCHAR char
|
||||
#define portFLOAT float
|
||||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT short
|
||||
#define portSTACK_TYPE uint32_t
|
||||
#define portBASE_TYPE long
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef long BaseType_t;
|
||||
typedef unsigned long UBaseType_t;
|
||||
|
||||
#if( configUSE_16_BIT_TICKS == 1 )
|
||||
typedef uint16_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||
#else
|
||||
typedef uint32_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||
|
||||
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
|
||||
not need to be guarded with a critical section. */
|
||||
#define portTICK_TYPE_IS_ATOMIC 1
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hardware specifics. */
|
||||
#define portBYTE_ALIGNMENT 8 /* Could make four, according to manual. */
|
||||
#define portSTACK_GROWTH -1
|
||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
#define portNOP() nop()
|
||||
|
||||
#pragma inline_asm vPortYield
|
||||
static void vPortYield( void )
|
||||
{
|
||||
/* Save clobbered register - may not actually be necessary if inline asm
|
||||
functions are considered to use the same rules as function calls by the
|
||||
compiler. */
|
||||
PUSH.L R5
|
||||
/* Set ITU SWINTR. */
|
||||
MOV.L #553696, R5
|
||||
MOV.B #1, [R5]
|
||||
/* Read back to ensure the value is taken before proceeding. */
|
||||
MOV.L [R5], R5
|
||||
/* Restore clobbered register to its previous value. */
|
||||
POP R5
|
||||
}
|
||||
#define portYIELD() vPortYield()
|
||||
#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) portYIELD()
|
||||
|
||||
/* These macros should not be called directly, but through the
|
||||
taskENTER_CRITICAL() and taskEXIT_CRITICAL() macros. An extra check is
|
||||
performed if configASSERT() is defined to ensure an assertion handler does not
|
||||
inadvertently attempt to lower the IPL when the call to assert was triggered
|
||||
because the IPL value was found to be above configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||
when an ISR safe FreeRTOS API function was executed. ISR safe FreeRTOS API
|
||||
functions are those that end in FromISR. FreeRTOS maintains a separate
|
||||
interrupt API to ensure API function and interrupt entry is as fast and as
|
||||
simple as possible. */
|
||||
#define portENABLE_INTERRUPTS() set_ipl( ( long ) 0 )
|
||||
#ifdef configASSERT
|
||||
#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() configASSERT( ( get_ipl() <= configMAX_SYSCALL_INTERRUPT_PRIORITY ) )
|
||||
#define portDISABLE_INTERRUPTS() if( get_ipl() < configMAX_SYSCALL_INTERRUPT_PRIORITY ) set_ipl( ( long ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#else
|
||||
#define portDISABLE_INTERRUPTS() set_ipl( ( long ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#endif
|
||||
|
||||
/* Critical nesting counts are stored in the TCB. */
|
||||
#define portCRITICAL_NESTING_IN_TCB ( 1 )
|
||||
|
||||
/* The critical nesting functions defined within tasks.c. */
|
||||
extern void vTaskEnterCritical( void );
|
||||
extern void vTaskExitCritical( void );
|
||||
#define portENTER_CRITICAL() vTaskEnterCritical()
|
||||
#define portEXIT_CRITICAL() vTaskExitCritical()
|
||||
|
||||
/* As this port allows interrupt nesting... */
|
||||
#define portSET_INTERRUPT_MASK_FROM_ISR() get_ipl(); set_ipl( ( long ) configMAX_SYSCALL_INTERRUPT_PRIORITY )
|
||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) set_ipl( ( long ) uxSavedInterruptStatus )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
||||
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PORTMACRO_H */
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
|
||||
.if $DEFINED( __LARGE_DATA_MODEL__ )
|
||||
.define "pushm.a", pushm_x
|
||||
.define "popm.a", popm_x
|
||||
.define "push.a", push_x
|
||||
.define "pop.a", pop_x
|
||||
.define "mov.a", mov_x
|
||||
.else
|
||||
.define "pushm.w", pushm_x
|
||||
.define "popm.w", popm_x
|
||||
.define "push.w", push_x
|
||||
.define "pop.w", pop_x
|
||||
.define "mov.w", mov_x
|
||||
.endif
|
||||
|
||||
.if $DEFINED( __LARGE_CODE_MODEL__ )
|
||||
.define "calla", call_x
|
||||
.define "reta", ret_x
|
||||
.else
|
||||
.define "call", call_x
|
||||
.define "ret", ret_x
|
||||
.endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc/
|
||||
DEV_DIR = Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
|
||||
COR_DIR = Libraries/CMSIS/CM3/CoreSupport/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I$(DEV_DIR) -I$(COR_DIR) -I. -Wall -Werror -D"assert_param(expr)=((void)0)"
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,203 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,78 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* The time between cycles of the 'check' functionality (defined within the
|
||||
tick hook. */
|
||||
#define mainCHECK_DELAY ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/* Variable that counts at 20KHz to provide the time base for the run time
|
||||
stats. */
|
||||
unsigned long ulRunTimeStatsClock = 0UL;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
//vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb --specs=nosys.specs $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,130 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
vpath %.h \
|
||||
inc \
|
||||
../FreeRTOS/Source/include
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,61 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = \
|
||||
Libraries/STM32F10x_StdPeriph_Driver/inc/ \
|
||||
Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES) -lc
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,128 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,126 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
VPATH %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,59 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = Libraries/STM32F10x_StdPeriph_Driver/src
|
||||
INC_DIR = Libraries/STM32F10x_StdPeriph_Driver/inc
|
||||
OBJ_DIR = Libraries/STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -xc -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,59 +0,0 @@
|
||||
# STM support library
|
||||
|
||||
SRC_DIR = STM32F10x_StdPeriph_Driver/src/
|
||||
INC_DIR = STM32F10x_StdPeriph_Driver/inc/
|
||||
OBJ_DIR = STM32F10x_StdPeriph_Driver/obj
|
||||
|
||||
CROSS_COMPILE = arm-none-eabi-
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CCFLAGS = -xc -c -O2 -g -fno-common -mcpu=cortex-m3 -mthumb -DUSE_FULL_ASSERT -I$(INC_DIR) -I.
|
||||
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
ARFLAGS = rs
|
||||
|
||||
OBJECTS = \
|
||||
misc.o \
|
||||
stm32f10x_adc.o \
|
||||
stm32f10x_bkp.o \
|
||||
stm32f10x_can.o \
|
||||
stm32f10x_cec.o \
|
||||
stm32f10x_crc.o \
|
||||
stm32f10x_dac.o \
|
||||
stm32f10x_dbgmcu.o \
|
||||
stm32f10x_dma.o \
|
||||
stm32f10x_exti.o \
|
||||
stm32f10x_flash.o \
|
||||
stm32f10x_fsmc.o \
|
||||
stm32f10x_gpio.o \
|
||||
stm32f10x_i2c.o \
|
||||
stm32f10x_iwdg.o \
|
||||
stm32f10x_pwr.o \
|
||||
stm32f10x_rcc.o \
|
||||
stm32f10x_rtc.o \
|
||||
stm32f10x_sdio.o \
|
||||
stm32f10x_spi.o \
|
||||
stm32f10x_tim.o \
|
||||
stm32f10x_usart.o \
|
||||
stm32f10x_wwdg.o
|
||||
|
||||
LIBRARY = libSTM_StdPeriph.a
|
||||
|
||||
vpath %.c $(SRC_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
clean:
|
||||
rm -rf $(LIBRARY) $(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: all clean
|
||||
@@ -1,207 +0,0 @@
|
||||
;/*
|
||||
; FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
; All rights reserved
|
||||
;
|
||||
; VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
;
|
||||
; ***************************************************************************
|
||||
; >>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
; >>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
; >>! obliged to provide the source code for proprietary components !<<
|
||||
; >>! outside of the FreeRTOS kernel. !<<
|
||||
; ***************************************************************************
|
||||
;
|
||||
; FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
; FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
; link: http://www.freertos.org/a00114.html
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS provides completely free yet professionally developed, *
|
||||
; * robust, strictly quality controlled, supported, and cross *
|
||||
; * platform software that is more than just the market leader, it *
|
||||
; * is the industry's de facto standard. *
|
||||
; * *
|
||||
; * Help yourself get started quickly while simultaneously helping *
|
||||
; * to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
; * tutorial book, reference manual, or both: *
|
||||
; * http://www.FreeRTOS.org/Documentation *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
; http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
; the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
; defined configASSERT()?
|
||||
;
|
||||
; http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
; embedded software for free we request you assist our global community by
|
||||
; participating in the support forum.
|
||||
;
|
||||
; http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
; be as productive as possible as early as possible. Now you can receive
|
||||
; FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
; Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
;
|
||||
; http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
; including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
; compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
;
|
||||
; http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
; Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
; Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
; licenses offer ticketed support, indemnification and commercial middleware.
|
||||
;
|
||||
; http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
; engineered and independently SIL3 certified version for use in safety and
|
||||
; mission critical applications that require provable dependability.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;*/
|
||||
|
||||
.thumb
|
||||
|
||||
.ref pxCurrentTCB
|
||||
.ref vTaskSwitchContext
|
||||
.ref ulMaxSyscallInterruptPriority
|
||||
|
||||
.def xPortPendSVHandler
|
||||
.def ulPortGetIPSR
|
||||
.def vPortSVCHandler
|
||||
.def vPortStartFirstTask
|
||||
.def vPortEnableVFP
|
||||
|
||||
NVICOffsetConst: .word 0xE000ED08
|
||||
CPACRConst: .word 0xE000ED88
|
||||
pxCurrentTCBConst: .word pxCurrentTCB
|
||||
ulMaxSyscallInterruptPriorityConst: .word ulMaxSyscallInterruptPriority
|
||||
|
||||
; -----------------------------------------------------------
|
||||
|
||||
.align 4
|
||||
ulPortGetIPSR: .asmfunc
|
||||
mrs r0, ipsr
|
||||
bx r14
|
||||
.endasmfunc
|
||||
; -----------------------------------------------------------
|
||||
|
||||
.align 4
|
||||
vPortSetInterruptMask: .asmfunc
|
||||
push {r0}
|
||||
ldr r0, ulMaxSyscallInterruptPriorityConst
|
||||
msr basepri, r0
|
||||
pop {r0}
|
||||
bx r14
|
||||
.endasmfunc
|
||||
; -----------------------------------------------------------
|
||||
|
||||
.align 4
|
||||
xPortPendSVHandler: .asmfunc
|
||||
mrs r0, psp
|
||||
isb
|
||||
|
||||
;/* Get the location of the current TCB. */
|
||||
ldr r3, pxCurrentTCBConst
|
||||
ldr r2, [r3]
|
||||
|
||||
;/* Is the task using the FPU context? If so, push high vfp registers. */
|
||||
tst r14, #0x10
|
||||
it eq
|
||||
vstmdbeq r0!, {s16-s31}
|
||||
|
||||
;/* Save the core registers. */
|
||||
stmdb r0!, {r4-r11, r14}
|
||||
|
||||
;/* Save the new top of stack into the first member of the TCB. */
|
||||
str r0, [r2]
|
||||
|
||||
stmdb sp!, {r3}
|
||||
ldr r0, ulMaxSyscallInterruptPriorityConst
|
||||
ldr r1, [r0]
|
||||
msr basepri, r1
|
||||
dsb
|
||||
isb
|
||||
bl vTaskSwitchContext
|
||||
mov r0, #0
|
||||
msr basepri, r0
|
||||
ldmia sp!, {r3}
|
||||
|
||||
;/* The first item in pxCurrentTCB is the task top of stack. */
|
||||
ldr r1, [r3]
|
||||
ldr r0, [r1]
|
||||
|
||||
;/* Pop the core registers. */
|
||||
ldmia r0!, {r4-r11, r14}
|
||||
|
||||
;/* Is the task using the FPU context? If so, pop the high vfp registers
|
||||
;too. */
|
||||
tst r14, #0x10
|
||||
it eq
|
||||
vldmiaeq r0!, {s16-s31}
|
||||
|
||||
msr psp, r0
|
||||
isb
|
||||
bx r14
|
||||
.endasmfunc
|
||||
|
||||
; -----------------------------------------------------------
|
||||
|
||||
.align 4
|
||||
vPortSVCHandler: .asmfunc
|
||||
;/* Get the location of the current TCB. */
|
||||
ldr r3, pxCurrentTCBConst
|
||||
ldr r1, [r3]
|
||||
ldr r0, [r1]
|
||||
;/* Pop the core registers. */
|
||||
ldmia r0!, {r4-r11, r14}
|
||||
msr psp, r0
|
||||
isb
|
||||
mov r0, #0
|
||||
msr basepri, r0
|
||||
bx r14
|
||||
.endasmfunc
|
||||
|
||||
; -----------------------------------------------------------
|
||||
|
||||
.align 4
|
||||
vPortStartFirstTask: .asmfunc
|
||||
;/* Use the NVIC offset register to locate the stack. */
|
||||
ldr r0, NVICOffsetConst
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0]
|
||||
;/* Set the msp back to the start of the stack. */
|
||||
msr msp, r0
|
||||
;/* Call SVC to start the first task. */
|
||||
cpsie i
|
||||
cpsie f
|
||||
dsb
|
||||
isb
|
||||
svc #0
|
||||
.endasmfunc
|
||||
|
||||
; -----------------------------------------------------------
|
||||
|
||||
.align 4
|
||||
vPortEnableVFP: .asmfunc
|
||||
;/* The FPU enable bits are in the CPACR. */
|
||||
ldr.w r0, CPACRConst
|
||||
ldr r1, [r0]
|
||||
|
||||
;/* Enable CP10 and CP11 coprocessors, then save back. */
|
||||
orr r1, r1, #( 0xf << 20 )
|
||||
str r1, [r0]
|
||||
bx r14
|
||||
.endasmfunc
|
||||
|
||||
.end
|
||||
|
||||
; -----------------------------------------------------------
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
GROUP
|
||||
(
|
||||
libgcc.a
|
||||
libg.a
|
||||
libc.a
|
||||
libm.a
|
||||
libnosys.a
|
||||
)
|
||||
}
|
||||
@@ -1,330 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V2.6.1
|
||||
|
||||
+ Replaced the sUsingPreemption variable with the configUSE_PREEMPTION
|
||||
macro to be consistent with the later ports.
|
||||
|
||||
Changes from V4.0.1
|
||||
|
||||
+ Add function prvSetTickFrequencyDefault() to set the DOS tick back to
|
||||
its proper value when the scheduler exits.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <dos.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "portasm.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Implementation of functions defined in portable.h for the industrial
|
||||
* PC port.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/*lint -e950 Non ANSI reserved words okay in this file only. */
|
||||
|
||||
#define portTIMER_INT_NUMBER 0x08
|
||||
|
||||
/* Setup hardware for required tick interrupt rate. */
|
||||
static void prvSetTickFrequency( uint32_t ulTickRateHz );
|
||||
|
||||
/* Restore hardware to as it was prior to starting the scheduler. */
|
||||
static void prvExitFunction( void );
|
||||
|
||||
/* Either chain to the DOS tick (which itself clears the PIC) or clear the PIC
|
||||
directly. We chain to the DOS tick as close as possible to the standard DOS
|
||||
tick rate. */
|
||||
static void prvPortResetPIC( void );
|
||||
|
||||
/* The ISR used depends on whether the preemptive or cooperative
|
||||
scheduler is being used. */
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
/* Tick service routine used by the scheduler when preemptive scheduling is
|
||||
being used. */
|
||||
static void __interrupt __far prvPreemptiveTick( void );
|
||||
#else
|
||||
/* Tick service routine used by the scheduler when cooperative scheduling is
|
||||
being used. */
|
||||
static void __interrupt __far prvNonPreemptiveTick( void );
|
||||
#endif
|
||||
|
||||
/* Trap routine used by taskYIELD() to manually cause a context switch. */
|
||||
static void __interrupt __far prvYieldProcessor( void );
|
||||
|
||||
/* Set the tick frequency back so the floppy drive works correctly when the
|
||||
scheduler exits. */
|
||||
static void prvSetTickFrequencyDefault( void );
|
||||
|
||||
/*lint -e956 File scopes necessary here. */
|
||||
|
||||
/* Used to signal when to chain to the DOS tick, and when to just clear the PIC ourselves. */
|
||||
static int16_t sDOSTickCounter;
|
||||
|
||||
/* Set true when the vectors are set so the scheduler will service the tick. */
|
||||
static BaseType_t xSchedulerRunning = pdFALSE;
|
||||
|
||||
/* Points to the original routine installed on the vector we use for manual context switches. This is then used to restore the original routine during prvExitFunction(). */
|
||||
static void ( __interrupt __far *pxOldSwitchISR )();
|
||||
|
||||
/* Points to the original routine installed on the vector we use to chain to the DOS tick. This is then used to restore the original routine during prvExitFunction(). */
|
||||
static void ( __interrupt __far *pxOldSwitchISRPlus1 )();
|
||||
|
||||
/* Used to restore the original DOS context when the scheduler is ended. */
|
||||
static jmp_buf xJumpBuf;
|
||||
|
||||
/*lint +e956 */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
pxISR pxOriginalTickISR;
|
||||
|
||||
/* This is called with interrupts already disabled. */
|
||||
|
||||
/* Remember what was on the interrupts we are going to use
|
||||
so we can put them back later if required. */
|
||||
pxOldSwitchISR = _dos_getvect( portSWITCH_INT_NUMBER );
|
||||
pxOriginalTickISR = _dos_getvect( portTIMER_INT_NUMBER );
|
||||
pxOldSwitchISRPlus1 = _dos_getvect( portSWITCH_INT_NUMBER + 1 );
|
||||
|
||||
prvSetTickFrequency( configTICK_RATE_HZ );
|
||||
|
||||
/* Put our manual switch (yield) function on a known
|
||||
vector. */
|
||||
_dos_setvect( portSWITCH_INT_NUMBER, prvYieldProcessor );
|
||||
|
||||
/* Put the old tick on a different interrupt number so we can
|
||||
call it when we want. */
|
||||
_dos_setvect( portSWITCH_INT_NUMBER + 1, pxOriginalTickISR );
|
||||
|
||||
/* The ISR used depends on whether the preemptive or cooperative
|
||||
scheduler is being used. */
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
{
|
||||
/* Put our tick switch function on the timer interrupt. */
|
||||
_dos_setvect( portTIMER_INT_NUMBER, prvPreemptiveTick );
|
||||
}
|
||||
#else
|
||||
{
|
||||
/* We want the timer interrupt to just increment the tick count. */
|
||||
_dos_setvect( portTIMER_INT_NUMBER, prvNonPreemptiveTick );
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Setup a counter that is used to call the DOS interrupt as close
|
||||
to it's original frequency as can be achieved given our chosen tick
|
||||
frequency. */
|
||||
sDOSTickCounter = portTICKS_PER_DOS_TICK;
|
||||
|
||||
/* Clean up function if we want to return to DOS. */
|
||||
if( setjmp( xJumpBuf ) != 0 )
|
||||
{
|
||||
prvExitFunction();
|
||||
xSchedulerRunning = pdFALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xSchedulerRunning = pdTRUE;
|
||||
|
||||
/* Kick off the scheduler by setting up the context of the first task. */
|
||||
portFIRST_CONTEXT();
|
||||
}
|
||||
|
||||
return xSchedulerRunning;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The ISR used depends on whether the preemptive or cooperative
|
||||
scheduler is being used. */
|
||||
#if( configUSE_PREEMPTION == 1 )
|
||||
static void __interrupt __far prvPreemptiveTick( void )
|
||||
{
|
||||
/* Get the scheduler to update the task states following the tick. */
|
||||
if( xTaskIncrementTick() != pdFALSE )
|
||||
{
|
||||
/* Switch in the context of the next task to be run. */
|
||||
portSWITCH_CONTEXT();
|
||||
}
|
||||
|
||||
/* Reset the PIC ready for the next time. */
|
||||
prvPortResetPIC();
|
||||
}
|
||||
#else
|
||||
static void __interrupt __far prvNonPreemptiveTick( void )
|
||||
{
|
||||
/* Same as preemptive tick, but the cooperative scheduler is being used
|
||||
so we don't have to switch in the context of the next task. */
|
||||
xTaskIncrementTick();
|
||||
prvPortResetPIC();
|
||||
}
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void __interrupt __far prvYieldProcessor( void )
|
||||
{
|
||||
/* Switch in the context of the next task to be run. */
|
||||
portSWITCH_CONTEXT();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvPortResetPIC( void )
|
||||
{
|
||||
/* We are going to call the DOS tick interrupt at as close a
|
||||
frequency to the normal DOS tick as possible. */
|
||||
|
||||
/* WE SHOULD NOT DO THIS IF YIELD WAS CALLED. */
|
||||
--sDOSTickCounter;
|
||||
if( sDOSTickCounter <= 0 )
|
||||
{
|
||||
sDOSTickCounter = ( int16_t ) portTICKS_PER_DOS_TICK;
|
||||
__asm{ int portSWITCH_INT_NUMBER + 1 };
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Reset the PIC as the DOS tick is not being called to
|
||||
do it. */
|
||||
__asm
|
||||
{
|
||||
mov al, 20H
|
||||
out 20H, al
|
||||
};
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Jump back to the processor state prior to starting the
|
||||
scheduler. This means we are not going to be using a
|
||||
task stack frame so the task can be deleted. */
|
||||
longjmp( xJumpBuf, 1 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvExitFunction( void )
|
||||
{
|
||||
void ( __interrupt __far *pxOriginalTickISR )();
|
||||
|
||||
/* Interrupts should be disabled here anyway - but no
|
||||
harm in making sure. */
|
||||
portDISABLE_INTERRUPTS();
|
||||
if( xSchedulerRunning == pdTRUE )
|
||||
{
|
||||
/* Set the DOS tick back onto the timer ticker. */
|
||||
pxOriginalTickISR = _dos_getvect( portSWITCH_INT_NUMBER + 1 );
|
||||
_dos_setvect( portTIMER_INT_NUMBER, pxOriginalTickISR );
|
||||
prvSetTickFrequencyDefault();
|
||||
|
||||
/* Put back the switch interrupt routines that was in place
|
||||
before the scheduler started. */
|
||||
_dos_setvect( portSWITCH_INT_NUMBER, pxOldSwitchISR );
|
||||
_dos_setvect( portSWITCH_INT_NUMBER + 1, pxOldSwitchISRPlus1 );
|
||||
}
|
||||
/* The tick timer is back how DOS wants it. We can re-enable
|
||||
interrupts without the scheduler being called. */
|
||||
portENABLE_INTERRUPTS();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetTickFrequency( uint32_t ulTickRateHz )
|
||||
{
|
||||
const uint16_t usPIT_MODE = ( uint16_t ) 0x43;
|
||||
const uint16_t usPIT0 = ( uint16_t ) 0x40;
|
||||
const uint32_t ulPIT_CONST = ( uint32_t ) 1193180UL;
|
||||
const uint16_t us8254_CTR0_MODE3 = ( uint16_t ) 0x36;
|
||||
uint32_t ulOutput;
|
||||
|
||||
/* Setup the 8245 to tick at the wanted frequency. */
|
||||
portOUTPUT_BYTE( usPIT_MODE, us8254_CTR0_MODE3 );
|
||||
ulOutput = ulPIT_CONST / ulTickRateHz;
|
||||
portOUTPUT_BYTE( usPIT0, ( uint16_t )( ulOutput & ( uint32_t ) 0xff ) );
|
||||
ulOutput >>= 8;
|
||||
portOUTPUT_BYTE( usPIT0, ( uint16_t ) ( ulOutput & ( uint32_t ) 0xff ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetTickFrequencyDefault( void )
|
||||
{
|
||||
const uint16_t usPIT_MODE = ( uint16_t ) 0x43;
|
||||
const uint16_t usPIT0 = ( uint16_t ) 0x40;
|
||||
const uint16_t us8254_CTR0_MODE3 = ( uint16_t ) 0x36;
|
||||
|
||||
portOUTPUT_BYTE( usPIT_MODE, us8254_CTR0_MODE3 );
|
||||
portOUTPUT_BYTE( usPIT0,0 );
|
||||
portOUTPUT_BYTE( usPIT0,0 );
|
||||
}
|
||||
|
||||
|
||||
/*lint +e950 */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE targetDefinitions [
|
||||
<!ELEMENT targetDefinitions (board)>
|
||||
<!ELEMENT board (name, dbgIF+, dbgDEV, mcuId)>
|
||||
<!ELEMENT name (#PCDATA)>
|
||||
<!ELEMENT dbgIF (#PCDATA)>
|
||||
<!ELEMENT dbgDEV (#PCDATA)>
|
||||
<!ELEMENT mcuId (#PCDATA)>
|
||||
<!ATTLIST board id CDATA #REQUIRED>
|
||||
]>
|
||||
|
||||
<targetDefinitions>
|
||||
<board id="mrts">
|
||||
<name>mrts</name>
|
||||
<dbgIF>SWD</dbgIF>
|
||||
<dbgDEV>ST-Link</dbgDEV>
|
||||
<mcuId>stm32f107vctx</mcuId>
|
||||
</board>
|
||||
</targetDefinitions>
|
||||
@@ -1,189 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Kernel includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
|
||||
#define portINITIAL_FORMAT_VECTOR ( ( StackType_t ) 0x4000 )
|
||||
|
||||
/* Supervisor mode set. */
|
||||
#define portINITIAL_STATUS_REGISTER ( ( StackType_t ) 0x2000)
|
||||
|
||||
/* Used to keep track of the number of nested calls to taskENTER_CRITICAL(). This
|
||||
will be set to 0 prior to the first task being started. */
|
||||
static uint32_t ulCriticalNesting = 0x9999UL;
|
||||
|
||||
|
||||
#define portSAVE_CONTEXT() \
|
||||
lea.l (-60, %sp), %sp; \
|
||||
movem.l %d0-%fp, (%sp); \
|
||||
move.l pxCurrentTCB, %a0; \
|
||||
move.l %sp, (%a0);
|
||||
|
||||
#define portRESTORE_CONTEXT() \
|
||||
move.l pxCurrentTCB, %a0; \
|
||||
move.l (%a0), %sp; \
|
||||
movem.l (%sp), %d0-%fp; \
|
||||
lea.l %sp@(60), %sp; \
|
||||
rte
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
StackType_t *pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )
|
||||
{
|
||||
*pxTopOfStack = ( StackType_t ) pvParameters;
|
||||
pxTopOfStack--;
|
||||
|
||||
*pxTopOfStack = (StackType_t) 0xDEADBEEF;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* Exception stack frame starts with the return address. */
|
||||
*pxTopOfStack = ( StackType_t ) pxCode;
|
||||
pxTopOfStack--;
|
||||
|
||||
*pxTopOfStack = ( portINITIAL_FORMAT_VECTOR << 16UL ) | ( portINITIAL_STATUS_REGISTER );
|
||||
pxTopOfStack--;
|
||||
|
||||
*pxTopOfStack = ( StackType_t ) 0x0; /*FP*/
|
||||
pxTopOfStack -= 14; /* A5 to D0. */
|
||||
|
||||
return pxTopOfStack;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
extern void vPortStartFirstTask( void );
|
||||
|
||||
ulCriticalNesting = 0UL;
|
||||
|
||||
/* Configure the interrupts used by this port. */
|
||||
vApplicationSetupInterrupts();
|
||||
|
||||
/* Start the first task executing. */
|
||||
vPortStartFirstTask();
|
||||
|
||||
return pdFALSE;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortEnterCritical( void )
|
||||
{
|
||||
if( ulCriticalNesting == 0UL )
|
||||
{
|
||||
/* Guard against context switches being pended simultaneously with a
|
||||
critical section being entered. */
|
||||
do
|
||||
{
|
||||
portDISABLE_INTERRUPTS();
|
||||
if( MCF_INTC0_INTFRCH == 0UL )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
portENABLE_INTERRUPTS();
|
||||
|
||||
} while( 1 );
|
||||
}
|
||||
ulCriticalNesting++;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
ulCriticalNesting--;
|
||||
if( ulCriticalNesting == 0 )
|
||||
{
|
||||
portENABLE_INTERRUPTS();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortYieldHandler( void )
|
||||
{
|
||||
uint32_t ulSavedInterruptMask;
|
||||
|
||||
ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
/* Note this will clear all forced interrupts - this is done for speed. */
|
||||
MCF_INTC0_INTFRCL = 0;
|
||||
vTaskSwitchContext();
|
||||
portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ_DIR) hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
$(STM32_DEVICE_SUPPORT_DIR)
|
||||
vpath %.s $(STARTER_SCRIPT_DIR)
|
||||
vpath %.o $(OBJ_DIR)
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) #$(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
#$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
# $(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,73 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file main.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file main.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// FreeRTOS includes
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Will only get here if there was insufficient memory to create the idle
|
||||
task. The idle task is created within vTaskStartScheduler(). */
|
||||
for( ;; );
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
**
|
||||
** File : LinkerScript.ld
|
||||
**
|
||||
** Author : Auto-generated by Ac6 System Workbench
|
||||
**
|
||||
** Abstract : Linker script for STM32F107VCTx Device from STM32F1 series
|
||||
** 64Kbytes RAM
|
||||
** 256Kbytes ROM
|
||||
**
|
||||
** Set heap size, stack size and stack location according
|
||||
** to application requirements.
|
||||
**
|
||||
** Set memory bank area and size if external memory is used.
|
||||
**
|
||||
** Target : STMicroelectronics STM32
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
** @attention
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2017 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. 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.
|
||||
** 3. Neither the name of Ac6 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 HOLDER 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.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Entry Point */
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
/* Highest address of the user mode stack */
|
||||
_estack = 0x20010000; /* end of RAM */
|
||||
|
||||
_Min_Heap_Size = 0; /* required amount of heap */
|
||||
_Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 256K
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
SECTIONS
|
||||
{
|
||||
/* The startup code into ROM memory */
|
||||
.isr_vector :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.isr_vector)) /* Startup code */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* The program code and other data into ROM memory */
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
*(.glue_7) /* glue arm to thumb code */
|
||||
*(.glue_7t) /* glue thumb to arm code */
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbols at end of code */
|
||||
} >ROM
|
||||
|
||||
/* Constant data into ROM memory*/
|
||||
.rodata :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM.extab : {
|
||||
. = ALIGN(4);
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.ARM : {
|
||||
. = ALIGN(4);
|
||||
__exidx_start = .;
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = .;
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.preinit_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array*))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.init_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array*))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
.fini_array :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
KEEP (*(.fini_array*))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(4);
|
||||
} >ROM
|
||||
|
||||
/* Used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
/* Initialized data sections into RAM memory */
|
||||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start */
|
||||
*(.data) /* .data sections */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
|
||||
/* Uninitialized data section into RAM memory */
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
/* This is used by the startup in order to initialize the .bss secion */
|
||||
_sbss = .; /* define a global symbol at bss start */
|
||||
__bss_start__ = _sbss;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
_ebss = .; /* define a global symbol at bss end */
|
||||
__bss_end__ = _ebss;
|
||||
} >RAM
|
||||
|
||||
/* User_heap_stack section, used to check that there is enough RAM left */
|
||||
._user_heap_stack :
|
||||
{
|
||||
. = ALIGN(8);
|
||||
PROVIDE ( end = . );
|
||||
PROVIDE ( _end = . );
|
||||
. = . + _Min_Heap_Size;
|
||||
. = . + _Min_Stack_Size;
|
||||
. = ALIGN(8);
|
||||
} >RAM
|
||||
|
||||
|
||||
|
||||
/* Remove information from the compiler libraries */
|
||||
/* /DISCARD/ :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
}
|
||||
*/
|
||||
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||
|
||||
GROUP
|
||||
{
|
||||
libgcc.a
|
||||
libg.a
|
||||
libc.a
|
||||
libm.a
|
||||
libnosys.a
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
ifndef EXECUTABLE
|
||||
|
||||
# Define release version for Adremo firmware here
|
||||
S0_RELEASE_PRODUCT = \""S0\""
|
||||
S0_RELEASE_MAJOR = 0
|
||||
S0_RELEASE_MINOR = 1
|
||||
S0_RELEASE_BRANCH = 0
|
||||
S0_RELEASE_REVISION = 0
|
||||
|
||||
|
||||
# Main objects (not to be added in the library)
|
||||
OBJECTS_MAIN = \
|
||||
main.o
|
||||
|
||||
# Objects to be build for both the simulation and real target
|
||||
OBJECTS_GEN = \
|
||||
\
|
||||
system_stm32f10x.o \
|
||||
sysmem.o \
|
||||
startup_stm32.o \
|
||||
\
|
||||
heap_4.o\
|
||||
list.o \
|
||||
port.o \
|
||||
queue.o \
|
||||
tasks.o \
|
||||
timers.o
|
||||
|
||||
STM32_STDPERIPH_ROOT = ../STM32F10x_StdPeriph_Lib_V3.5.0
|
||||
STM32_STDPERIPH_INC = ../STM32F10x_StdPeriph_Lib_V3.5.0/inc
|
||||
STM32_DEVICE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
STM32_CORE_SUPPORT_DIR = ../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
FREERTOS_DIR = ../FreeRTOS/Source/include
|
||||
FREERTOS_PORT_DIR = ../FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
LINKER_SCRIPTS_DIR = linker
|
||||
LINKER_SCRIPT = LinkerScript.ld
|
||||
STARTER_SCRIPT_DIR = startup
|
||||
|
||||
RELEASE_DEFINES = \
|
||||
-DRELEASE_PRODUCT=$(RELEASE_PRODUCT) \
|
||||
-DRELEASE_MAJOR=$(RELEASE_MAJOR) \
|
||||
-DRELEASE_MINOR=$(RELEASE_MINOR) \
|
||||
-DRELEASE_BRANCH=$(RELEASE_BRANCH) \
|
||||
-DRELEASE_REVISION=$(RELEASE_REVISION) \
|
||||
|
||||
INCLUDES = \
|
||||
-Iinc \
|
||||
-I$(STM32_STDPERIPH_INC) \
|
||||
-I$(FREERTOS_DIR) \
|
||||
-I$(FREERTOS_PORT_DIR) \
|
||||
-I$(STM32_DEVICE_SUPPORT_DIR) \
|
||||
-I$(STM32_CORE_SUPPORT_DIR)
|
||||
|
||||
all: release
|
||||
release: export RELEASE_PRODUCT := $(S0_RELEASE_PRODUCT)
|
||||
release: export RELEASE_MAJOR := $(S0_RELEASE_MAJOR)
|
||||
release: export RELEASE_MINOR := $(S0_RELEASE_MINOR)
|
||||
release: export RELEASE_BRANCH := $(S0_RELEASE_BRANCH)
|
||||
release: export RELEASE_REVISION := $(S0_RELEASE_REVISION)
|
||||
release: export OBJ_DIR := obj_release/
|
||||
release: export OBJECTS := $(OBJECTS_GEN)
|
||||
release: export OBJECTS_MAIN := $(OBJECTS_MAIN)
|
||||
release: export CROSS_COMPILE := arm-none-eabi-
|
||||
release: export CCFLAGS := -c -O2 -Wall -g -fno-common -mcpu=cortex-m3 -mthumb $(RELEASE_DEFINES) $(INCLUDES)
|
||||
release: export ASFLAGS := -g -mapcs-32
|
||||
release: export LDFLAGS := -g -nostartfiles -mcpu=cortex-m3 -mthumb -T$(LINKER_SCRIPTS_DIR)/$(LINKER_SCRIPT) -Wl,-Map=hsb_mrts_release.map
|
||||
release: export LDARCHIVES := -L. -L$(STM32_STDPERIPH_ROOT) -lSTM_StdPeriph -lhsb_mrts_release
|
||||
release: export ARFLAGS := ru
|
||||
release: export OBJCOPYFLAGS := -O binary
|
||||
release: export OBJDUMPFLAGS := -x --syms -S
|
||||
release: export EXECUTABLE := hsb_mrts_release.out
|
||||
release: export BINFILE := hsb_mrts_release.bin
|
||||
release: export LIBRARY := libhsb_mrts_release.a
|
||||
release: export LISTFILE := hsb_mrts_release.list
|
||||
release: ;@$(MAKE)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hsb_mrts_release.out hsb_mrts_release.map hsb_mrts_release.bin hsb_mrts_release.list hsb_mrts_release.map libhsb_mrts_release.a
|
||||
rm -rf obj_release
|
||||
|
||||
flash:
|
||||
st-flash write hsdb_mrts_release.bin 0x8000000
|
||||
|
||||
doc:
|
||||
doxygen 0322-Adremo.dox
|
||||
|
||||
.PHONY: all clean doc flash
|
||||
|
||||
else
|
||||
|
||||
vpath %.c \
|
||||
src \
|
||||
startup \
|
||||
../FreeRTOS/Source \
|
||||
../FreeRTOS/Source/portable/GCC/ARM_CM3 \
|
||||
../FreeRTOS/Source/portable/MemMang \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x \
|
||||
../STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/CoreSupport
|
||||
|
||||
vpath %.s \
|
||||
startup
|
||||
vpath %.o \
|
||||
obj_release
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
LD = $(CROSS_COMPILE)gcc
|
||||
AS = $(CROSS_COMPILE)as
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||
|
||||
$(BINFILE): $(EXECUTABLE)
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
$(OBJDUMP) $(OBJDUMPFLAGS) $< > $(LISTFILE)
|
||||
cp $@ ../$@
|
||||
|
||||
$(EXECUTABLE): $(OBJ_DIR) $(OBJECTS_MAIN) $(LIBRARY)
|
||||
$(LD) $(LDFLAGS) $(addprefix $(OBJ_DIR)/, $(OBJECTS_MAIN)) $(LDARCHIVES) -o $@
|
||||
|
||||
$(LIBRARY): $(OBJ_DIR) $(OBJECTS) | $(OBJ_DIR)
|
||||
$(AR) $(ARFLAGS) $@ $(addprefix $(OBJ_DIR)/, $(OBJECTS))
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) $< -o $(OBJ_DIR)/$@
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
endif
|
||||
@@ -1,103 +0,0 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @brief Description
|
||||
// -----------------------------------------------------------------------------
|
||||
// Micro-Key bv
|
||||
// Industrieweg 28, 9804 TG Noordhorn
|
||||
// Postbus 92, 9800 AB Zuidhorn
|
||||
// The Netherlands
|
||||
// Tel: +31 594 503020
|
||||
// Fax: +31 594 505825
|
||||
// Email: support@microkey.nl
|
||||
// Web: www.microkey.nl
|
||||
// -----------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2017 Micro-Key bv
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/// @file freeRTOSFixes.c
|
||||
/// @ingroup {group_name}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include "freeRTOSFixes.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void OS_logTaskInfo(xTaskHandle taskHandle)
|
||||
{
|
||||
unsigned portBASE_TYPE highWaterMark;
|
||||
char text[128];
|
||||
|
||||
snprintf(text, sizeof(text), "Task %s\n", pcTaskGetTaskName(taskHandle));
|
||||
Shell_sendString(text);
|
||||
|
||||
highWaterMark = uxTaskGetStackHighWaterMark(taskHandle);
|
||||
snprintf(text, sizeof(text), "Stack high water mark : %lu long words\n", highWaterMark);
|
||||
Shell_sendString(text);
|
||||
}
|
||||
|
||||
// Implementation for libc, needed for printf related functions.
|
||||
caddr_t _sbrk(int incr)
|
||||
{
|
||||
extern char _end;
|
||||
static char* heap_end;
|
||||
char* prev_heap_end;
|
||||
|
||||
if(heap_end == 0)
|
||||
{
|
||||
heap_end = &_end;
|
||||
}
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
heap_end += incr;
|
||||
return (caddr_t)prev_heap_end;
|
||||
}
|
||||
|
||||
// Stack overflow hook
|
||||
void vApplicationStackOverflowHook(xTaskHandle xTask, signed portCHAR* pcTaskName)
|
||||
{
|
||||
Logger_fatal(FATALCODE_STACKOVERFLOW);
|
||||
}
|
||||
|
||||
// Malloc failed hook
|
||||
void vApplicationMallocFailedHook(void)
|
||||
{
|
||||
Logger_fatal(FATALCODE_MALLOCFAILED);
|
||||
}
|
||||
|
||||
// Assert for StdPeriph library
|
||||
void assert_failed(uint8_t* file, uint32_t line)
|
||||
{
|
||||
Logger_log((char*)file, "", line, LOGTYPE_ERROR, "assert failed");
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user