2019-03-04 06:32:44 -05:00
|
|
|
/*
|
|
|
|
Custom linker script for STM32F769DISC board with external memory-mapped QSPI flash
|
|
|
|
|
|
|
|
Memory layout:
|
|
|
|
|
|
|
|
FLASH_QSPI .text_qspi
|
|
|
|
|
|
|
|
FLASH_APP .isr_vector
|
|
|
|
FLASH_APP .text
|
|
|
|
FLASH_APP .data
|
|
|
|
|
|
|
|
RAM .data
|
|
|
|
RAM .bss
|
|
|
|
RAM .heap
|
|
|
|
RAM .stack
|
|
|
|
*/
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2019-07-17 02:19:06 -04:00
|
|
|
FLASH_APP (rx) : ORIGIN = 0x08020000, LENGTH = 1920K /* sectors 4-11 1*128K 7*256K */
|
2019-03-04 06:32:44 -05:00
|
|
|
FLASH_QSPI (rx) : ORIGIN = 0x90000000, LENGTH = 64M /* external QSPI flash in XIP mode */
|
|
|
|
DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K /* Used for storage cache */
|
|
|
|
RAM (xrw) : ORIGIN = 0x20020000, LENGTH = 384K /* SRAM1 = 368K, SRAM2 = 16K */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Produce a link error if there is not this amount of RAM for these sections */
|
|
|
|
_minimum_stack_size = 2K;
|
|
|
|
_minimum_heap_size = 16K;
|
|
|
|
|
2019-05-14 10:43:38 -04:00
|
|
|
/* Define the stack. The stack is full descending so begins just above last byte
|
|
|
|
of RAM. Note that EABI requires the stack to be 8-byte aligned for a call. */
|
2019-06-22 07:26:03 -04:00
|
|
|
_estack = ORIGIN(RAM) + LENGTH(RAM) - _estack_reserve;
|
2019-05-14 10:43:38 -04:00
|
|
|
_sstack = _estack - 32K; /* tunable */
|
2019-03-04 06:32:44 -05:00
|
|
|
|
|
|
|
/* RAM extents for the garbage collector */
|
|
|
|
_ram_start = ORIGIN(RAM);
|
|
|
|
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
|
|
|
|
_heap_start = _ebss; /* heap starts just after statically allocated memory */
|
2019-05-14 10:43:38 -04:00
|
|
|
_heap_end = _sstack;
|
2019-03-04 06:32:44 -05:00
|
|
|
|
|
|
|
ENTRY(Reset_Handler)
|
|
|
|
|
2022-08-14 18:35:23 -04:00
|
|
|
REGION_ALIAS("FLASH_COMMON", FLASH_APP);
|
|
|
|
|
2019-03-04 06:32:44 -05:00
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/* Define the code that goes in QSPI flash */
|
|
|
|
.text_qspi :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
*extmod/*(.text* .rodata*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
} >FLASH_QSPI
|
|
|
|
|
2022-08-14 18:35:23 -04:00
|
|
|
INCLUDE common_isr.ld
|
|
|
|
INCLUDE common_text.ld
|
|
|
|
INCLUDE common_extratext_data_in_flash.ld
|
2020-10-29 08:07:51 -04:00
|
|
|
INCLUDE common_bss_heap_stack.ld
|
2019-03-04 06:32:44 -05:00
|
|
|
}
|