mirror of https://github.com/wolfSSL/wolfBoot.git
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m33 -xc
|
|
; wolfBoot stm32u5 (TZEN=1) scatter file for armlink, equivalent to
|
|
; hal/stm32u5.ld. The @VAR@ placeholders are substituted by the Makefile
|
|
; (same rule as the GNU linker scripts), then armlink runs the armclang
|
|
; preprocessor on the result (#! line above).
|
|
;
|
|
; Region symbols consumed by the code (mapped from the GNU-ld symbol names
|
|
; via -D in arch.mk / Makefile):
|
|
; ER_VECTORS -> _start_text
|
|
; RW_RAM -> _stored_data (load), _start_data/_end_data,
|
|
; _start_bss/_end_bss
|
|
; ARM_LIB_STACK -> END_STACK (stack top, grows down from end of RAM)
|
|
; RAM_HEAP -> _start_heap/_heap_size (WOLFCRYPT_TZ PKCS11 heap)
|
|
; KEYVAULT -> _flash_keyvault/_flash_keyvault_size
|
|
|
|
#define WOLFBOOT_STACK_RESERVE 0x1000
|
|
|
|
LR_FLASH @WOLFBOOT_ORIGIN@ (@WOLFBOOT_KEYVAULT_ADDRESS@ - @WOLFBOOT_ORIGIN@)
|
|
{
|
|
ER_VECTORS @WOLFBOOT_ORIGIN@
|
|
{
|
|
*(.isr_vector, +FIRST)
|
|
}
|
|
|
|
ER_TEXT +0 ALIGN 8
|
|
{
|
|
.ANY(+RO)
|
|
}
|
|
|
|
RW_RAM 0x30000000 ALIGN 8 (0x00012000 - WOLFBOOT_STACK_RESERVE)
|
|
{
|
|
*(.ramcode)
|
|
.ANY(+RW)
|
|
.ANY(+ZI)
|
|
}
|
|
|
|
; Empty region only used to define the initial stack pointer; also lets
|
|
; armlink error out if RW_RAM grows into the stack reserve
|
|
ARM_LIB_STACK 0x30012000 EMPTY -WOLFBOOT_STACK_RESERVE
|
|
{
|
|
}
|
|
|
|
#if @WOLFBOOT_KEYVAULT_SIZE@ + 0
|
|
; 56KB heap for wolfcrypt/PKCS11
|
|
RAM_HEAP 0x30012000 EMPTY 0xe000
|
|
{
|
|
}
|
|
|
|
KEYVAULT @WOLFBOOT_KEYVAULT_ADDRESS@ EMPTY @WOLFBOOT_KEYVAULT_SIZE@
|
|
{
|
|
}
|
|
#endif
|
|
}
|
|
|
|
; CMSE secure gateway veneers, generated by armlink. Placed at NSC + 0x400
|
|
; like the GNU script (hal/stm32u5.ld reserves the first 0x400 bytes of the
|
|
; NSC region).
|
|
LR_NSC (@WOLFBOOT_NSC_ADDRESS@ + 0x400) (@WOLFBOOT_NSC_SIZE@ - 0x400)
|
|
{
|
|
ER_NSC (@WOLFBOOT_NSC_ADDRESS@ + 0x400)
|
|
{
|
|
*(Veneer$$CMSE)
|
|
}
|
|
}
|