mirror of
https://github.com/apache/nuttx.git
synced 2026-05-16 05:27:45 +08:00
risc-v/espressif: Fix bootloader and app potential IRAM overlap
Related to a recent fix from esp-idf: https://github.com/espressif/esp-idf/commit/0fb0be381763332007c269a558e5df9b23f69c18 Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
d0679af1d8
commit
c44d55c70c
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -31,26 +31,26 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#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
|
||||
{
|
||||
|
||||
@@ -31,26 +31,26 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user