soc: arm: stm32: Updated SRAM Region Definitions
This updates the SRAM region definition for stm32 Signed-off-by: Habib Zaid <habibzaid@gmail.com>
This commit is contained in:
parent
2a798bb7a1
commit
32367c0dfc
2 changed files with 8 additions and 12 deletions
|
@ -38,25 +38,19 @@
|
|||
#define REGION_SRAM_1_START 0x4000
|
||||
#define REGION_SRAM_1_SIZE REGION_4K
|
||||
#elif CONFIG_SRAM_SIZE == 32
|
||||
#define REGION_SRAM_0_SIZE REGION_16K
|
||||
#define REGION_SRAM_1_START 0x4000
|
||||
#define REGION_SRAM_1_SIZE REGION_16K
|
||||
#define REGION_SRAM_0_SIZE REGION_32K
|
||||
#elif CONFIG_SRAM_SIZE == 40
|
||||
#define REGION_SRAM_0_SIZE REGION_32K
|
||||
#define REGION_SRAM_1_START 0x8000
|
||||
#define REGION_SRAM_1_SIZE REGION_8K
|
||||
#elif CONFIG_SRAM_SIZE == 64
|
||||
#define REGION_SRAM_0_SIZE REGION_32K
|
||||
#define REGION_SRAM_1_START 0x8000
|
||||
#define REGION_SRAM_1_SIZE REGION_32K
|
||||
#define REGION_SRAM_0_SIZE REGION_64K
|
||||
#elif CONFIG_SRAM_SIZE == 96
|
||||
#define REGION_SRAM_0_SIZE REGION_64K
|
||||
#define REGION_SRAM_1_START 0x10000
|
||||
#define REGION_SRAM_1_SIZE REGION_32K
|
||||
#elif CONFIG_SRAM_SIZE == 128
|
||||
#define REGION_SRAM_0_SIZE REGION_64K
|
||||
#define REGION_SRAM_1_START 0x10000
|
||||
#define REGION_SRAM_1_SIZE REGION_64K
|
||||
#define REGION_SRAM_0_SIZE REGION_128K
|
||||
#elif CONFIG_SRAM_SIZE == 160
|
||||
#define REGION_SRAM_0_SIZE REGION_128K
|
||||
#define REGION_SRAM_1_START 0x20000
|
||||
|
@ -66,9 +60,7 @@
|
|||
#define REGION_SRAM_1_START 0x20000
|
||||
#define REGION_SRAM_1_SIZE REGION_64K
|
||||
#elif CONFIG_SRAM_SIZE == 256
|
||||
#define REGION_SRAM_0_SIZE REGION_128K
|
||||
#define REGION_SRAM_1_START 0x20000
|
||||
#define REGION_SRAM_1_SIZE REGION_128K
|
||||
#define REGION_SRAM_0_SIZE REGION_256K
|
||||
#elif CONFIG_SRAM_SIZE == 320
|
||||
#define REGION_SRAM_0_SIZE REGION_256K
|
||||
#define REGION_SRAM_1_START 0x40000
|
||||
|
@ -77,6 +69,8 @@
|
|||
#define REGION_SRAM_0_SIZE REGION_256K
|
||||
#define REGION_SRAM_1_START 0x40000
|
||||
#define REGION_SRAM_1_SIZE REGION_128K
|
||||
#elif CONFIG_SRAM_SIZE == 512
|
||||
#define REGION_SRAM_0_SIZE REGION_512K
|
||||
#elif CONFIG_SRAM_SIZE == 640
|
||||
#define REGION_SRAM_0_SIZE REGION_512K
|
||||
#define REGION_SRAM_1_START 0x80000
|
||||
|
|
|
@ -22,9 +22,11 @@ static const struct arm_mpu_region mpu_regions[] = {
|
|||
CONFIG_SRAM_BASE_ADDRESS,
|
||||
REGION_RAM_ATTR(REGION_SRAM_0_SIZE)),
|
||||
/* Region 2 */
|
||||
#ifdef REGION_SRAM_1_SIZE
|
||||
MPU_REGION_ENTRY("RAM_1",
|
||||
(CONFIG_SRAM_BASE_ADDRESS + REGION_SRAM_1_START),
|
||||
REGION_RAM_ATTR(REGION_SRAM_1_SIZE)),
|
||||
#endif
|
||||
};
|
||||
|
||||
const struct arm_mpu_config mpu_config = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue