Skip to content

Commit

Permalink
Remove configTOTAL_MPU_REGIONS from M3 MPU port
Browse files Browse the repository at this point in the history
The number of MPU regions is not configurable for Cortex-M3 port and
therefore, it is misleading to have configTOTAL_MPU_REGIONS in
portmacro.h.

It was added in PR FreeRTOS#952.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
  • Loading branch information
aggarg committed Jan 27, 2024
1 parent 14dd5b5 commit 3869560
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions portable/GCC/ARM_CM3_MPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@ 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 )
Expand Down

0 comments on commit 3869560

Please sign in to comment.