Skip to content

Commit 5083a26

Browse files
committed
Add linker script memory filler for ARMv7-M MPU
The code snippet added here has been auto-generated by uVisor when running the app in debug mode. The additional reserved space is needed as a result of an ARMv7-M MPU limitation.
1 parent de4b24e commit 5083a26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ MAIN_ACL(g_main_acl);
2828
UVISOR_SET_MODE_ACL(UVISOR_ENABLED, g_main_acl);
2929
UVISOR_SET_PAGE_HEAP(1 * 1024, 1);
3030

31+
/* Targets with an ARMv7-M MPU needs this space adjustment to prevent a runtime
32+
* memory overflow error. The code below has been output directly by uVisor. */
33+
#if defined(TARGET_EFM32GG_STK3700) || defined(TARGET_DISCO_F429ZI)
34+
uint8_t __attribute__((section(".keep.uvisor.bss.boxes"), aligned(32))) __boxes_overhead[8064];
35+
#endif
36+
3137
DigitalOut led_red(LED1);
3238
DigitalOut led_green(LED2);
3339
DigitalOut led_blue(LED3);

0 commit comments

Comments
 (0)