| 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 |
SDRAM (xrw) : ORIGIN = 0x60000000, LENGTH = 8M /* SDRAM */ |
| 16 |
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K /* Total available 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 |
FLASH_ROMFS (rx) : ORIGIN = 0x90B00000, LENGTH = 4096K /* romfs partition in QSPI flash */ |
| 22 |
} |
| 23 |
|
| 24 |
/* produce a link error if there is not this amount of RAM for these sections */ |
| 25 |
_minimum_stack_size = 2K; |
| 26 |
_minimum_heap_size = 16K; |
| 27 |
|
| 28 |
/* Define the stack. The stack is full descending so begins just above last byte |
| 29 |
of RAM. Note that EABI requires the stack to be 8-byte aligned for a call. */ |
| 30 |
_estack = ORIGIN(RAM) + LENGTH(RAM) - _estack_reserve; |
| 31 |
_sstack = _estack - 16K; /* tunable */ |
| 32 |
|
| 33 |
/* RAM extents for the garbage collector */ |
| 34 |
_ram_start = ORIGIN(RAM); |
| 35 |
_ram_end = ORIGIN(RAM) + LENGTH(RAM); |
| 36 |
_heap_start = _ebss; /* heap starts just after statically allocated memory */ |
| 37 |
_heap_end = _sstack; |
| 38 |
|
| 39 |
/* Note the following varilables are only used if the filesystem flash storage is enabled */ |
| 40 |
/* Location of filesystem RAM cache */ |
| 41 |
_micropy_hw_internal_flash_storage_ram_cache_start = ORIGIN(DTCM); |
| 42 |
_micropy_hw_internal_flash_storage_ram_cache_end = ORIGIN(DTCM) + LENGTH(DTCM); |
| 43 |
|
| 44 |
/* Location of filesystem flash storage */ |
| 45 |
_micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FS); |
| 46 |
_micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS); |
| 47 |
|
| 48 |
/* Location of romfs filesystem */ |
| 49 |
_micropy_hw_romfs_part0_start = ORIGIN(FLASH_ROMFS); |
| 50 |
_micropy_hw_romfs_part0_size = LENGTH(FLASH_ROMFS); |
| 51 |
|
| 52 |
/* OpenAMP shared memory region */ |
| 53 |
_openamp_shm_region_start = ORIGIN(SRAM4); |
| 54 |
_openamp_shm_region_end = ORIGIN(SRAM4) + LENGTH(SRAM4); |
| 55 |
|
| 56 |
INCLUDE common_blifs.ld |
| 57 |
|
| 58 |
SECTIONS |
| 59 |
{ |
| 60 |
/* GC blocks addresses and sizes */ |
| 61 |
.gc.blocks.table (READONLY) : { |
| 62 |
. = ALIGN(4); |
| 63 |
_gc_blocks_table_start = .; |
| 64 |
|
| 65 |
LONG (ORIGIN(SRAM1)); |
| 66 |
LONG (128K); |
| 67 |
|
| 68 |
LONG (ORIGIN(SDRAM) + 0M); |
| 69 |
LONG (2M); |
| 70 |
|
| 71 |
LONG (ORIGIN(SDRAM) + 2M); |
| 72 |
LONG (2M); |
| 73 |
|
| 74 |
LONG (ORIGIN(SDRAM) + 4M); |
| 75 |
LONG (4M); |
| 76 |
|
| 77 |
_gc_blocks_table_end = .; |
| 78 |
. = ALIGN(4); |
| 79 |
} > FLASH_TEXT |
| 80 |
} |