2019-06-17 18:27:55 +00:00
|
|
|
/* Trezor v2 boardloader linker script */
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
ENTRY(reset_handler)
|
|
|
|
|
|
|
|
MEMORY {
|
2017-10-11 19:15:22 +00:00
|
|
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 48K
|
2017-09-10 19:23:47 +00:00
|
|
|
CCMRAM (wal) : ORIGIN = 0x10000000, LENGTH = 64K
|
2017-10-11 21:36:07 +00:00
|
|
|
SRAM (wal) : ORIGIN = 0x20000000, LENGTH = 192K
|
2017-02-06 14:38:45 +00:00
|
|
|
}
|
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
main_stack_base = ORIGIN(CCMRAM) + LENGTH(CCMRAM); /* 8-byte aligned full descending stack */
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
/* used by the startup code to populate variables used by the C code */
|
|
|
|
data_lma = LOADADDR(.data);
|
|
|
|
data_vma = ADDR(.data);
|
|
|
|
data_size = SIZEOF(.data);
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
/* used by the startup code to wipe memory */
|
|
|
|
ccmram_start = ORIGIN(CCMRAM);
|
|
|
|
ccmram_end = ORIGIN(CCMRAM) + LENGTH(CCMRAM);
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
/* used by the startup code to wipe memory */
|
|
|
|
sram_start = ORIGIN(SRAM);
|
|
|
|
sram_end = ORIGIN(SRAM) + LENGTH(SRAM);
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
SECTIONS {
|
2017-10-09 15:43:38 +00:00
|
|
|
.vector_table : ALIGN(512) {
|
|
|
|
KEEP(*(.vector_table));
|
2017-09-10 19:23:47 +00:00
|
|
|
} >FLASH AT>FLASH
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-10-09 15:43:38 +00:00
|
|
|
.text : ALIGN(4) {
|
|
|
|
*(.text*);
|
|
|
|
. = ALIGN(4); /* make the section size a multiple of the word size */
|
2017-09-10 19:23:47 +00:00
|
|
|
} >FLASH AT>FLASH
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
.rodata : ALIGN(4) {
|
2017-10-09 15:43:38 +00:00
|
|
|
*(.rodata*);
|
|
|
|
. = ALIGN(4); /* make the section size a multiple of the word size */
|
2017-09-10 19:23:47 +00:00
|
|
|
} >FLASH AT>FLASH
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
.data : ALIGN(4) {
|
2017-10-09 15:43:38 +00:00
|
|
|
*(.data*);
|
|
|
|
. = ALIGN(4); /* make the section size a multiple of the word size */
|
2017-09-10 19:23:47 +00:00
|
|
|
} >CCMRAM AT>FLASH
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2017-09-10 19:23:47 +00:00
|
|
|
.bss : ALIGN(4) {
|
2017-10-09 15:43:38 +00:00
|
|
|
*(.bss*);
|
|
|
|
. = ALIGN(4); /* make the section size a multiple of the word size */
|
2017-09-10 19:23:47 +00:00
|
|
|
} >CCMRAM
|
2017-02-06 14:38:45 +00:00
|
|
|
|
2022-05-31 11:29:04 +00:00
|
|
|
/* Hard-coded address for capabilities structure */
|
|
|
|
.capabilities 0x0800BF00 : {KEEP(*(.capabilities_section))}
|
|
|
|
|
2017-10-09 15:43:38 +00:00
|
|
|
.stack : ALIGN(8) {
|
|
|
|
. = 4K; /* this acts as a build time assertion that at least this much memory is available for stack use */
|
2017-09-10 19:23:47 +00:00
|
|
|
} >CCMRAM
|
|
|
|
}
|