Skip to content

Commit 28fdc8f

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 0775393 commit 28fdc8f

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
@@ -27,6 +27,12 @@ MAIN_ACL(g_main_acl);
2727
UVISOR_SET_MODE_ACL(UVISOR_ENABLED, g_main_acl);
2828
UVISOR_SET_PAGE_HEAP(2 * 1024, 8);
2929

30+
/* Targets with an ARMv7-M MPU needs this space adjustment to prevent a runtime
31+
* memory overflow error. The code below has been output directly by uVisor. */
32+
#if defined(TARGET_EFM32GG_STK3700) || defined(TARGET_DISCO_F429ZI)
33+
uint8_t __attribute__((section(".keep.uvisor.bss.boxes"), aligned(32))) __boxes_overhead[32640];
34+
#endif
35+
3036
static void main_alloc(void)
3137
{
3238
const uint32_t kB = 1024;

0 commit comments

Comments
 (0)