diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/libraries/experimental_section_vars/section_vars.h b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/libraries/experimental_section_vars/section_vars.h index 8b0bf6152b..311a33f095 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/libraries/experimental_section_vars/section_vars.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/libraries/experimental_section_vars/section_vars.h @@ -63,7 +63,7 @@ * * @param[in] section_name Name of the section to register. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) // Not required by this compiler. #define NRF_SECTION_VARS_REGISTER_SECTION(section_name) @@ -88,7 +88,7 @@ * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_START_SYMBOL(section_name) section_name ## $$Base @@ -109,7 +109,7 @@ * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_END_SYMBOL(section_name) section_name ## $$Limit @@ -130,7 +130,7 @@ * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_LENGTH(section_name) \ ((uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name)) @@ -152,7 +152,7 @@ * * param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name) @@ -171,7 +171,7 @@ * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) @@ -193,7 +193,7 @@ * @param[in] type_name Name of the type stored in the section. * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \ extern type_name * NRF_SECTION_VARS_START_SYMBOL(section_name); \ @@ -229,7 +229,7 @@ * @param[in] section_name Name of the section. * @param[in] type_def Datatype of the variable to place in the given section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_ADD(section_name, type_def) \ static type_def __attribute__ ((section(#section_name))) __attribute__((used)) @@ -259,7 +259,7 @@ * @param[in] type_name Type name of item in section. * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_GET(i, type_name, section_name) \ (type_name*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(type_name)) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/softdevice/common/softdevice_handler/softdevice_handler.c b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/softdevice/common/softdevice_handler/softdevice_handler.c index 5534ae6dae..a884968210 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/softdevice/common/softdevice_handler/softdevice_handler.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/softdevice/common/softdevice_handler/softdevice_handler.c @@ -441,7 +441,7 @@ static inline uint32_t ram_end_address_get(void) uint32_t sd_check_ram_start(uint32_t sd_req_ram_start) { #if (defined(S130) || defined(S132) || defined(S332)) -#if defined ( __CC_ARM ) +#if defined ( __CC_ARM ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) extern uint32_t Image$$RW_IRAM1$$Base; const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base; #elif defined ( __ICCARM__ ) @@ -474,7 +474,7 @@ uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params) uint32_t err_code; uint32_t app_ram_base; -#if defined ( __CC_ARM ) +#if defined ( __CC_ARM ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) extern uint32_t Image$$RW_IRAM1$$Base; const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base; #elif defined ( __ICCARM__ ) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/libraries/experimental_section_vars/section_vars.h b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/libraries/experimental_section_vars/section_vars.h index 1479db5c80..43bf16b74b 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/libraries/experimental_section_vars/section_vars.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/libraries/experimental_section_vars/section_vars.h @@ -72,7 +72,7 @@ extern "C" { * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_START_SYMBOL(section_name) section_name ## $$Base @@ -93,7 +93,7 @@ extern "C" { * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_END_SYMBOL(section_name) section_name ## $$Limit @@ -115,7 +115,7 @@ extern "C" { * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_LENGTH(section_name) \ ((uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name)) @@ -137,7 +137,7 @@ extern "C" { * * param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name) @@ -156,7 +156,7 @@ extern "C" { * * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) @@ -180,7 +180,7 @@ extern "C" { * * @warning The data type must be word aligned to prevent padding. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_CREATE_SECTION(section_name, data_type) \ extern data_type * NRF_SECTION_VARS_START_SYMBOL(section_name); \ @@ -216,7 +216,7 @@ extern "C" { * @param[in] section_name Name of the section. * @param[in] section_var The variable to register in the given section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_REGISTER_VAR(section_name, section_var) \ static section_var __attribute__ ((section(#section_name))) __attribute__((used)) @@ -246,7 +246,7 @@ extern "C" { * @param[in] data_type Data type of the variable. * @param[in] section_name Name of the section. */ -#if defined(__CC_ARM) +#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) #define NRF_SECTION_VARS_GET(i, data_type, section_name) \ (data_type*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(data_type)) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/softdevice/common/softdevice_handler/softdevice_handler.c b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/softdevice/common/softdevice_handler/softdevice_handler.c index 868532b485..3ababf45a8 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/softdevice/common/softdevice_handler/softdevice_handler.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK13/softdevice/common/softdevice_handler/softdevice_handler.c @@ -522,7 +522,7 @@ uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params) uint32_t err_code; uint32_t app_ram_base; -#if defined ( __CC_ARM ) +#if defined ( __CC_ARM ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) extern uint32_t Image$$RW_IRAM1$$Base; const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base; #elif defined ( __ICCARM__ )