Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARMv7-R MPU Port #938

Merged
merged 77 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4a74745
First draft of a CRx MPU Port for FreeRTOS
Skptak Dec 27, 2023
d8b0827
Add support for the port in the CMakeLists.txt files
Skptak Dec 28, 2023
a33a6dd
Add new spell check words
Skptak Dec 28, 2023
26019cd
Fix copyright headers in the new port files
Skptak Dec 28, 2023
80d0987
Add in Access Control List support to the port
Skptak Dec 28, 2023
a119124
Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into …
Skptak Dec 28, 2023
43946db
Refactoring xPortIsAuthorizedToAccessBuffer
Skptak Dec 29, 2023
8922749
Clang format the mpu_wrappers_v2_asm.h file with slight tweaks to the…
Skptak Jan 2, 2024
4f65931
Clang format port.c with slight tweaks to the format options
Skptak Jan 2, 2024
7650690
Clang format portmacro.h with slight tweaks to the format options
Skptak Jan 2, 2024
4c53a43
Add the .clang-format file that is being used to the port
Skptak Jan 2, 2024
bdd9f71
Add the CI-CD check for clang formatting the ARM_CRx_MPU port
Skptak Jan 2, 2024
dc0e508
Add the ARM_CRx_MPU Demos to the kernel build checks
Skptak Jan 2, 2024
b701a46
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 2, 2024
b2c406c
Change to make the .clang-format file work with V14 of clang-format. …
Skptak Jan 2, 2024
be4dc05
Slight format change
Skptak Jan 2, 2024
d965464
Use my fork for the Demo builds
Skptak Jan 2, 2024
e25b6e1
Formatting fix
Skptak Jan 2, 2024
b0ec6d0
Ignore the clang format file for the header checks
Skptak Jan 2, 2024
fd19c0e
Throw an error if configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is set to 1
Skptak Jan 2, 2024
a60fe75
Fix cSpellWords issue
Skptak Jan 3, 2024
56b400f
Change the parameters for prvMpuSetRegion() to follow the naming conv…
Skptak Jan 3, 2024
ae12720
Formatting changes for the portASM.S file
Skptak Jan 3, 2024
96ab824
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 3, 2024
d230780
Remove the use of ulContext and a controlled SVC stack pointer for th…
Skptak Jan 3, 2024
22ff900
Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into …
Skptak Jan 3, 2024
8202d2e
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 3, 2024
0fc0a5f
Formatting fix
Skptak Jan 3, 2024
63dfe61
Fix assert check in svc enter, remove un-used defines
Skptak Jan 4, 2024
aacae9f
Fix formatting in portmacro_asm.h
Skptak Jan 4, 2024
8de6be2
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 4, 2024
8f9deb4
Add the system call table as an actual extern declaration to the ASM …
Skptak Jan 9, 2024
501daf4
Update spelling wordlist
Skptak Jan 9, 2024
c1124d5
Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into …
Skptak Jan 9, 2024
745384b
Make vPortYieldWithinAPI and FreeRTOS_Tick_Handler into more configur…
Skptak Jan 9, 2024
53c84a1
Update the port to use FreeRTOS_IRQ_Handler instead of the VIM functions
Skptak Jan 10, 2024
bdeb9eb
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 10, 2024
fdd8565
Add words back to the lexicon that were accidentally removed
Skptak Jan 11, 2024
e3d023b
Move the declaration of prvGetMPURegionSizeSetting to the top of the …
Skptak Jan 12, 2024
ec67909
Remove the end of interrupt clearing from the FreeRTOS_IRQ_Handler. U…
Skptak Jan 12, 2024
87a20e6
Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into …
Skptak Jan 12, 2024
3120bc3
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 12, 2024
ae6fc13
Formatting fix
Skptak Jan 12, 2024
6f361a2
Remove the CI-CD Check from the FreeRTOS-Kernel repo until after http…
Skptak Jan 13, 2024
9919eee
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 22, 2024
b15717f
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 23, 2024
494c78d
Use Linux sort for the lexicon
Skptak Jan 23, 2024
2f445ee
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 26, 2024
3e86449
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 30, 2024
91d4d24
Respond to PR Feedback
Skptak Jan 30, 2024
902ae3d
Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into …
Skptak Jan 30, 2024
11beb71
Formatting fixes
Skptak Jan 30, 2024
372b65a
Merge branch 'main' into ARM_CRx_MPU
Skptak Jan 31, 2024
ca37a2c
Respond to additional review feedback. Use periods at end of briefs. …
Skptak Jan 31, 2024
fe424a1
Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into …
Skptak Feb 1, 2024
9cf6c26
Add in functions to enable and disable the MPU background region. Add…
Skptak Feb 1, 2024
ec1332e
Remove the default peripheral MPU region from the port. Add declarati…
Skptak Feb 1, 2024
56a51ff
Formatting changes, move function declarations around to make the fil…
Skptak Feb 1, 2024
9da72c2
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 1, 2024
797f2f2
Formatting tweaks for mpu_wrappers_v2_asm.S
Skptak Feb 1, 2024
db8f233
Remove the check for clear tick interrupt. Format comments a little. …
Skptak Feb 2, 2024
ca9f1cc
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 6, 2024
72ee9e3
Fix two incorrect ifdef guards in mpu_wrappers_v2_asm.S
Skptak Feb 7, 2024
5929dc7
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 8, 2024
1eae231
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 13, 2024
5f5ed08
Slight formatting change to mpu_wrappers files
Skptak Feb 14, 2024
370498f
Slight changes to formatting
Skptak Feb 14, 2024
80b99d6
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 14, 2024
34c9579
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 18, 2024
bfb4378
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 19, 2024
153af86
Fix an incorrect operating mode word in the portASM.S file, slight fo…
Skptak Feb 19, 2024
d6e2ab4
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 21, 2024
c195770
Apply git review ptach created by @aggarg
Skptak Feb 23, 2024
2ef0b5d
Remove clang format of the ARM_CRx_MPU Port
Skptak Feb 23, 2024
ecd936b
Fix a grammar issue, use longer function ends in port.c. Use @note in…
Skptak Feb 23, 2024
e3e7343
Merge branch 'main' into ARM_CRx_MPU
Skptak Feb 26, 2024
d8fdd4e
Remove duplicate space from the copyright header
Skptak Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ NTRST
NVIC
ODAT
ODSR
OINC
OIWBNOWA
OIWBWA
OIWTNOWA
OPMOD
optimisations
OPTIMISED
Expand Down Expand Up @@ -795,6 +799,15 @@ SWRST
SWTRG
synchronise
SYSC
sysclk
Sysclk
SysClk
SYSClk
SYSCLK
sysclock
Sysclock
SysClock
SYSCLOCK
TACCR
TACCTL
TACLR
Expand Down Expand Up @@ -877,6 +890,9 @@ UNDADD
unpadded
Unpadded
UNPADDED
unprotect
Unprotect
Unprotected
UNRE
UNSUB
UNSUBACK
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/kernel_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
'FreeRTOS-openocd.c',
'Makefile',
'.DS_Store',
'cspell.config.yaml'
'cspell.config.yaml',
'.clang-format'
]

