Skip to content

Commit 27405bf

Browse files
authored
Merge pull request #12671 from hugueskamba/hk-netsocket-remove-armc5-support
Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2 parents a79d3ce + 209f1e6 commit 27405bf

File tree

9 files changed

+10
-68
lines changed

9 files changed

+10
-68
lines changed

features/frameworks/nanostack-libservice/mbed-client-libservice/common_functions.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros(uint8_t value)
509509

510510
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8(uint8_t value)
511511
{
512-
#ifdef __CC_ARM
513-
return value ? __clz((unsigned int) value << 24) : 8;
514-
#elif defined __GNUC__
512+
#if defined __GNUC__
515513
return value ? __builtin_clz((unsigned int) value << 24) : 8;
516514
#else
517515
uint_fast8_t cnt = 0;
@@ -536,9 +534,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8(uint8_t value)
536534

537535
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_16(uint16_t value)
538536
{
539-
#ifdef __CC_ARM
540-
return value ? __clz((unsigned int) value << 16) : 16;
541-
#elif defined __GNUC__
537+
#if defined __GNUC__
542538
return value ? __builtin_clz((unsigned int) value << 16) : 16;
543539
#else
544540
uint_fast8_t cnt = 0;
@@ -567,9 +563,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_16(uint16_t value)
567563

568564
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_32(uint32_t value)
569565
{
570-
#ifdef __CC_ARM
571-
return __clz(value);
572-
#elif defined __GNUC__
566+
#if defined __GNUC__
573567
return value ? __builtin_clz(value) : 32;
574568
#else
575569
uint_fast8_t cnt = 0;

features/frameworks/nanostack-libservice/mbed-client-libservice/ns_types.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ typedef int_fast32_t int_fast24_t;
106106
#define NS_NORETURN _Noreturn
107107
#elif defined __GNUC__
108108
#define NS_NORETURN __attribute__((__noreturn__))
109-
#elif defined __CC_ARM
110-
#define NS_NORETURN __declspec(noreturn)
111109
#elif defined __IAR_SYSTEMS_ICC__
112110
#define NS_NORETURN __noreturn
113111
#else
@@ -117,7 +115,7 @@ typedef int_fast32_t int_fast24_t;
117115

118116
/* C11's "alignas" macro, emulated for integer expressions if necessary */
119117
#ifndef __alignas_is_defined
120-
#if defined __CC_ARM || defined __TASKING__
118+
#if defined __TASKING__
121119
#define alignas(n) __align(n)
122120
#define __alignas_is_defined 1
123121
#elif (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L) || (defined __cplusplus && __cplusplus >= 201103L)
@@ -149,7 +147,7 @@ typedef int_fast32_t int_fast24_t;
149147
* static int foo(void) MAYBE_UNUSED;
150148
* ~~~
151149
*/
152-
#if defined __CC_ARM || defined __GNUC__
150+
#if defined __GNUC__
153151
#define MAYBE_UNUSED __attribute__((unused))
154152
#else
155153
#define MAYBE_UNUSED
@@ -219,7 +217,7 @@ typedef int_fast32_t int_fast24_t;
219217
#else /* C */
220218
# if __STDC_VERSION__ >= 201112L
221219
# define NS_STATIC_ASSERT(test, str) _Static_assert(test, str);
222-
# elif defined __GNUC__ && NS_GCC_VERSION >= 40600 && !defined __CC_ARM
220+
# elif defined __GNUC__ && NS_GCC_VERSION >= 40600
223221
# ifdef _Static_assert
224222
/*
225223
* Some versions of glibc cdefs.h (which comes in via <stdint.h> above)
@@ -255,7 +253,7 @@ typedef int_fast32_t int_fast24_t;
255253

256254
/** \brief Pragma to suppress warnings about always true/false comparisons
257255
*/
258-
#if defined __GNUC__ && NS_GCC_VERSION >= 40600 && !defined __CC_ARM
256+
#if defined __GNUC__ && NS_GCC_VERSION >= 40600
259257
#define NS_FUNNY_COMPARE_OK _Pragma("GCC diagnostic push") \
260258
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
261259
#define NS_FUNNY_COMPARE_RESTORE _Pragma("GCC diagnostic pop")
@@ -272,11 +270,7 @@ typedef int_fast32_t int_fast24_t;
272270
* components should ensure this is not included by only using it in
273271
* a ifdef blocks providing dummy definitions.
274272
*/
275-
#ifdef __CC_ARM
276-
// statement is unreachable(111), controlling expression is constant(236), expression has no effect(174),
277-
// function was declared but never referenced(177), variable was set but never used(550)
278-
#define NS_DUMMY_DEFINITIONS_OK _Pragma("diag_suppress=111,236,174,177,550")
279-
#elif defined __IAR_SYSTEMS_ICC__
273+
#if defined __IAR_SYSTEMS_ICC__
280274
// controlling expression is constant
281275
#define NS_DUMMY_DEFINITIONS_OK _Pragma("diag_suppress=Pe236")
282276
#else

features/lwipstack/lwip-sys/arch/cc.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,7 @@ extern "C" {
5454
#define LWIP_PROVIDE_ERRNO
5555
#endif
5656

57-
#if defined(__arm__) && defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050)
58-
/* Keil uVision4 tools */
59-
#define PACK_STRUCT_BEGIN __packed
60-
#define PACK_STRUCT_STRUCT
61-
#define PACK_STRUCT_END
62-
#define PACK_STRUCT_FIELD(fld) fld
63-
#define ALIGNED(n) __align(n)
64-
#elif defined (__IAR_SYSTEMS_ICC__)
57+
#if defined (__IAR_SYSTEMS_ICC__)
6558
/* IAR Embedded Workbench tools */
6659
#define PACK_STRUCT_BEGIN __packed
6760
#define PACK_STRUCT_STRUCT

features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/port/compiler/fnet_comp_config.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@
9494
#elif defined(__clang__)
9595
#define FNET_CFG_COMP_CLANG (1)
9696
#define FNET_COMP_STR "CLANG"
97-
/* Keil uVision compiler using armcc. */
98-
#elif defined(__CC_ARM)
99-
#define FNET_CFG_COMP_UV (1)
100-
#define FNET_COMP_STR "UV"
10197
/* GNU GCC */
10298
#elif defined(__GNUC__)
10399
#define FNET_CFG_COMP_GNUC (1)

features/nanostack/sal-stack-nanostack/source/nsconfig.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424

2525
#include "ns_types.h"
2626

27-
#ifdef __CC_ARM
28-
#pragma diag_suppress 546 // transfer of control bypasses initialization
29-
#endif
30-
3127
#define __ns_cfg_header(x) #x
3228
#define _ns_cfg_header(x) __ns_cfg_header(configs/cfg_##x.h)
3329
#define ns_cfg_header(x) _ns_cfg_header(x)

features/netsocket/emac-drivers/TARGET_Freescale_EMAC/kinetis_emac.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,6 @@ bool Kinetis_EMAC::low_level_init_successful()
247247
config.rxAccelerConfig = kENET_RxAccelMacCheckEnabled;
248248
ENET_Init(ENET, &g_handle, &config, &buffCfg, hwaddr, sysClock);
249249

250-
#if defined(TOOLCHAIN_ARM)
251-
#if defined(__OPTIMISE_TIME) && (__ARMCC_VERSION < 5060750)
252-
/* Add multicast groups
253-
work around for https://github.com/ARMmbed/mbed-os/issues/4372 */
254-
ENET->GAUR = 0xFFFFFFFFu;
255-
ENET->GALR = 0xFFFFFFFFu;
256-
#endif
257-
#endif
258-
259250
ENET_SetCallback(&g_handle, &Kinetis_EMAC::ethernet_callback, this);
260251
ENET_ActiveRead(ENET);
261252

features/netsocket/emac-drivers/TARGET_NXP_EMAC/TARGET_IMX/imx_emac.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,6 @@ bool Kinetis_EMAC::low_level_init_successful()
241241
config.rxAccelerConfig = kENET_RxAccelMacCheckEnabled;
242242
ENET_Init(ENET, &g_handle, &config, &buffCfg, hwaddr, sysClock);
243243

244-
#if defined(TOOLCHAIN_ARM)
245-
#if defined(__OPTIMISE_TIME) && (__ARMCC_VERSION < 5060750)
246-
/* Add multicast groups
247-
work around for https://github.com/ARMmbed/mbed-os/issues/4372 */
248-
ENET->GAUR = 0xFFFFFFFFu;
249-
ENET->GALR = 0xFFFFFFFFu;
250-
#endif
251-
#endif
252-
253244
ENET_SetCallback(&g_handle, &Kinetis_EMAC::ethernet_callback, this);
254245
ENET_ActiveRead(ENET);
255246

features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,6 @@ ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptor
9797
#pragma location=0x30040400
9898
uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffers */
9999

100-
#elif defined ( __CC_ARM ) /* ARMC5 */
101-
102-
__attribute__((section(".RxDecripSection"))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */
103-
__attribute__((section(".TxDecripSection"))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */
104-
__attribute__((section(".RxArraySection"))) uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffer */
105-
106100
#elif defined ( __GNUC__ ) /* GCC & ARMC6*/
107101

108102
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */

features/netsocket/ppp/ppp_service_if.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,7 @@ typedef int sys_prot_t;
256256
#define OUTPUT_BUFFER 0
257257
#define INPUT_BUFFER 1
258258

259-
#if defined(__arm__) && defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050)
260-
/* Keil uVision4 tools */
261-
#define PACK_STRUCT_BEGIN __packed
262-
#define PACK_STRUCT_STRUCT
263-
#define PACK_STRUCT_END
264-
#define PACK_STRUCT_FIELD(fld) fld
265-
#define ALIGNED(n) __align(n)
266-
#elif defined (__IAR_SYSTEMS_ICC__)
259+
#if defined (__IAR_SYSTEMS_ICC__)
267260
/* IAR Embedded Workbench tools */
268261
#define PACK_STRUCT_BEGIN __packed
269262
#define PACK_STRUCT_STRUCT

0 commit comments

Comments
 (0)