change(bootloader): added address check in bootloader.ld

This commit is contained in:
Armando 2023-07-28 13:53:13 +08:00
parent 706d684418
commit aa245489fb
2 changed files with 10 additions and 2 deletions

View File

@ -25,7 +25,7 @@
bootloader_usable_dram_end = 0x4ff3abd0; bootloader_usable_dram_end = 0x4ff3abd0;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */ bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x4000; bootloader_dram_seg_len = 0x4000;
bootloader_iram_loader_seg_len = 0x4000; bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2000; bootloader_iram_seg_len = 0x2000;
/* Start of the lower region is determined by region size and the end of the higher region */ /* Start of the lower region is determined by region size and the end of the higher region */
@ -41,6 +41,14 @@ MEMORY
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
} }
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update SRAM_DRAM_END in components/esp_system/ld/esp32p4/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x4FF2DBD0, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */ /* Default entry point: */
ENTRY(call_start_cpu0); ENTRY(call_start_cpu0);

View File

@ -23,7 +23,7 @@
#define SRAM_DRAM_START 0x4ff00000 #define SRAM_DRAM_START 0x4ff00000
#define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START) #define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START)
#define SRAM_DRAM_END 0x4ff30bd0 - I_D_SRAM_OFFSET /* 2nd stage bootloader iram_loader_seg start address */ #define SRAM_DRAM_END 0x4FF2DBD0 - I_D_SRAM_OFFSET /* 2nd stage bootloader iram_loader_seg start address */
#define SRAM_IRAM_ORG (SRAM_IRAM_START) #define SRAM_IRAM_ORG (SRAM_IRAM_START)
#define SRAM_DRAM_ORG (SRAM_DRAM_START) #define SRAM_DRAM_ORG (SRAM_DRAM_START)