From 5b3f54f0ef5b64952e324f0ef833bceac6f90fc8 Mon Sep 17 00:00:00 2001 From: Marcus Chang Date: Wed, 11 Jul 2018 15:48:51 -0700 Subject: [PATCH] Fix linker script for NRF52840/IAR Add missing noinit section. --- .../TARGET_MCU_NRF52832/device/TOOLCHAIN_IAR/nRF52832.icf | 2 +- .../TARGET_MCU_NRF52840/device/TOOLCHAIN_IAR/nRF52840.icf | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_IAR/nRF52832.icf b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_IAR/nRF52832.icf index fd96dc6952..2131ab241a 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_IAR/nRF52832.icf +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_IAR/nRF52832.icf @@ -55,7 +55,7 @@ define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; initialize by copy { readwrite }; do not initialize { section .noinit }; -place at address mem:__ICFEDIT_region_RAM_NVIC_start__ { section .noinit }; +place in RAM_region { section .noinit }; keep { section .intvec }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_IAR/nRF52840.icf b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_IAR/nRF52840.icf index 95819fe1df..522e1f5a33 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_IAR/nRF52840.icf +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_IAR/nRF52840.icf @@ -54,8 +54,11 @@ define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; initialize by copy { readwrite }; +do not initialize { section .nvictable }; +place at address mem:__ICFEDIT_region_RAM_NVIC_start__ { section .nvictable }; + do not initialize { section .noinit }; -place at address mem:__ICFEDIT_region_RAM_NVIC_start__ { section .noinit }; +place in RAM_region { section .noinit }; keep { section .intvec }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };