| 1 |
/* |
| 2 |
GNU linker script for STM32H747 |
| 3 |
*/ |
| 4 |
|
| 5 |
/* Specify the memory areas */ |
| 6 |
MEMORY |
| 7 |
{ |
| 8 |
ITCM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K |
| 9 |
DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K |
| 10 |
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K /* AXI SRAM D1 */ |
| 11 |
SRAM1 (xrw) : ORIGIN = 0x30000000, LENGTH = 128K /* SRAM1 D2 */ |
| 12 |
SRAM2 (xrw) : ORIGIN = 0x30020000, LENGTH = 128K /* SRAM2 D2 */ |
| 13 |
SRAM3 (xrw) : ORIGIN = 0x30040000, LENGTH = 32K /* SRAM3 D2 */ |
| 14 |
SRAM4 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K /* SRAM4 D3 */ |
| 15 |
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* Total available flash */ |
| 16 |
FLASH_EXT (rx) : ORIGIN = 0x90000000, LENGTH = 16384K /* 16MBs external QSPI flash */ |
| 17 |
FLASH_BL (rx) : ORIGIN = 0x08000000, LENGTH = 128K /* Arduino bootloader */ |
| 18 |
FLASH_FS (r) : ORIGIN = 0x08020000, LENGTH = 128K /* filesystem */ |
| 19 |
FLASH_TEXT (rx) : ORIGIN = 0x08040000, LENGTH = 1280K /* CM7 firmware */ |
| 20 |
FLASH_CM4 (rx) : ORIGIN = 0x08180000, LENGTH = 512K /* CM4 firmware */ |
| 21 |
} |
| 22 |
|
| 23 |
/* produce a link error if there is not this amount of RAM for these sections */ |
| 24 |
_minimum_stack_size = 2K; |
| 25 |
_minimum_heap_size = 16K; |
| 26 |
|
| 27 |
/* Define the stack. The stack is full descending so begins just above last byte |
| 28 |
of RAM. Note that EABI requires the stack to be 8-byte aligned for a call. */ |
| 29 |
_estack = ORIGIN(RAM) + LENGTH(RAM) - _estack_reserve; |
| 30 |
_sstack = _estack - 16K; /* tunable */ |
| 31 |
|
| 32 |
/* RAM extents for the garbage collector */ |
| 33 |
_ram_start = ORIGIN(RAM); |
| 34 |
_ram_end = ORIGIN(RAM) + LENGTH(RAM); |
| 35 |
_heap_start = _ebss; /* heap starts just after statically allocated memory */ |
| 36 |
_heap_end = _sstack; |
| 37 |
|
| 38 |
/* Note the following varilables are only used if the filesystem flash storage is enabled */ |
| 39 |
/* Location of filesystem RAM cache */ |
| 40 |
_micropy_hw_internal_flash_storage_ram_cache_start = ORIGIN(DTCM); |
| 41 |
_micropy_hw_internal_flash_storage_ram_cache_end = ORIGIN(DTCM) + LENGTH(DTCM); |
| 42 |
|
| 43 |
/* Location of filesystem flash storage */ |
| 44 |
_micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FS); |
| 45 |
_micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS); |
| 46 |
|
| 47 |
/* OpenAMP shared memory region */ |
| 48 |
_openamp_shm_region_start = ORIGIN(SRAM4); |
| 49 |
_openamp_shm_region_end = ORIGIN(SRAM4) + LENGTH(SRAM4); |
| 50 |
|
| 51 |
INCLUDE common_blifs.ld |