diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/ec.lds.S | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 8a20fe931a..bb6b5ed84a 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -25,7 +25,7 @@ ENTRY(reset) MEMORY { #if !defined(CONFIG_FLASH_PHYSICAL) - IRAM (rwx) : ORIGIN = CONFIG_RAM_BASE, LENGTH = CONFIG_RAM_SIZE + IROM (rx) : ORIGIN = CONFIG_ROM_BASE, LENGTH = CONFIG_ROM_SIZE #else #if defined(SECTION_IS_RO) && defined(NPCX_RO_HEADER) /* @@ -43,8 +43,8 @@ MEMORY #ifdef CONFIG_SHAREDLIB SHARED_LIB (rx) : ORIGIN = FW_OFF(SHAREDLIB), LENGTH = FW_SIZE(SHAREDLIB) #endif - IRAM (rw) : ORIGIN = CONFIG_RAM_BASE, LENGTH = CONFIG_RAM_SIZE #endif /* !CONFIG_FLASH_PHYSICAL */ + IRAM (rw) : ORIGIN = CONFIG_RAM_BASE, LENGTH = CONFIG_RAM_SIZE #ifdef CONFIG_EXTERNAL_STORAGE #ifdef CONFIG_REPLACE_LOADER_WITH_BSS_SLOW @@ -120,7 +120,7 @@ SECTIONS } > CDRAM AT > FLASH #else #if !defined(CONFIG_FLASH_PHYSICAL) - } > IRAM + } > IROM #else } > FLASH #endif /* !CONFIG_FLASH_PHYSICAL */ @@ -265,7 +265,7 @@ SECTIONS #endif . = ALIGN(4); #if !defined(CONFIG_FLASH_PHYSICAL) - } > IRAM + } > IROM #elif defined(CONFIG_EXTERNAL_STORAGE) } > CDRAM AT > FLASH #else @@ -274,23 +274,7 @@ SECTIONS __data_lma_start = .; -#if !defined(CONFIG_FLASH_PHYSICAL) - /* - * Make a space for .data section's LMA. Otherwise, ld won't preserve - * a space for .data if .rodata and .bss sections are both in IRAM. - */ -#if defined(__clang__) - /* - * The lazy evaluation timing of symbols and builtin functions of ld and - * lld are different. - */ - .bss __data_lma_start + SIZEOF(.data) : { -#else - .bss __data_lma_start + __data_end - __data_start : { -#endif /* __clang__ */ -#else .bss : { -#endif /* !CONFIG_FLASH_PHYSICAL */ /* * Align to 512 bytes. This is convenient when some memory block * needs big alignment. This is the beginning of the RAM, so there |