mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 18:18:32 -04:00
MPU assert for ARM_CM3_MPU (#952)
* Add runtime check to see if the target even has a MPU * Add missing extern symbols for __ARMCC_VERSION support * Add default for configTOTAL_MPU_REGIONS and change a runtime assert to compile time error * Simplify check and link to reference documentation Co-authored-by: Soren Ptak <ptaksoren@gmail.com> --------- Co-authored-by: Soren Ptak <ptaksoren@gmail.com> Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
This commit is contained in:
parent
aa07289c24
commit
52ab3d0f22
2 changed files with 47 additions and 10 deletions
|
@ -86,6 +86,15 @@ typedef unsigned long UBaseType_t;
|
|||
#define portMPU_REGION_CACHEABLE_BUFFERABLE ( 0x07UL << 16UL )
|
||||
#define portMPU_REGION_EXECUTE_NEVER ( 0x01UL << 28UL )
|
||||
|
||||
/* MPU settings that can be overriden in FreeRTOSConfig.h. */
|
||||
#ifndef configTOTAL_MPU_REGIONS
|
||||
/* Define to 8 for backward compatibility. */
|
||||
#define configTOTAL_MPU_REGIONS ( 8UL )
|
||||
#elif( configTOTAL_MPU_REGIONS != 8UL )
|
||||
/* The Cortex M3 only supports 8 MPU regions. For more information refer to:
|
||||
* https://developer.arm.com/documentation/dui0552/a/cortex-m3-peripherals/optional-memory-protection-unit */
|
||||
#error configTOTAL_MPU_REGIONS must be 8 for this port.
|
||||
#endif /* configTOTAL_MPU_REGIONS Check */
|
||||
#define portSTACK_REGION ( 3UL )
|
||||
#define portGENERAL_PERIPHERALS_REGION ( 4UL )
|
||||
#define portUNPRIVILEGED_FLASH_REGION ( 5UL )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue