|
5 | 5 | /* Specify the memory areas */
|
6 | 6 | MEMORY
|
7 | 7 | {
|
8 |
| - FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K |
9 |
| - FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sectors 0-7 */ |
10 |
| - FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 596K /* sectors 8-305 */ |
11 |
| - FLASH_FS (r) : ORIGIN = 0x08099000, LENGTH = 412K /* sectors 306-511 412 KiB */ |
12 |
| - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K |
13 |
| - SRAM2 (xrw) : ORIGIN = 0x20040000, LENGTH = 62K /* leave 2K for flash fs cache */ |
14 |
| - FS_CACHE(xrw) : ORIGIN = 0x2004f800, LENGTH = 2K |
| 8 | + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 612K /* sectors 0-305 */ |
| 9 | + FLASH_FS (r) : ORIGIN = 0x08099000, LENGTH = 412K /* sectors 306-511 412 KiB */ |
| 10 | + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K /* SRAM1, 256K + SRAM2, 64K */ |
15 | 11 | }
|
16 | 12 |
|
17 | 13 | /* produce a link error if there is not this amount of RAM for these sections */
|
18 | 14 | _minimum_stack_size = 2K;
|
19 | 15 | _minimum_heap_size = 16K;
|
20 | 16 |
|
21 |
| -/* Define the stack. The stack is full descending so begins just above last byte |
22 |
| - of RAM. Note that EABI requires the stack to be 8-byte aligned for a call. */ |
23 |
| -_estack = ORIGIN(RAM) + LENGTH(RAM) + LENGTH(SRAM2) - _estack_reserve; |
24 |
| -_sstack = _estack - 206K; /* tunable */ |
| 17 | +/* Define the stack. The stack is full descending so begins just above last byte of RAM, |
| 18 | + or bottom of FS cache.. Note that EABI requires the stack to be 8-byte aligned for a call. */ |
25 | 19 |
|
26 | 20 | /* RAM extents for the garbage collector */
|
27 |
| -_ram_fs_cache_start = ORIGIN(FS_CACHE); |
28 |
| -_ram_fs_cache_end = ORIGIN(FS_CACHE) + LENGTH(FS_CACHE); |
29 | 21 | _ram_start = ORIGIN(RAM);
|
30 |
| -_ram_end = ORIGIN(RAM) + LENGTH(RAM) + LENGTH(SRAM2); |
| 22 | +_ram_end = ORIGIN(RAM) + LENGTH(RAM); |
| 23 | + |
| 24 | +_ram_fs_cache_end = _ram_end; |
| 25 | +_ram_fs_cache_start = _ram_fs_cache_end - 2K; /* fs cache = 2K */ |
| 26 | + |
| 27 | +_estack = _ram_fs_cache_start - _estack_reserve; |
| 28 | +_sstack = _estack - 16K; /* stack = 16K */ |
| 29 | + |
31 | 30 | _heap_start = _ebss; /* heap starts just after statically allocated memory */
|
32 |
| -_heap_end = _sstack; |
| 31 | +_heap_end = _sstack; /* bss + heap = 302K, tunable by adjusting stack size */ |
33 | 32 |
|
34 | 33 | _flash_fs_start = ORIGIN(FLASH_FS);
|
35 | 34 | _flash_fs_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS);
|
0 commit comments