diff --git a/features/FEATURE_BLE/ble/Gap.h b/features/FEATURE_BLE/ble/Gap.h index f8edd50e41..ef2b09dad6 100644 --- a/features/FEATURE_BLE/ble/Gap.h +++ b/features/FEATURE_BLE/ble/Gap.h @@ -2636,12 +2636,9 @@ protected: /* -------- deprecated template implementation -------- */ -#if defined(__GNUC__) && !defined(__CC_ARM) +#if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif defined(__CC_ARM) -#pragma push -#pragma diag_suppress 1361 #endif #if BLE_ROLE_OBSERVER @@ -2687,10 +2684,8 @@ void LegacyGap::onRadioNotification(T *tptr, void (T::*mptr)(bool)) radioNotificationCallback.attach(tptr, mptr); } -#if defined(__GNUC__) && !defined(__CC_ARM) +#if defined(__GNUC__) #pragma GCC diagnostic pop -#elif defined(__CC_ARM) -#pragma pop #endif } // interface diff --git a/features/FEATURE_BLE/ble/pal/Deprecated.h b/features/FEATURE_BLE/ble/pal/Deprecated.h index 7af4795cef..5695c35748 100644 --- a/features/FEATURE_BLE/ble/pal/Deprecated.h +++ b/features/FEATURE_BLE/ble/pal/Deprecated.h @@ -19,14 +19,10 @@ /** * Declare the beginning of a code block that uses a deprecated API */ -#if defined(__GNUC__) && !defined(__CC_ARM) +#if defined(__GNUC__) #define BLE_DEPRECATED_API_USE_BEGIN() \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -#elif defined(__CC_ARM) -#define BLE_DEPRECATED_API_USE_BEGIN() \ - _Pragma("push") \ - _Pragma("diag_suppress 1361") #else #define BLE_DEPRECATED_API_USE_BEGIN() #endif @@ -34,12 +30,9 @@ /** * Declare the end of a code block that uses a deprecated API */ -#if defined(__GNUC__) && !defined(__CC_ARM) +#if defined(__GNUC__) #define BLE_DEPRECATED_API_USE_END() \ _Pragma("GCC diagnostic pop") -#elif defined(__CC_ARM) -#define BLE_DEPRECATED_API_USE_END() \ - _Pragma("pop") #else #define BLE_DEPRECATED_API_USE_END() #endif diff --git a/features/FEATURE_BLE/source/LegacyGap.tpp b/features/FEATURE_BLE/source/LegacyGap.tpp index 4cfa213722..10f80820a9 100644 --- a/features/FEATURE_BLE/source/LegacyGap.tpp +++ b/features/FEATURE_BLE/source/LegacyGap.tpp @@ -267,12 +267,9 @@ ble_error_t LegacyGap::initRadioNotification(void) { /* -------- deprecated template implementation -------- */ -#if defined(__GNUC__) && !defined(__CC_ARM) +#if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif defined(__CC_ARM) -#pragma push -#pragma diag_suppress 1361 #endif template @@ -850,10 +847,8 @@ void LegacyGap::processAdvertisementReport( onAdvertisementReport.call(¶ms); } -#if defined(__GNUC__) && !defined(__CC_ARM) +#if defined(__GNUC__) #pragma GCC diagnostic pop -#elif defined(__CC_ARM) -#pragma pop #endif #if BLE_ROLE_BROADCASTER diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/util/print.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/util/print.h index cf63ac6193..92c80db18d 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/util/print.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/util/print.h @@ -35,7 +35,7 @@ **************************************************************************************************/ /*! \brief Print function attributes. */ -#if defined(__GNUC__) || defined(__CC_ARM) +#if defined(__GNUC__) #define PRINT_ATTRIBUTE(a, b) __attribute__((format(printf, a, b))) #else #define PRINT_ATTRIBUTE(a, b) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/wsf_types.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/wsf_types.h index efc3988f94..29ef8e5351 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/wsf_types.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/wsf/include/wsf_types.h @@ -59,7 +59,7 @@ extern "C" { #if (((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) && \ (!defined(__ICC8051__) || (__ICC8051__ == 0))) || \ (defined(__clang__) || defined(_MSC_VER)) || \ - defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__) || defined(__ARMCC_VERSION)) + defined(__IAR_SYSTEMS_ICC__) || defined(__ARMCC_VERSION)) #include #else /*! \brief Signed 8-bit value. */ diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.c b/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.c index 2d7a207e6b..abb8b20e0a 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.c +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.c @@ -168,7 +168,7 @@ void uECC_set_rng_ll(uECC_RNG_Function rng_function) { g_rng_function = rng_function; } -#if !defined(__CC_ARM) && !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */ +#if !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */ #if (uECC_ASM && (uECC_PLATFORM == uECC_arm || uECC_PLATFORM == uECC_arm_thumb || \ uECC_PLATFORM == uECC_arm_thumb2)) #include "asm_arm.inc" diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.h b/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.h index 3b0133b14f..173bc12b68 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO_LL/stack/thirdparty/uecc/uECC_ll.h @@ -29,7 +29,7 @@ uECC_asm_fast - Use GCC inline assembly optimized for maximum speed. */ #define uECC_asm_small 1 #define uECC_asm_fast 2 #ifndef uECC_ASM - #if !defined(__CC_ARM) && !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */ + #if !defined(__ARMCC_VERSION) && !defined(__ICCARM__) && defined(__GNUC__) /* Only support GCC inline asm for now */ #define uECC_ASM uECC_asm_fast #else // DG: ARMCC 5, unlike GCC, IAR and CLANG, doesn't support GNU-style inline assembly #define uECC_ASM uECC_asm_none diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c index a5f5461595..ca8d2e8f27 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c @@ -39,10 +39,7 @@ #include "app_error.h" -#if defined(__CC_ARM) - #pragma push - #pragma anon_unions -#elif defined(__ICCARM__) +#if defined(__ICCARM__) #pragma language=extended #elif defined(__GNUC__) /* anonymous unions are enabled by default */ @@ -80,9 +77,7 @@ typedef struct } ble_conn_state_t; -#if defined(__CC_ARM) - #pragma pop -#elif defined(__ICCARM__) +#if defined(__ICCARM__) /* leave anonymous unions enabled */ #elif defined(__GNUC__) /* anonymous unions are enabled by default */ @@ -411,4 +406,3 @@ sdk_mapped_flags_t ble_conn_state_user_flag_collection(ble_conn_state_user_flag_ return 0; } } - diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/device_manager/device_manager_peripheral.c b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/device_manager/device_manager_peripheral.c index fe304c9d20..c718ec7e99 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/device_manager/device_manager_peripheral.c +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/ble/device_manager/device_manager_peripheral.c @@ -35,11 +35,7 @@ #include "ble_hci.h" #include "app_error.h" -#if defined ( __CC_ARM ) - #ifndef __ALIGN - #define __ALIGN(x) __align(x) /**< Forced aligment keyword for ARM Compiler */ - #endif -#elif defined ( __ICCARM__ ) +#if defined ( __ICCARM__ ) #ifndef __ALIGN #define __ALIGN(x) /**< Forced aligment keyword for IAR Compiler */ #endif diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/compiler_abstraction.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/compiler_abstraction.h index b10d8e39e6..35789c1caf 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/compiler_abstraction.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/compiler_abstraction.h @@ -34,28 +34,7 @@ /*lint ++flb "Enter library region" */ -#if defined ( __CC_ARM ) - - #ifndef __ASM - #define __ASM __asm - #endif - - #ifndef __INLINE - #define __INLINE __inline - #endif - - #ifndef __WEAK - #define __WEAK __weak - #endif - - #ifndef __ALIGN - #define __ALIGN(n) __align(n) - #endif - - #define GET_SP() __current_sp() - -#elif defined ( __ICCARM__ ) - +#if defined ( __ICCARM__ ) #ifndef __ASM #define __ASM __asm #endif diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/nrf51.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/nrf51.h index 9e4f628ae2..88309b2fd8 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/nrf51.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/device/nrf51.h @@ -109,10 +109,7 @@ typedef enum { /* ------------------- Start of section using anonymous unions ------------------ */ -#if defined(__CC_ARM) - #pragma push - #pragma anon_unions -#elif defined(__ICCARM__) +#if defined(__ICCARM__) #pragma language=extended #elif defined(__GNUC__) /* anonymous unions are enabled by default */ @@ -1155,9 +1152,7 @@ typedef struct { /*!< GPIO Structure /* -------------------- End of section using anonymous unions ------------------- */ -#if defined(__CC_ARM) - #pragma pop -#elif defined(__ICCARM__) +#if defined(__ICCARM__) /* leave anonymous unions enabled */ #elif defined(__GNUC__) /* anonymous unions are enabled by default */ diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/delay/nrf_delay.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/delay/nrf_delay.h index 85e2c3c8ba..bdca19220a 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/delay/nrf_delay.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/delay/nrf_delay.h @@ -43,75 +43,8 @@ * @param number_of_ms */ /*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ -#if defined ( __CC_ARM ) -static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) -{ -loop - SUBS R0, R0, #1 - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP -#ifdef NRF52 - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP - NOP -#endif - BNE loop - BX LR -} - -#elif defined ( __ICCARM__ ) +#if defined ( __ICCARM__ ) static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) { diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/bootloader_dfu/bootloader_util.c b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/bootloader_dfu/bootloader_util.c index 7a2ac3e5a6..6f2677680c 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/bootloader_dfu/bootloader_util.c +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/bootloader_dfu/bootloader_util.c @@ -49,42 +49,7 @@ * * @note This function will never return but issue a reset into provided application. */ -#if defined ( __CC_ARM ) -__asm static void bootloader_util_reset(uint32_t start_addr) -{ - LDR R5, [R0] ; Get App initial MSP for bootloader. - MSR MSP, R5 ; Set the main stack pointer to the applications MSP. - LDR R0, [R0, #0x04] ; Load Reset handler into R0. This will be first argument to branch instruction (BX). - - MOVS R4, #0xFF ; Load ones to R4. - SXTB R4, R4 ; Sign extend R4 to obtain 0xFFFFFFFF instead of 0xFF. - MRS R5, IPSR ; Load IPSR to R5 to check for handler or thread mode. - CMP R5, #0x00 ; Compare, if 0 then we are in thread mode and can continue to reset handler of bootloader. - BNE isr_abort ; If not zero we need to exit current ISR and jump to reset handler of bootloader. - - MOV LR, R4 ; Clear the link register and set to ones to ensure no return, R4 = 0xFFFFFFFF. - BX R0 ; Branch to reset handler of bootloader. - -isr_abort - ; R4 contains ones from line above. Will be popped as R12 when exiting ISR (Cleaning up the registers). - MOV R5, R4 ; Fill with ones before jumping to reset handling. We be popped as LR when exiting ISR. Ensures no return to application. - MOV R6, R0 ; Move address of reset handler to R6. Will be popped as PC when exiting ISR. Ensures the reset handler will be executed when exist ISR. - MOVS r7, #0x21 ; Move MSB reset value of xPSR to R7. Will be popped as xPSR when exiting ISR. xPSR is 0x21000000 thus MSB is 0x21. - REV r7, r7 ; Reverse byte order to put 0x21 as MSB. - PUSH {r4-r7} ; Push everything to new stack to allow interrupt handler to fetch it on exiting the ISR. - - MOVS R4, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R0 when exiting ISR (Cleaning up of the registers). - MOVS R5, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R1 when exiting ISR (Cleaning up of the registers). - MOVS R6, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R2 when exiting ISR (Cleaning up of the registers). - MOVS R7, #0x00 ; Fill with zeros before jumping to reset handling. We be popped as R3 when exiting ISR (Cleaning up of the registers). - PUSH {r4-r7} ; Push zeros (R4-R7) to stack to prepare for exiting the interrupt routine. - - MOVS R0, #0xF9 ; Move the execution return command into register, 0xFFFFFFF9. - SXTB R0, R0 ; Sign extend R0 to obtain 0xFFFFFFF9 instead of 0xF9. - BX R0 ; No return - Handler mode will be exited. Stack will be popped and execution will continue in reset handler initializing other application. - ALIGN -} -#elif defined ( __GNUC__ ) +#if defined ( __GNUC__ ) static inline void bootloader_util_reset(uint32_t start_addr) { __asm volatile( diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/experimental_section_vars/section_vars.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/experimental_section_vars/section_vars.h index b2d5c92a8f..5a3baf2bdf 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/experimental_section_vars/section_vars.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/libraries/experimental_section_vars/section_vars.h @@ -59,12 +59,7 @@ * * @param[in] section_name Name of the section to register **/ -#if defined __CC_ARM - -// Not required by this compiler -#define NRF_SECTION_VARS_REGISTER_SECTION(section_name) - -#elif defined __GNUC__ +#if defined __GNUC__ // Not required by this compiler #define NRF_SECTION_VARS_REGISTER_SECTION(section_name) @@ -88,11 +83,7 @@ * * @param[in] section_name Name of the section */ -#if defined __CC_ARM - -#define NRF_SECTION_VARS_START_SYMBOL(section_name) section_name ## $$Base - -#elif defined __GNUC__ +#if defined __GNUC__ #define NRF_SECTION_VARS_START_SYMBOL(section_name) __start_ ## section_name @@ -114,11 +105,7 @@ * * @param[in] section_name Name of the section */ -#if defined __CC_ARM - -#define NRF_SECTION_VARS_END_SYMBOL(section_name) section_name ## $$Limit - -#elif defined __GNUC__ +#if defined __GNUC__ #define NRF_SECTION_VARS_END_SYMBOL(section_name) __stop_ ## section_name @@ -138,12 +125,7 @@ * @param[in] section_name Name of the section */ -#if defined __CC_ARM - -#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)) - -#elif defined __GNUC__ +#if defined __GNUC__ #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)) @@ -164,16 +146,11 @@ * * param[in] section_name Name of the section to get the start address from */ -#if defined __CC_ARM +#if defined __GNUC__ #define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name) - -#elif defined __GNUC__ - -#define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name) - + #elif defined __ICCARM__ - #define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)iar_ ## section_name ## _start #else @@ -187,14 +164,10 @@ * * @param[in] section_name Name of the section to get end address from */ -#if defined __CC_ARM +#if defined __GNUC__ #define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - -#elif defined __GNUC__ -#define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - #elif defined __ICCARM__ #define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)iar_ ## section_name ## _end @@ -213,13 +186,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 - -#define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \ - extern type_name* NRF_SECTION_VARS_START_SYMBOL(section_name); \ - extern void* NRF_SECTION_VARS_END_SYMBOL(section_name) - -#elif defined __GNUC__ +#if defined __GNUC__ #define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \ extern type_name* NRF_SECTION_VARS_START_SYMBOL(section_name); \ @@ -253,12 +220,7 @@ * @param[in] section_name Name of the section * @param[in] type_def Datatype of the symbol to place in the given section */ -#if defined __CC_ARM - -#define NRF_SECTION_VARS_ADD(section_name, type_def) \ - static type_def __attribute__((section( #section_name ))) __attribute__((used)) - -#elif defined __GNUC__ +#if defined __GNUC__ #define NRF_SECTION_VARS_ADD(section_name, type_def) \ static type_def __attribute__ ((section( #section_name ))) __attribute__ ((used)) @@ -287,13 +249,8 @@ * @param[in] type_name Type name of item in section * @param[in] section_name Name of the section */ - -#if defined __CC_ARM -#define NRF_SECTION_VARS_GET(i, type_name, section_name) \ - (type_name*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(type_name)) - -#elif defined __GNUC__ +#if defined __GNUC__ #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/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/nrf_svc.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/nrf_svc.h index 9311be90cc..aa00ef0bb4 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/nrf_svc.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/nrf_svc.h @@ -38,9 +38,7 @@ #else #ifndef SVCALL -#if defined (__CC_ARM) -#define SVCALL(number, return_type, signature) return_type __svc(number) signature -#elif defined (__GNUC__) +#if defined (__GNUC__) #define SVCALL(number, return_type, signature) \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/source/common/binary.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/source/common/binary.h index 585787eb2f..017c240d49 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/source/common/binary.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_MCU_NRF51822/source/common/binary.h @@ -60,7 +60,7 @@ /// test n-th bit of x #define BIT_TEST(x, n) ( (x) & BIT(n) ) -#if defined(__GNUC__) && !defined(__CC_ARM) // keil does not support binary format +#if defined(__GNUC__) // keil does not support binary format #define BIN8(x) ((uint8_t) (0b##x)) #define BIN16(b1, b2) ((uint16_t) (0b##b1##b2)) diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF51/source/common/binary.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF51/source/common/binary.h index 585787eb2f..017c240d49 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF51/source/common/binary.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF51/source/common/binary.h @@ -60,7 +60,7 @@ /// test n-th bit of x #define BIT_TEST(x, n) ( (x) & BIT(n) ) -#if defined(__GNUC__) && !defined(__CC_ARM) // keil does not support binary format +#if defined(__GNUC__) // keil does not support binary format #define BIN8(x) ((uint8_t) (0b##x)) #define BIN16(b1, b2) ((uint16_t) (0b##b1##b2)) diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/common/binary.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/common/binary.h index 585787eb2f..017c240d49 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/common/binary.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/common/binary.h @@ -60,7 +60,7 @@ /// test n-th bit of x #define BIT_TEST(x, n) ( (x) & BIT(n) ) -#if defined(__GNUC__) && !defined(__CC_ARM) // keil does not support binary format +#if defined(__GNUC__) // keil does not support binary format #define BIN8(x) ((uint8_t) (0b##x)) #define BIN16(b1, b2) ((uint16_t) (0b##b1##b2))