Skip to content

Commit

Permalink
ARMv7-R MPU Port Demos (FreeRTOS#1149)
Browse files Browse the repository at this point in the history
* 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.
---------
  • Loading branch information
Skptak authored Mar 26, 2024
1 parent 8517050 commit 273fb94
Show file tree
Hide file tree
Showing 290 changed files with 139,904 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/core_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
'.cfg',
'.cgp',
'.checksum',
'.clang-format',
'.cmake',
'.cmd',
'.code-workspace',
'.config',
'.cpp',
'.cproj',
Expand Down Expand Up @@ -303,6 +305,8 @@
r'FreeRTOS/Demo/CORTEX_STM32L152_Discovery_IAR/include/.*',
r'FreeRTOS/Demo/CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC/.*',
r'FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_Keil/.*',
r'FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC/BoardFiles/.*',
r'FreeRTOS/Demo/CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC/BoardFiles/.*',
r'FreeRTOS/Demo/AVR_ATMega4809_Atmel_Studio/RTOSDemo/.*',
r'FreeRTOS/Demo/AVR32_UC3/.*',
r'FreeRTOS/Demo/AVR_ATMega4809_IAR/.*',
Expand Down Expand Up @@ -331,6 +335,8 @@

FREERTOS_IGNORED_FILES = [
'cspell.config.yaml',
'.ccsproject',
'.clang-format',
'.cproject',
'.project',
'requirements.txt',
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/freertos_mpu_demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: FreeRTOS MPU Demo
on:
push:
pull_request:
workflow_dispatch:

env:
bashPass: \033[32;1mPASSED -
bashInfo: \033[33;1mINFO -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m

jobs:
Cortex-R4:
name: Texas Instruments RM46
runs-on: ubuntu-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/[email protected]
with:
submodules: false

- env:
stepName: Install GNU ARM Toolchain
name: Install GNU ARM Toolchain
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get -y update
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
- env:
stepName: Build CORTEX R4 MPU Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
set +e
cmake -S . -B build;
make -C build all;
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
Cortex-R5:
name: Texas Instruments RM57
runs-on: ubuntu-latest
steps:
- env:
stepName: Checkout Repository
name: ${{ env.stepName }}
uses: actions/[email protected]
with:
submodules: false

- env:
stepName: Install GNU ARM Toolchain
name: Install GNU ARM Toolchain
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
sudo apt-get -y update
sudo apt-get -y install gcc-arm-none-eabi build-essential cmake git ninja-build python3-minimal
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
- env:
stepName: Fetch Kernel Submodule
name: ${{ env.stepName }}
shell: bash
run: |
# ${{ env.stepName }}
echo -e "::group:: ${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
set +e
git submodule update --checkout --init --depth 1 FreeRTOS/Source FreeRTOS/Demo/ThirdParty/Community-Supported-Demos
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
- env:
stepName: Build CORTEX R5 MPU Demo
name: ${{ env.stepName }}
shell: bash
working-directory: FreeRTOS/Demo/CORTEX_MPU_R5F_TI_RM57_HERCULES_GCC
run: |
# ${{ env.stepName }}
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
set +e
cmake -S . -B build;
make -C build all;
exitStatus=$?
set -e
echo -e "::endgroup::"
if [ $exitStatus -eq 0 ]; then
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
else
echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}"
exit 1
fi
8 changes: 8 additions & 0 deletions FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC/.ccsproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?ccsproject version="1.0"?>
<projectOptions>
<deviceFamily value="TMS470"/>
<connection value="common/targetdb/connections/TIXDS110_Connection.xml"/>
<isTargetManual value="false"/>
<sourceLookupPath value=""/>
</projectOptions>
104 changes: 104 additions & 0 deletions FreeRTOS/Demo/CORTEX_MPU_R4F_TI_RM46_HERCULES_GCC/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
Language: Cpp
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterExternBlock: false
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 90
CompactNamespaces: false
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: NoIndent
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 4
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 1000
PenaltyBreakBeforeFirstCallParameter: 200
PenaltyBreakComment: 50
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 100
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 10000
PointerAlignment: Middle
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: false
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
TabWidth: 4
UseCRLF: false
UseTab: Never
...

Loading

0 comments on commit 273fb94

Please sign in to comment.