This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 Asset Tracker: cannot compile with SES

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?

Parents Reply
  • Hi Amanda: post was written mainly by me. However, after I used the ASSET_TRACKER example using SES I never again succeeded to put it to work, even if I change the mode to LTE and back to NB-IoT. Strange is also that I reflashed the latest FW 0.7.029-alpha-update (sorry if not exactly the name) but the software I wrote (printf test message) still runs. 

    Is the fw you provide like a Softdevice in nRF51? I would expect not! So I wonder why I can't get the unit to factory reset status and then flash your latest FW version to get back to the point where it worked...

Children
No Data
Related