|
1 | 1 | // 2MB FLASH (0x200000)
|
2 | 2 | if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x08000000; }
|
3 | 3 | if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x200000; }
|
| 4 | + |
4 | 5 | define symbol __intvec_start__ = MBED_APP_START;
|
5 | 6 | define symbol __region_ROM_start__ = MBED_APP_START;
|
6 | 7 | define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
|
7 | 8 |
|
8 | 9 | // 128KB DTCM RAM (0x20000)
|
9 |
| -// Vector table dynamic copy: 166 vectors = 664 bytes (0x298) to be reserved in RAM |
10 |
| -define symbol __region_RAM_start__ = 0x20000000 + 0x298; // Aligned on 8 bytes |
11 |
| -define symbol __region_RAM_end__ = 0x20000000 + 0x20000 - 1; |
| 10 | +// Vector table dynamic copy: 166 vectors = 664 bytes (0x298) reserved |
| 11 | +// Crash data area: 256 bytes (0x100) reserved |
| 12 | +define symbol __NVIC_start__ = 0x20000000; |
| 13 | +define symbol __NVIC_end__ = 0x20000297; |
| 14 | +define symbol __region_CRASH_DATA_RAM_start__ = 0x20000298; // Aligned on 8 bytes |
| 15 | +define symbol __region_CRASH_DATA_RAM_end__ = 0x20000397; |
| 16 | +define symbol __region_RAM_start__ = 0x20000398; // Aligned on 8 bytes |
| 17 | +define symbol __region_RAM_end__ = 0x20000000 + 0x20000 - 1; |
12 | 18 |
|
13 | 19 | // Memory regions
|
14 | 20 | define memory mem with size = 4G;
|
15 | 21 | define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__];
|
16 | 22 | define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
| 23 | +define region CRASH_DATA_RAM_region = mem:[from __region_CRASH_DATA_RAM_start__ to __region_CRASH_DATA_RAM_end__]; |
| 24 | + |
| 25 | +// Crash data symbols |
| 26 | +define exported symbol __CRASH_DATA_RAM_START__ = __region_CRASH_DATA_RAM_start__; |
| 27 | +define exported symbol __CRASH_DATA_RAM_END__ = __region_CRASH_DATA_RAM_end__; |
17 | 28 |
|
18 | 29 | // Stack and Heap
|
19 | 30 | define symbol __size_cstack__ = 0x400; // 1KB
|
|
0 commit comments