FreeRTOS: add ARMv8-M (Cortex-M33) NTZ thread context support#1957
Open
LukasLendvorsky wants to merge 1 commit intopyocd:mainfrom
Open
FreeRTOS: add ARMv8-M (Cortex-M33) NTZ thread context support#1957LukasLendvorsky wants to merge 1 commit intopyocd:mainfrom
LukasLendvorsky wants to merge 1 commit intopyocd:mainfrom
Conversation
The Cortex-M33 NTZ FreeRTOS port (portable/GCC/ARM_CM33_NTZ) uses a different PendSV stacking order than the Cortex-M4 port: M4: [r4-r11, <exc_return>, <s16-s31>] [HW frame] M33: [psplim, exc_return, r4-r11, <s16-s31>] [HW frame] This caused incorrect stack unwinding for non-current FreeRTOS threads when debugging Cortex-M33 targets, as the register offset tables assumed M4 stacking. Add M33-specific register offset tables that account for the extra psplim and exc_return words at the start of the software-saved frame, and select them based on the core's architecture at runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Freertos stack decode doesn't work for The Cortex-M33, because its FreeRTOS port (portable/GCC/ARM_CM33_NTZ) uses a different PendSV stacking order than the Cortex-M4 port.
This adds support specifically for M33 without trust zone. Its written by Claude and I tested that it works well with my MCU. It will still break with trust zone and possibly with other freertos versions/configurations, but this is surely better than without any specific M33 support.