KERNEL_IGNORED_EXTENSIONS = [
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ jobs:
with:
exclude-dirs: portable

port-formatting:
kstribrnAmzn marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Formatting of FreeRTOS-Kernel Files
uses: FreeRTOS/CI-CD-Github-Actions/clang-formatting@main
with:
path: portable/GCC/ARM_CRx_MPU

spell-check:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ if(NOT FREERTOS_PORT)
" GCC_ARM_CM85_NTZ_NONSECURE - Compiler: GCC Target: ARM Cortex-M85 non-trustzone non-secure\n"
" GCC_ARM_CM85_TFM - Compiler: GCC Target: ARM Cortex-M85 non-secure for TF-M\n"
" GCC_ARM_CR5 - Compiler: GCC Target: ARM Cortex-R5\n"
" GCC_ARM_CRX_MPU - Compiler: GCC Target: ARM Cortex-Rx with MPU\n"
" GCC_ARM_CRX_NOGIC - Compiler: GCC Target: ARM Cortex-Rx no GIC\n"
" GCC_ARM7_AT91FR40008 - Compiler: GCC Target: ARM7 Atmel AT91R40008\n"
" GCC_ARM7_AT91SAM7S - Compiler: GCC Target: ARM7 Atmel AT91SAM7S\n"
Expand Down
6 changes: 6 additions & 0 deletions portable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ add_library(freertos_kernel_port OBJECT
GCC/ARM_CR5/port.c
GCC/ARM_CR5/portASM.S>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CRX_MPU>:
GCC/ARM_CRx_MPU/port.c
GCC/ARM_CRx_MPU/portASM.S
GCC/ARM_CRx_MPU/mpu_wrappers_v2_asm.S>

$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CRX_NOGIC>:
GCC/ARM_CRx_No_GIC/port.c
GCC/ARM_CRx_No_GIC/portASM.S>
Expand Down Expand Up @@ -836,6 +841,7 @@ target_include_directories(freertos_kernel_port_headers INTERFACE

# ARMv7-R ports for GCC
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CR5>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CR5>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CRX_MPU>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CRx_MPU>
$<$<STREQUAL:${FREERTOS_PORT},GCC_ARM_CRX_NOGIC>:${CMAKE_CURRENT_LIST_DIR}/GCC/ARM_CRx_No_GIC>

# ARMv4T ARM7TDMI ports for GCC
Expand Down
103 changes: 103 additions & 0 deletions portable/GCC/ARM_CRx_MPU/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
Language: Cpp
AlignAfterOpenBracket: BlockIndent
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: None
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
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
Loading