Skip to content

Commit 273fb94

Browse files
authored
ARMv7-R MPU Port Demos (FreeRTOS#1149)
* Add in a Cortex R5F MPU demo for the Hercules RM57 Development Kit. * Add in a Cortex R4F MPU demo for the Hercules RM46 Development Kit. * Provide a Code Composer Studio (CCS) project for running these demos. * Provide a CMakeLists.txt file to allow for compilation of the demos without use of an IDE. * Add a CI-CD build of these demos using CMake with Fetch-Content. * Include necessary README to explain the new demos. ---------
1 parent 8517050 commit 273fb94

File tree

290 files changed

+139904
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+139904
-0
lines changed

.github/scripts/core_checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@
4444
'.cfg',
4545
'.cgp',
4646
'.checksum',
47+
'.clang-format',
4748
'.cmake',
4849
'.cmd',
50+
'.code-workspace',
4951
'.config',
5052
'.cpp',
5153
'.cproj',
@@ -303,6 +305,8 @@
303305
r'FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/.*',
304306
r'FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/.*',
305307
r'FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/.*',
308+
r'FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC/BoardFiles/.*',
309+
r'FreeRTOS/Demo/CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC/BoardFiles/.*',
306310
r'FreeRTOS/Demo/AVR_ATMega4809_Atmel_Studio/RTOSDemo/.*',
307311
r'FreeRTOS/Demo/AVR32_UC3/.*',
308312
r'FreeRTOS/Demo/AVR_ATMega4809_IAR/.*',
@@ -331,6 +335,8 @@
331335

332336
FREERTOS_IGNORED_FILES = [
333337
'cspell.config.yaml',
338+
'.ccsproject',
339+
'.clang-format',
334340
'.cproject',
335341
'.project',
336342
'requirements.txt',
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: FreeRTOS MPU Demo
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
env:
8+
bashPass: \033[32;1mPASSED -
9+
bashInfo: \033[33;1mINFO -
10+
bashFail: \033[31;1mFAILED -
11+
bashEnd: \033[0m
12+
13+
jobs:
14+
Cortex-R4:
15+
name: Texas Instruments RM46
16+
runs-on: ubuntu-latest
17+
steps:
18+
- env:
19+
stepName: Checkout Repository
20+
name: ${{ env.stepName }}
21+
uses: actions/checkout@v4.1.1
22+
with:
23+
submodules: false
24+
25+
- env:
26+
stepName: Install GNU ARM Toolchain
27+
name: Install GNU ARM Toolchain
28+
shell: bash
29+
run: |
30+
# ${{ env.stepName }}
31+
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
32+
sudo apt-get -y update
33+
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
34+
echo -e "::endgroup::"
35+
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
36+
37+
- env:
38+
stepName: Build CORTEX R4 MPU Demo
39+
name: ${{ env.stepName }}
40+
shell: bash
41+
working-directory: FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC
42+
run: |
43+
# ${{ env.stepName }}
44+
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
45+
set +e
46+
cmake -S . -B build;
47+
make -C build all;
48+
exitStatus=$?
49+
set -e
50+
echo -e "::endgroup::"
51+
if [ $exitStatus -eq 0 ]; then
52+
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
53+
else
54+
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
55+
exit 1
56+
fi
57+
58+
Cortex-R5:
59+
name: Texas Instruments RM57
60+
runs-on: ubuntu-latest
61+
steps:
62+
- env:
63+
stepName: Checkout Repository
64+
name: ${{ env.stepName }}
65+
uses: actions/checkout@v4.1.1
66+
with:
67+
submodules: false
68+
69+
- env:
70+
stepName: Install GNU ARM Toolchain
71+
name: Install GNU ARM Toolchain
72+
shell: bash
73+
run: |
74+
# ${{ env.stepName }}
75+
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
76+
sudo apt-get -y update
77+
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
78+
echo -e "::endgroup::"
79+
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
80+
81+
- env:
82+
stepName: Fetch Kernel Submodule
83+
name: ${{ env.stepName }}
84+
shell: bash
85+
run: |
86+
# ${{ env.stepName }}
87+
echo -e "::group:: ${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
88+
set +e
89+
git submodule update --checkout --init --depth 1 FreeRTOS/Source FreeRTOS/Demo/ThirdParty/Community-Supported-Demos
90+
exitStatus=$?
91+
set -e
92+
echo -e "::endgroup::"
93+
if [ $exitStatus -eq 0 ]; then
94+
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
95+
else
96+
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
97+
exit 1
98+
fi
99+
100+
- env:
101+
stepName: Build CORTEX R5 MPU Demo
102+
name: ${{ env.stepName }}
103+
shell: bash
104+
working-directory: FreeRTOS/Demo/CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC
105+
run: |
106+
# ${{ env.stepName }}
107+
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
108+
set +e
109+
cmake -S . -B build;
110+
make -C build all;
111+
exitStatus=$?
112+
set -e
113+
echo -e "::endgroup::"
114+
if [ $exitStatus -eq 0 ]; then
115+
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
116+
else
117+
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
118+
exit 1
119+
fi
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<?ccsproject version="1.0"?>
3+
<projectOptions>
4+
<deviceFamily value="TMS470"/>
5+
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
6+
<isTargetManual value="false"/>
7+
<sourceLookupPath value=""/>
8+
</projectOptions>
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
Language: Cpp
3+
AlignAfterOpenBracket: Align
4+
AlignConsecutiveAssignments: None
5+
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
6+
AlignConsecutiveDeclarations: None
7+
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
8+
AlignEscapedNewlines: Left
9+
AlignOperands: AlignAfterOperator
10+
AlignTrailingComments: true
11+
AllowAllArgumentsOnNextLine: false
12+
AllowAllParametersOfDeclarationOnNextLine: false
13+
AllowShortBlocksOnASingleLine: Never
14+
AllowShortCaseLabelsOnASingleLine: false
15+
AllowShortEnumsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: None
17+
AllowShortIfStatementsOnASingleLine: false
18+
AllowShortLambdasOnASingleLine: All
19+
AllowShortLoopsOnASingleLine: false
20+
AlwaysBreakAfterReturnType: None
21+
AlwaysBreakBeforeMultilineStrings: false
22+
AlwaysBreakTemplateDeclarations: Yes
23+
BinPackArguments: false
24+
BinPackParameters: false
25+
BitFieldColonSpacing: Both
26+
BraceWrapping:
27+
AfterCaseLabel: true
28+
AfterClass: true
29+
AfterControlStatement: Always
30+
AfterEnum: true
31+
AfterExternBlock: false
32+
AfterFunction: true
33+
AfterNamespace: true
34+
AfterStruct: true
35+
AfterUnion: true
36+
BeforeCatch: true
37+
BeforeElse: true
38+
BeforeLambdaBody: false
39+
BeforeWhile: false
40+
IndentBraces: false
41+
SplitEmptyFunction: true
42+
SplitEmptyRecord: true
43+
SplitEmptyNamespace: true
44+
BreakBeforeBinaryOperators: NonAssignment
45+
BreakBeforeBraces: Custom
46+
BreakBeforeConceptDeclarations: true
47+
BreakBeforeTernaryOperators: true
48+
BreakConstructorInitializers: BeforeColon
49+
BreakInheritanceList: BeforeColon
50+
BreakStringLiterals: true
51+
ColumnLimit: 90
52+
CompactNamespaces: false
53+
ContinuationIndentWidth: 4
54+
Cpp11BracedListStyle: false
55+
DerivePointerAlignment: false
56+
EmptyLineBeforeAccessModifier: Always
57+
FixNamespaceComments: true
58+
IncludeBlocks: Preserve
59+
IndentCaseBlocks: false
60+
IndentCaseLabels: true
61+
IndentExternBlock: NoIndent
62+
IndentGotoLabels: true
63+
IndentPPDirectives: BeforeHash
64+
IndentWidth: 4
65+
IndentWrappedFunctionNames: true
66+
KeepEmptyLinesAtTheStartOfBlocks: false
67+
MaxEmptyLinesToKeep: 1
68+
NamespaceIndentation: None
69+
PenaltyBreakAssignment: 1000
70+
PenaltyBreakBeforeFirstCallParameter: 200
71+
PenaltyBreakComment: 50
72+
PenaltyBreakFirstLessLess: 120
73+
PenaltyBreakString: 100
74+
PenaltyBreakTemplateDeclaration: 10
75+
PenaltyExcessCharacter: 100
76+
PenaltyIndentedWhitespace: 0
77+
PenaltyReturnTypeOnItsOwnLine: 10000
78+
PointerAlignment: Middle
79+
ReflowComments: true
80+
SortIncludes: false
81+
SortUsingDeclarations: true
82+
SpaceAfterCStyleCast: true
83+
SpaceAfterLogicalNot: false
84+
SpaceAfterTemplateKeyword: false
85+
SpaceBeforeCpp11BracedList: true
86+
SpaceBeforeCtorInitializerColon: false
87+
SpaceBeforeInheritanceColon: false
88+
SpaceBeforeParens: Never
89+
SpaceBeforeRangeBasedForLoopColon: false
90+
SpaceBeforeSquareBrackets: false
91+
SpaceInEmptyBlock: false
92+
SpaceInEmptyParentheses: false
93+
SpacesBeforeTrailingComments: 1
94+
SpacesInAngles: false
95+
SpacesInConditionalStatement: true
96+
SpacesInContainerLiterals: true
97+
SpacesInCStyleCastParentheses: true
98+
SpacesInParentheses: true
99+
SpacesInSquareBrackets: true
100+
TabWidth: 4
101+
UseCRLF: false
102+
UseTab: Never
103+
...
104+

0 commit comments

Comments
 (0)