Skip to content

Commit 5eed503

Browse files
ioannisgnashif
authored andcommitted
arch: arc: add missing macro helper definition
Helper macro, MPU_ALIGN() is used by script gen_app_partitions.py, so the macro needs to be available, if the APP Shared memory feature is to be used. This commit defines MPU_ALIGN() in the ARC linker.ld script. Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent 6e29416 commit 5eed503

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/arch/arc/v2/linker.ld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242
#define MPU_MIN_SIZE 32
4343
#endif
4444
#define MPU_MIN_SIZE_ALIGN . = ALIGN(MPU_MIN_SIZE );
45+
#if defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
46+
#define MPU_ALIGN(region_size) \
47+
. = ALIGN(MPU_MIN_SIZE); \
48+
. = ALIGN( 1 << LOG2CEIL(region_size))
49+
#else
50+
#define MPU_ALIGN(region_size) \
51+
. = ALIGN(MPU_MIN_SIZE)
52+
#endif
4553
#else
4654
#define MPU_MIN_SIZE_ALIGN
4755
#endif

0 commit comments

Comments
 (0)