diff options
author | Michel Jaouen <michel.jaouen@st.com> | 2021-09-17 15:36:19 +0200 |
---|---|---|
committer | Anton Komlev <Anton.Komlev@arm.com> | 2021-09-22 01:29:18 +0200 |
commit | f373efb57efcf2c60e9e313e5ff5d1c2276fce2b (patch) | |
tree | 8bcae41eab00282fd585c74c23028d453f68f7f4 | |
parent | 71d361c585f6c25ccab6892009ff84ae1e3b3844 (diff) | |
download | trusted-firmware-m-f373efb57efcf2c60e9e313e5ff5d1c2276fce2b.tar.gz |
Build: Fix for small profile support with IARARM.
Compilation with IARARM is failing without this fix.
Change-Id: Icc1ad2a5c48524a4f402d8ceaf137ce2427d6501
Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
-rw-r--r-- | secure_fw/spm/cmsis_func/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/secure_fw/spm/cmsis_func/main.c b/secure_fw/spm/cmsis_func/main.c index 4cbecd85e6..c889748865 100644 --- a/secure_fw/spm/cmsis_func/main.c +++ b/secure_fw/spm/cmsis_func/main.c @@ -34,6 +34,8 @@ __asm(" .global __ARM_use_no_argv\n"); #endif REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Base); +REGION_DECLARE(Image$$, ARM_LIB_STACK, $$ZI$$Limit)[]; +REGION_DECLARE(Image$$, ER_INITIAL_PSP, $$ZI$$Limit)[]; static fih_int tfm_core_init(void) { @@ -141,15 +143,17 @@ int main(void) #if !defined(__ICCARM__) ".syntax unified \n" #endif - "ldr r0, =Image$$ARM_LIB_STACK$$ZI$$Limit \n" - "msr msp, r0 \n" - "ldr r0, =Image$$ER_INITIAL_PSP$$ZI$$Limit \n" - "msr psp, r0 \n" + "msr msp, %0 \n" + "msr psp, %1 \n" "mrs r0, control \n" "movs r1, #2 \n" "orrs r0, r0, r1 \n" /* Switch to PSP */ "msr control, r0 \n" "bl c_main \n" + : + : "r" (REGION_NAME(Image$$, ARM_LIB_STACK, $$ZI$$Limit)), + "r" (REGION_NAME(Image$$, ER_INITIAL_PSP, $$ZI$$Limit)) + : "r0", "memory" ); } |