I followed strictly all steps of the nRF Connect SDK Getting Started Assistant. However, the code doesn't compile:
(...)
9> Compiling ‘reboot.c’
1> In file included from C:/Nordic/nRF9160/ncs/zephyr/include/toolchain.h:21:0,
1> from zephyr/misc/generated/configs.c:7:
1> C:/Nordic/nRF9160/ncs/zephyr/include/toolchain/gcc.h:325:51: error: expected expression before ')' token
1> zephyr/misc/generated/configs.c:22:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
1> C:/Nordic/nRF9160/ncs/zephyr/include/toolchain/gcc.h:325:51: error: expected expression before ')' token
1> zephyr/misc/generated/configs.c:29:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
10> Compiling ‘policy_residency.c’
11> Compiling ‘uart_console.c’
Build failed
The problem appears to be in assembly of the following:
#if defined(CONFIG_ARM)
/*
* GNU/ARM backend does not have a proper operand modifier which does not
* produces prefix # followed by value, such as %0 for PowerPC, Intel, and
* MIPS. The workaround performed here is using %B0 which converts
* the value to ~(value). Thus "n"(~(value)) is set in operand constraint
* to output (value) in the ARM specific GEN_OFFSET macro.
*/
#define GEN_ABSOLUTE_SYM(name, value) \
__asm__(".globl\t" #name "\n\t.equ\t" #name \
",%B0" \
"\n\t.type\t" #name ",%%object" : : "n"(~(value)))
The error is marked at the last line because ~(value) is not recognised. How can I solve?