From ca41a0f59d7c94e901d94c138c6923ce6c6d2ec4 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Wed, 13 Sep 2017 11:08:29 -0500 Subject: [PATCH] Correct uninit region for nordic targets --- .../TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct | 2 +- .../TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct | 2 +- .../TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct | 2 +- .../TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct | 2 +- .../TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM_STD/nRF52832.sct | 2 +- targets/TARGET_NORDIC/TARGET_NRF5/reloc_vector_table.c | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct index 3a268542b0..0d10720cf1 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NORDIC_32K/nRF51822.sct @@ -19,7 +19,7 @@ LR_IROM1 0x1B000 0x0025000 { .ANY (+RO) } RW_IRAM0 0x20002ef8 UNINIT 0x000000c0 { ;no init section - *(noinit) + *(*noinit) } RW_IRAM1 0x20002FB8 0x00005048 { .ANY (+RW +ZI) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct index ef516aa805..7baf111cbe 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S110/nRF51822.sct @@ -19,7 +19,7 @@ LR_IROM1 0x18000 0x0028000 { .ANY (+RO) } RW_IRAM0 0x20002000 UNINIT 0x000000c0 { ;no init section - *(noinit) + *(*noinit) } RW_IRAM1 0x200020C0 0x00001F40 { .ANY (+RW +ZI) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct index 585ae2080d..96fbdd496b 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/device/TOOLCHAIN_ARM_STD/TARGET_MCU_NRF51_16K_S130/nRF51822.sct @@ -19,7 +19,7 @@ LR_IROM1 0x0001B000 0x0025000 { .ANY (+RO) } RW_IRAM0 0x20002ef8 UNINIT 0x000000c0 { ;no init section - *(noinit) + *(*noinit) } RW_IRAM1 0x20002FB8 0x00001048 { .ANY (+RW +ZI) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct index 3bb13ec74a..33da60733c 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct @@ -19,7 +19,7 @@ LR_IROM1 0x1C000 0x0064000 { .ANY (+RO) } RW_IRAM0 0x20002EF8 UNINIT 0x000000D8 { ;no init section - *(noinit) + *(*noinit) } RW_IRAM1 0x20002FD0 0x0000D030 { .ANY (+RW +ZI) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM_STD/nRF52832.sct b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM_STD/nRF52832.sct index 37b77b1dd2..496f79dfea 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM_STD/nRF52832.sct +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM_STD/nRF52832.sct @@ -5,7 +5,7 @@ LR_IROM1 0x21000 0x00DF000 { .ANY (+RO) } RW_IRAM0 0x20003288 UNINIT 0x000000F8 { ;no init section - *(noinit) + *(*noinit) } RW_IRAM1 0x20003380 0x0003cc80 { .ANY (+RW +ZI) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/reloc_vector_table.c b/targets/TARGET_NORDIC/TARGET_NRF5/reloc_vector_table.c index 2862e6c417..8bf23254de 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/reloc_vector_table.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5/reloc_vector_table.c @@ -42,8 +42,8 @@ #include "nrf_sdm.h" #include "section_vars.h" -#if defined(__CC_ARM) - __attribute__ ((section("noinit"),zero_init)) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) + __attribute__ ((section(".bss.noinit"),zero_init)) uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS]; #elif defined(__GNUC__) __attribute__ ((section(".noinit")))