Skip to content

Commit cbee41c

Browse files
author
Cruz Monrreal
authored
Merge pull request #7150 from pan-/fix-armcc-nrf-sections
Nordic: Fix nrf sections on ARMCC
2 parents e78943e + 16ece66 commit cbee41c

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@
2626
LR_IROM1 MBED_APP_START MBED_APP_SIZE {
2727
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
2828
*.o (RESET, +First)
29-
*(InRoot$$Sections)
30-
__start_sdh_soc_observers *(sdh_soc_observers) __stop_sdh_soc_observers
31-
__start_sdh_stack_observers *(sdh_stack_observers) __stop_sdh_stack_observers
32-
__start_sdh_req_observers *(sdh_req_observers) __stop_sdh_req_observers
33-
__start_sdh_state_observers *(sdh_state_observers) __stop_sdh_state_observers
34-
__start_sdh_ble_observers *(sdh_ble_observers) __stop_sdh_ble_observers
35-
.ANY (+RO)
29+
*(InRoot$$Sections)
30+
.ANY (+RO)
3631
}
32+
3733
RW_IRAM0 MBED_RAM0_START UNINIT MBED_RAM0_SIZE { ;no init section
3834
*(*noinit)
3935
}

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/TOOLCHAIN_ARM_STD/nRF52840.sct

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
2727
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
2828
*.o (RESET, +First)
2929
*(InRoot$$Sections)
30-
__start_sdh_soc_observers *(sdh_soc_observers) __stop_sdh_soc_observers
31-
__start_sdh_stack_observers *(sdh_stack_observers) __stop_sdh_stack_observers
32-
__start_sdh_req_observers *(sdh_req_observers) __stop_sdh_req_observers
33-
__start_sdh_state_observers *(sdh_state_observers) __stop_sdh_state_observers
34-
__start_sdh_ble_observers *(sdh_ble_observers) __stop_sdh_ble_observers
3530
.ANY (+RO)
3631
}
3732
RW_IRAM0 MBED_RAM0_START UNINIT MBED_RAM0_SIZE { ;no init section

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_14_2/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_14_2/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)