|
7 | 7 | * Make sure the bootloader can load into main memory without overwriting itself. |
8 | 8 | * |
9 | 9 | * ESP32-C5 ROM static data usage is as follows: |
10 | | - * - 0x4084e9a0 - 0x4085c9a0: Shared buffers, used in UART/USB/SPI download mode only |
11 | | - * - 0x4085c9a0 - 0x4085e9a0: PRO CPU stack, can be reclaimed as heap after RTOS startup |
12 | | - * - 0x4085e9a0 - 0x40860000: ROM .bss and .data (not easily reclaimable) |
| 10 | + * - 0x4084e5a0 - 0x4085c5a0: Shared buffers, used in UART/USB/SPI download mode only |
| 11 | + * - 0x4085c5a0 - 0x4085e5a0: PRO CPU stack, can be reclaimed as heap after RTOS startup |
| 12 | + * - 0x4085e5a0 - 0x40860000: ROM .bss and .data (not easily reclaimable) |
13 | 13 | * |
14 | 14 | * The 2nd stage bootloader can take space up to the end of ROM shared |
15 | | - * buffers area (0x4085c9a0). |
| 15 | + * buffers area (0x4085c5a0). |
16 | 16 | */ |
17 | 17 |
|
18 | | -/* We consider 0x4085c9a0 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg, |
| 18 | +/* We consider 0x4085c5a0 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg, |
19 | 19 | * and work out iram_seg and iram_loader_seg addresses from there, backwards. |
20 | 20 | */ |
21 | 21 |
|
22 | 22 | /* These lengths can be adjusted, if necessary: */ |
23 | | -bootloader_usable_dram_end = 0x4085c9a0; |
| 23 | +bootloader_usable_dram_end = 0x4085c5a0; |
24 | 24 | bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */ |
25 | 25 | bootloader_dram_seg_len = 0x5000; |
26 | 26 | bootloader_iram_loader_seg_len = 0x7000; |
|
45 | 45 | * 2. Update the value in this assert. |
46 | 46 | * 3. Update SRAM_DRAM_END in components/esp_system/ld/esp32c5/memory.ld.in to the same value. |
47 | 47 | */ |
48 | | -ASSERT(bootloader_iram_loader_seg_start == 0x4084E9A0, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END"); |
| 48 | +ASSERT(bootloader_iram_loader_seg_start == 0x4084e5a0, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END"); |
49 | 49 |
|
50 | 50 | /* Default entry point: */ |
51 | 51 | ENTRY(call_start_cpu0); |
@@ -277,32 +277,32 @@ SECTIONS |
277 | 277 | /** |
278 | 278 | * Appendix: Memory Usage of ROM bootloader |
279 | 279 | * |
280 | | - * 0x4084e9a0 ------------------> _dram0_0_start |
| 280 | + * 0x4084e5a0 ------------------> _dram0_0_start |
281 | 281 | * | | |
282 | 282 | * | | |
283 | 283 | * | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h |
284 | 284 | * | | |
285 | 285 | * | | |
286 | | - * 0x4085c9a0 ------------------> __stack_sentry |
| 286 | + * 0x4085c5a0 ------------------> __stack_sentry |
287 | 287 | * | | |
288 | 288 | * | | 2. Startup pro cpu stack (freed when IDF app is running) |
289 | 289 | * | | |
290 | | - * 0x4085e9a0 ------------------> __stack (pro cpu) |
| 290 | + * 0x4085e5a0 ------------------> __stack (pro cpu) |
291 | 291 | * | | |
292 | 292 | * | | |
293 | 293 | * | | 3. Shared memory only used in startup code or nonos/early boot* |
294 | 294 | * | | (can be freed when IDF runs) |
295 | 295 | * | | |
296 | 296 | * | | |
297 | | - * 0x4085f500 ------------------> _dram0_rtos_reserved_start |
| 297 | + * 0x4085f4f8 ------------------> _dram0_rtos_reserved_start |
298 | 298 | * | | |
299 | 299 | * | | |
300 | 300 | * | | 4. Shared memory used in startup code and when IDF runs |
301 | 301 | * | | |
302 | 302 | * | | |
303 | | - * 0x4085fc5c ------------------> _dram0_rtos_reserved_end |
| 303 | + * 0x4085fbb4 ------------------> _dram0_rtos_reserved_end |
304 | 304 | * | | |
305 | | - * 0x4085fc70 ------------------> _data_start_interface |
| 305 | + * 0x4085fc60 ------------------> _data_start_interface |
306 | 306 | * | | |
307 | 307 | * | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible) |
308 | 308 | * | | |
|
0 commit comments