Skip to content

Commit a076f9a

Browse files
AlessandroAmeriac
authored andcommitted
K64F: Add call to uvisor_init() in the startup code
This is backwards-compatible with unsupported targets. If an application is compiled using the K64F target without uVisor (UVISOR_PRESENT not set or set to 0) then uvisor_init() will just be an empty function that immediately returns.
1 parent 6aeafab commit a076f9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hal/targets/cmsis/TARGET_Freescale/TARGET_K64F/TOOLCHAIN_GCC_ARM/startup_MK64F12.S

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,15 @@ Reset_Handler:
332332
ldr r0,=SystemInit
333333
blx r0
334334
#endif
335+
336+
/* The call to uvisor_init() happens independently of uVisor being enabled or
337+
* not, so it is conditionally compiled only based on FEATURE_UVISOR. */
338+
#ifdef FEATURE_UVISOR
339+
/* Call uvisor_init() */
340+
ldr r0, =uvisor_init
341+
blx r0
342+
#endif /* FEATURE_UVISOR */
343+
335344
/* Loop to copy data from read only memory to RAM. The ranges
336345
* of copy from/to are specified by following symbols evaluated in
337346
* linker script.

0 commit comments

Comments
 (0)