Skip to content

Commit 488f06b

Browse files
committed
NRF: Migrate ARM Compiler 5 feature re-locate zero initialized variables
ARM Compiler 6 does not support placing a zero-initialized variable in a zero-initialized section with a given name. The migration path for this feature is what is as done in this commit. The name of the section is what comes after `.bss.` (`nvictable` in this case). Also simplify pre-processor directive to test for Arm compiler.
1 parent c7759fe commit 488f06b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
#include "nrf_dfu_mbr.h"
4848
#endif
4949

50-
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
51-
__attribute__ ((section(".bss.nvictable"),zero_init))
50+
#if defined(__ARMCC_VERSION)
51+
__attribute__ ((section(".bss.nvictable")))
5252
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
5353
#elif defined(__GNUC__)
5454
__attribute__ ((section(".nvictable")))

0 commit comments

Comments
 (0)