File tree Expand file tree Collapse file tree
test-app/emu-test-apps/stm32l552 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CC =arm-none-eabi-gcc
22OBJCOPY ?= arm-none-eabi-objcopy
33
4- CFLAGS := -mcpu=cortex-m33 -mthumb -mcmse - Os -ffreestanding -fdata-sections -ffunction-sections -g -ggdb
4+ CFLAGS := -mcpu=cortex-m33 -mthumb -Os -ffreestanding -fdata-sections -ffunction-sections -g -ggdb
55CFLAGS += -I. -I../common -I../../../include -DEMU_STM32
66CFLAGS += -DIMAGE_HEADER_SIZE=$(IMAGE_HEADER_SIZE )
77LDFLAGS := -nostdlib -T target.ld -Wl,-gc-sections
88LDLIBS := -Wl,--start-group -lc -lm -lgcc -lnosys -Wl,--end-group
99NSC_OBJ :=
1010ifeq ($(TZEN ) ,1)
11+ CFLAGS += -DNONSECURE_APP
1112 CFLAGS += -DWOLFCRYPT_SECURE_MODE
1213 NSC_OBJ := ../../../src/wc_secure_calls.o
1314endif
Original file line number Diff line number Diff line change 1- /* Minimal linker script for STM32L552 memory map */
21MEMORY
32{
4- FLASH (rx) : ORIGIN = 0x08000100 , LENGTH = 0x0007FF00
5- RAM (rwx) : ORIGIN = 0x20000000 , LENGTH = 0x00040000
3+ FLASH (rx) : ORIGIN = 0x8040400 , LENGTH = 0x1f400
4+ RAM (rwx) : ORIGIN = 0x20020000 , LENGTH = 0x20000
65}
76
8- _estack = ORIGIN (RAM) + LENGTH (RAM);
9- _sidata = LOADADDR (.data);
10-
117SECTIONS
128{
13- .isr_vector :
14- {
15- KEEP (*(.isr_vector ))
16- } > FLASH
17-
189 .text :
1910 {
11+ _start_text = .;
12+ . = ALIGN (8 );
13+ KEEP (*(.isr_vector ))
14+ . = ALIGN (8 );
15+ *(.init )
16+ *(.fini )
2017 *(.text *)
2118 *(.rodata *)
22- *(.ARM .extab * .gnu .linkonce .armextab .*)
23- *(.ARM .exidx * .gnu .linkonce .armexidx .*)
24- *(.glue_7 )
25- *(.glue_7t )
26- *(.eh_frame )
27- } > FLASH
28-
29- .preinit_array :
30- {
31- __preinit_array_start = .;
32- KEEP (*(.preinit_array *))
33- __preinit_array_end = .;
19+ . = ALIGN (8 );
20+ _end_text = .;
3421 } > FLASH
3522
36- .init_array :
23+ .edidx :
3724 {
38- __init_array_start = .;
39- KEEP (*(.init_array *))
40- __init_array_end = .;
25+ . = ALIGN (4 );
26+ *(.ARM .exidx *)
4127 } > FLASH
4228
43- .fini_array :
44- {
45- __fini_array_start = .;
46- KEEP (*(.fini_array *))
47- __fini_array_end = .;
48- } > FLASH
29+ _stored_data = .;
4930
50- .data :
31+ .data : AT (_stored_data)
5132 {
52- _sdata = .;
53- *(.data *)
54- _edata = .;
55- } > RAM AT > FLASH
33+ _start_data = .;
34+ KEEP (*(.data *))
35+ . = ALIGN (8 );
36+ KEEP (*(.ramcode ))
37+ . = ALIGN (8 );
38+ _end_data = .;
39+ } > RAM
5640
57- .bss (NOLOAD) :
41+ .bss :
5842 {
59- _sbss = .;
43+ _start_bss = .;
6044 *(.bss *)
6145 *(COMMON)
62- _ebss = .;
46+ . = ALIGN (8 );
47+ _end_bss = .;
48+ _end = .;
6349 } > RAM
6450}
51+
52+ PROVIDE (_start_heap = _end);
53+ PROVIDE (_end_stack = ORIGIN (RAM) + LENGTH(RAM));
54+
55+ /* Emu app startup expects these symbols. */
56+ _estack = _end_stack;
57+ _sidata = _stored_data;
58+ _sdata = _start_data;
59+ _edata = _end_data;
60+ _sbss = _start_bss;
61+ _ebss = _end_bss;
You can’t perform that action at this time.
0 commit comments