Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_btld_app_overlap_c2_v4.4' into 'release/v4.4'
Browse files Browse the repository at this point in the history
ld: fixed bootloader and app potential overlap issue (v4.4)

See merge request espressif/esp-idf!22570
  • Loading branch information
suda-morris committed Mar 9, 2023
2 parents 028f483 + 5fa6b28 commit 4b498e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ MEMORY
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 + I_D_SRAM_OFFSET) in components/esp_system/ld/esp32c3/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403ce710, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");

/* Default entry point: */
ENTRY(call_start_cpu0);

Expand Down
2 changes: 1 addition & 1 deletion components/esp_system/ld/esp32c3/memory.ld.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define SRAM_DRAM_START 0x3FC7C000
#define ICACHE_SIZE 0x4000 /* ICache size is fixed to 16KB on ESP32-C3 */
#define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START)
#define SRAM_DRAM_END 0x403D0000 - I_D_SRAM_OFFSET /* 2nd stage bootloader iram_loader_seg start address */
#define SRAM_DRAM_END 0x403CE710 - I_D_SRAM_OFFSET /* 2nd stage bootloader iram_loader_seg start address */

#define SRAM_IRAM_ORG (SRAM_IRAM_START + ICACHE_SIZE)
#define SRAM_DRAM_ORG (SRAM_DRAM_START + ICACHE_SIZE)
Expand Down

0 comments on commit 4b498e8

Please sign in to comment.