| 1 |
/* |
| 2 |
Linker script for OPENMV_N6. |
| 3 |
|
| 4 |
Note: upper 512k of SRAM2 is copied from external flash upon reset. |
| 5 |
*/ |
| 6 |
|
| 7 |
/* Specify the memory areas */ |
| 8 |
MEMORY |
| 9 |
{ |
| 10 |
FLEXRAM_S (xrw) : ORIGIN = 0x34000000, LENGTH = 80K |
| 11 |
SRAM2_S_RAM (xrw) : ORIGIN = 0x34100000, LENGTH = 1024K |
| 12 |
SRAM2_S_FSBL (xrw) : ORIGIN = 0x34180400, LENGTH = 511K /* mboot firmware, not needed after mboot exits */ |
| 13 |
EXT_FLASH (rx) : ORIGIN = 0x70080000, LENGTH = 3584K |
| 14 |
EXT_FLASH_FS (rx) : ORIGIN = 0x70400000, LENGTH = 4M |
| 15 |
EXT_FLASH_ROMFS (rx) : ORIGIN = 0x70800000, LENGTH = 24M |
| 16 |
} |
| 17 |
|
| 18 |
REGION_ALIAS("IRAM", FLEXRAM_S); |
| 19 |
REGION_ALIAS("RAM", SRAM2_S_RAM); |
| 20 |
REGION_ALIAS("FLASH_APP", EXT_FLASH); |
| 21 |
|
| 22 |
/* produce a link error if there is not this amount of RAM for these sections */ |
| 23 |
_minimum_stack_size = 2K; |
| 24 |
_minimum_heap_size = 16K; |
| 25 |
|
| 26 |
/* Define the stack. The stack is full descending so begins just above last byte |
| 27 |
of RAM. Note that EABI requires the stack to be 8-byte aligned for a call. */ |
| 28 |
_estack = ORIGIN(RAM) + LENGTH(RAM) - _estack_reserve; |
| 29 |
_sstack = _estack - 16K; /* tunable */ |
| 30 |
|
| 31 |
/* RAM extents for the garbage collector */ |
| 32 |
_ram_start = ORIGIN(RAM); |
| 33 |
_ram_end = ORIGIN(RAM) + LENGTH(RAM); |
| 34 |
_heap_start = _ebss; /* heap starts just after statically allocated memory */ |
| 35 |
_heap_end = _sstack; |
| 36 |
|
| 37 |
/* ROMFS location */ |
| 38 |
_micropy_hw_romfs_part0_start = ORIGIN(EXT_FLASH_ROMFS); |
| 39 |
_micropy_hw_romfs_part0_size = LENGTH(EXT_FLASH_ROMFS); |