diff --git a/boards/risc-v/esp32c3/common/scripts/flat_memory.ld b/boards/risc-v/esp32c3/common/scripts/flat_memory.ld index 1c35a388c4..c0c7937457 100644 --- a/boards/risc-v/esp32c3/common/scripts/flat_memory.ld +++ b/boards/risc-v/esp32c3/common/scripts/flat_memory.ld @@ -43,12 +43,12 @@ /* 2nd stage bootloader iram_loader_seg start address */ -#define SRAM_DRAM_END 0x403d0000 - I_D_SRAM_OFFSET +#define SRAM_DRAM_END (0x403ce710 - I_D_SRAM_OFFSET) #define SRAM_IRAM_ORG (SRAM_IRAM_START + ICACHE_SIZE) #define SRAM_DRAM_ORG (SRAM_DRAM_START + ICACHE_SIZE) -#define I_D_SRAM_SIZE SRAM_DRAM_END - SRAM_DRAM_ORG +#define I_D_SRAM_SIZE (SRAM_DRAM_END - SRAM_DRAM_ORG) #ifdef CONFIG_ESP32C3_FLASH_2M # define FLASH_SIZE 0x200000 diff --git a/boards/risc-v/esp32c6/common/scripts/flat_memory.ld b/boards/risc-v/esp32c6/common/scripts/flat_memory.ld index ee17a5d500..30d4d139b1 100644 --- a/boards/risc-v/esp32c6/common/scripts/flat_memory.ld +++ b/boards/risc-v/esp32c6/common/scripts/flat_memory.ld @@ -36,12 +36,12 @@ /* 2nd stage bootloader iram_loader_seg start address */ -#define SRAM_DRAM_END 0x40880000 - I_D_SRAM_OFFSET +#define SRAM_DRAM_END (0x4086e610 - I_D_SRAM_OFFSET) #define SRAM_IRAM_ORG (SRAM_IRAM_START) #define SRAM_DRAM_ORG (SRAM_DRAM_START) -#define I_D_SRAM_SIZE SRAM_DRAM_END - SRAM_DRAM_ORG +#define I_D_SRAM_SIZE (SRAM_DRAM_END - SRAM_DRAM_ORG) /* IDRAM0_2_SEG_SIZE_DEFAULT is used when page size is 64KB */ diff --git a/boards/risc-v/espressif/common/scripts/esp32c3_flat_memory.ld b/boards/risc-v/espressif/common/scripts/esp32c3_flat_memory.ld index 68673670eb..843030c685 100644 --- a/boards/risc-v/espressif/common/scripts/esp32c3_flat_memory.ld +++ b/boards/risc-v/espressif/common/scripts/esp32c3_flat_memory.ld @@ -41,12 +41,12 @@ /* 2nd stage bootloader iram_loader_seg start address */ -#define SRAM_DRAM_END 0x403d0000 - I_D_SRAM_OFFSET +#define SRAM_DRAM_END (0x403ce710 - I_D_SRAM_OFFSET) #define SRAM_IRAM_ORG (SRAM_IRAM_START + ICACHE_SIZE) #define SRAM_DRAM_ORG (SRAM_DRAM_START + ICACHE_SIZE) -#define I_D_SRAM_SIZE SRAM_DRAM_END - SRAM_DRAM_ORG +#define I_D_SRAM_SIZE (SRAM_DRAM_END - SRAM_DRAM_ORG) MEMORY { diff --git a/boards/risc-v/espressif/common/scripts/esp32c6_flat_memory.ld b/boards/risc-v/espressif/common/scripts/esp32c6_flat_memory.ld index c35f39a1a9..1cfa0b3050 100644 --- a/boards/risc-v/espressif/common/scripts/esp32c6_flat_memory.ld +++ b/boards/risc-v/espressif/common/scripts/esp32c6_flat_memory.ld @@ -31,26 +31,26 @@ #include -#define SRAM_IRAM_START 0x40800000 -#define SRAM_DRAM_START 0x40800000 +#define SRAM_IRAM_START 0x40800000 +#define SRAM_DRAM_START 0x40800000 -#define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START) +#define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START) /* 2nd stage bootloader iram_loader_seg start address */ -#define SRAM_DRAM_END 0x40880000 - I_D_SRAM_OFFSET +#define SRAM_DRAM_END (0x4086e610 - I_D_SRAM_OFFSET) -#define SRAM_IRAM_ORG (SRAM_IRAM_START) -#define SRAM_DRAM_ORG (SRAM_DRAM_START) +#define SRAM_IRAM_ORG (SRAM_IRAM_START) +#define SRAM_DRAM_ORG (SRAM_DRAM_START) -#define I_D_SRAM_SIZE SRAM_DRAM_END - SRAM_DRAM_ORG +#define I_D_SRAM_SIZE (SRAM_DRAM_END - SRAM_DRAM_ORG) /* IDRAM0_2_SEG_SIZE_DEFAULT is used when page size is 64KB */ -#define CONFIG_MMU_PAGE_SIZE 0x10000 -#define IDRAM0_2_SEG_SIZE (CONFIG_MMU_PAGE_SIZE << 8) +#define CONFIG_MMU_PAGE_SIZE 0x10000 +#define IDRAM0_2_SEG_SIZE (CONFIG_MMU_PAGE_SIZE << 8) -#define DRAM0_0_SEG_LEN I_D_SRAM_SIZE +#define DRAM0_0_SEG_LEN I_D_SRAM_SIZE MEMORY { diff --git a/boards/risc-v/espressif/common/scripts/esp32h2_flat_memory.ld b/boards/risc-v/espressif/common/scripts/esp32h2_flat_memory.ld index 766605a5fa..38d9d81d07 100644 --- a/boards/risc-v/espressif/common/scripts/esp32h2_flat_memory.ld +++ b/boards/risc-v/espressif/common/scripts/esp32h2_flat_memory.ld @@ -31,26 +31,26 @@ #include -#define SRAM_IRAM_START 0x40800000 -#define SRAM_DRAM_START 0x40800000 +#define SRAM_IRAM_START 0x40800000 +#define SRAM_DRAM_START 0x40800000 -#define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START) +#define I_D_SRAM_OFFSET (SRAM_IRAM_START - SRAM_DRAM_START) /* 2nd stage bootloader iram_loader_seg start address */ -#define SRAM_DRAM_END 0x40850000 - I_D_SRAM_OFFSET +#define SRAM_DRAM_END (0x4083efd0 - I_D_SRAM_OFFSET) -#define SRAM_IRAM_ORG (SRAM_IRAM_START) -#define SRAM_DRAM_ORG (SRAM_DRAM_START) +#define SRAM_IRAM_ORG (SRAM_IRAM_START) +#define SRAM_DRAM_ORG (SRAM_DRAM_START) -#define I_D_SRAM_SIZE SRAM_DRAM_END - SRAM_DRAM_ORG +#define I_D_SRAM_SIZE (SRAM_DRAM_END - SRAM_DRAM_ORG) /* IDRAM0_2_SEG_SIZE_DEFAULT is used when page size is 64KB */ -#define CONFIG_MMU_PAGE_SIZE 0x10000 -#define IDRAM0_2_SEG_SIZE (CONFIG_MMU_PAGE_SIZE << 8) +#define CONFIG_MMU_PAGE_SIZE 0x10000 +#define IDRAM0_2_SEG_SIZE (CONFIG_MMU_PAGE_SIZE << 8) -#define DRAM0_0_SEG_LEN I_D_SRAM_SIZE +#define DRAM0_0_SEG_LEN I_D_SRAM_SIZE MEMORY {