Fix SPM HAL test

When accessing non-secure ram and flash r1 was actually used by the calling function.
Change to a callee saved register.
pull/9128/head
Oren Cohen 2018-12-17 16:38:13 +02:00
parent 463a4536e2
commit 6a9de3178e
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ __attribute__((naked)) void call_mem(uint32_t addr)
// since exception will be generated for invalid memory access. // since exception will be generated for invalid memory access.
// Other instructions are for calling do_nothing function according to AAPCS. // Other instructions are for calling do_nothing function according to AAPCS.
__ASM( __ASM(
"LDR r1, [r0]\n" "LDR r4, [r0]\n"
"BX lr\n" "BX lr\n"
); );
} }