Skip to content

Commit 360b099

Browse files
authored
Merge pull request #7 from desmond-blue/fix-nrf-section-iter
Fix nrf section iter ARMCC compiler macro check
2 parents ef632c8 + a883bf7 commit 360b099

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/components/libraries/experimental_section_vars/nrf_section_iter.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#include "nrf_section_iter.h"
4646

4747

48-
#if !defined(__GNUC__)
48+
#if !defined(__GNUC__) || defined(__CC_ARM)
4949
static void nrf_section_iter_item_set(nrf_section_iter_t * p_iter)
5050
{
5151
ASSERT(p_iter != NULL);
@@ -82,7 +82,7 @@ void nrf_section_iter_init(nrf_section_iter_t * p_iter, nrf_section_set_t const
8282

8383
p_iter->p_set = p_set;
8484

85-
#if defined(__GNUC__)
85+
#if defined(__GNUC__) && !defined(__CC_ARM)
8686
p_iter->p_item = p_iter->p_set->section.p_start;
8787
if (p_iter->p_item == p_iter->p_set->section.p_end)
8888
{
@@ -106,7 +106,7 @@ void nrf_section_iter_next(nrf_section_iter_t * p_iter)
106106

107107
p_iter->p_item = (void *)((size_t)(p_iter->p_item) + p_iter->p_set->item_size);
108108

109-
#if defined(__GNUC__)
109+
#if defined(__GNUC__) && !defined(__CC_ARM)
110110
if (p_iter->p_item == p_iter->p_set->section.p_end)
111111
{
112112
p_iter->p_item = NULL;

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/components/libraries/experimental_section_vars/nrf_section_iter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typedef struct
6868
/**@brief Set of the sections description structure. */
6969
typedef struct
7070
{
71-
#if defined(__GNUC__)
71+
#if defined(__GNUC__) && !defined(__CC_ARM)
7272
nrf_section_t section; //!< Description of the set of sections.
7373
/**<
7474
* In case of GCC all sections in the set are sorted and
@@ -87,7 +87,7 @@ typedef struct
8787
typedef struct
8888
{
8989
nrf_section_set_t const * p_set; //!< Pointer to the appropriate section set.
90-
#if !defined(__GNUC__)
90+
#if !defined(__GNUC__) || defined(__CC_ARM)
9191
nrf_section_t const * p_section; //!< Pointer to the selected section.
9292
/**<
9393
* In case of GCC all sections in the set are sorted and
@@ -110,7 +110,7 @@ typedef struct
110110
* @param[in] _count Number of the sections in the set. This parameter is ignored in case of GCC.
111111
* @hideinitializer
112112
*/
113-
#if defined(__GNUC__)
113+
#if defined(__GNUC__) && !defined(__CC_ARM)
114114

115115
#define NRF_SECTION_SET_DEF(_name, _type, _count) \
116116
\

0 commit comments

Comments
 (0)