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

nRF9160 SES project load

Hi Team,

May I know your kind advice on the following issue when I tried to Open the SDK project in SES. I have seen some discussions on line but none of them works for me. I am using Win10 64bit OS. Thanks.

Loading solution at_client.emProject

Executing load commands

cmake -GNinja -DBOARD=nrf9160_pca10090 -DBOARD_DIR=C:/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb -BC:/ncs/nrf/samples/nrf9160/at_client/build -HC:/ncs/nrf/samples/nrf9160/at_client

Project load failed

Reported error: solution load command failed (-1) 

Thanks.

  • It seems that you need to use branch v0.3.0 to be able to use Segger Embedded Studio (SES) with Nordic Connect SDK (NCS). If you want to use SES, I would suggest to checkout this NCS tag. Just follow the commands given in the NCS Getting Started Assistant in nRF Connect for Desktop:

    If you are using the master branch by chance, you will need to follow this documentation here. You'll need to currently build the example via cmake, like shown here:

    cmake -GNinja -DBOARD=nrf9160_pca10090ns ..  

    I would recommend using the v0.3.0 branch & following the NCS Getting Started Guide, as that seems like the easier option currently.

    This note may also be useful:

  • I checked out the tags, the error remains the same. I can compile the project with cmake, but it would be nice to have an IDE. 

  • Hey Guys, Seeing similar behavior as well. I have the latest masters for all repos updated as of 2/22/19

    • Windows 10.
    • SES: V4.14
    • Phyton: 3.7.2
    • GNU Arm Embedded toolchain 7-2018-q2-update also tried q4(latest and no luck)

    Hi Bjorn, Are you seeing these errors as well?

    This is what I am seeing when building solution with SES:

    Building ‘zephyr/include/generated/driver-validation.h’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/include/generated/driver-validation.h’
    Building ‘zephyr/include/generated/kobj-types-enum.h’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/include/generated/kobj-types-enum.h’
    Building ‘zephyr/include/generated/otype-to-str.h’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/misc/generated/syscalls.json’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/misc/generated/syscalls.json’
    Building ‘zephyr/include/generated/syscall_list.h’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/include/generated/syscall_list.h’
    Building ‘zephyr/include/generated/syscall_dispatch.c’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/syscall_macros.h’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/include/generated/syscall_macros.h’
    Building ‘zephyr/include/generated/offsets.h’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/include/generated/offsets.h’
    1> Traceback (most recent call last):
    1> File "C:/Nordic/ncs/zephyr/scripts/gen_offset_header.py", line 72, in <module>
    1> input_file = open(args.input, 'rb')
    1> FileNotFoundError: [Errno 2] No such file or directory: 'C:/Nordic/ncs/nrf/applications/asset_tracker/build/zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj'
    Build failed

    But When I send ninja clean via cmd prompt and then ninja to build the application this is what i see.

    C:\Nordic\ncs\nrf\applications\asset_tracker\build>ninja clean
    [1/1] Cleaning all built files...
    Cleaning... 7 files.

    C:\Nordic\ncs\nrf\applications\asset_tracker\build>ninja
    [15/137] Building C object CMakeFiles/app.dir/src/main.c.obj
    In file included from C:/Nordic/ncs/zephyr/include/sched_priq.h:9:0,
    from C:/Nordic/ncs/zephyr/include/kernel_includes.h:23,
    from C:/Nordic/ncs/zephyr/include/kernel.h:17,
    from C:/Nordic/ncs/zephyr/include/zephyr.h:18,
    from ../src/main.c:7:
    ../src/main.c: In function 'button_handler':
    C:/Nordic/ncs/zephyr/include/misc/util.h:135:22: warning: left shift count is negative [-Wshift-count-negative]
    #define BIT(n) (1UL << (n))
    ^
    ../src/main.c:56:22: note: in expansion of macro 'BIT'
    #define FLIP_INPUT BIT(CONFIG_FLIP_INPUT - 1)
    ^~~
    ../src/main.c:727:57: note: in expansion of macro 'FLIP_INPUT'
    if (IS_ENABLED(CONFIG_ACCEL_USE_SIM) && (has_changed & FLIP_INPUT)) {
    ^~~~~~~~~~
    [47/137] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    FAILED: zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    C:\gnuarmemb\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v1.13.99-ncs1-4489-ga869285d26 -DKERNEL -DNRF9160_XXAA -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR__=1 -IC:/Nordic/ncs/zephyr/kernel/include -IC:/Nordic/ncs/zephyr/arch/arm/include -IC:/Nordic/ncs/zephyr/include -IC:/Nordic/ncs/zephyr/include/drivers -Izephyr/include/generated -IC:/Nordic/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/Nordic/ncs/zephyr/soc/arm/nordic_nrf/include -IC:/gnuarmemb/arm-none-eabi/include -IC:/Nordic/ncs/zephyr/ext/hal/cmsis/Include -IC:/Nordic/ncs/zephyr/ext/hal/nordic/nrfx -IC:/Nordic/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -IC:/Nordic/ncs/zephyr/ext/hal/nordic/nrfx/hal -IC:/Nordic/ncs/zephyr/ext/hal/nordic/nrfx/mdk -IC:/Nordic/ncs/zephyr/ext/hal/nordic/. -IC:/Nordic/ncs/zephyr/subsys/net/lib/sockets/. -IC:/Nordic/ncs/nrf/include -IC:/Nordic/ncs/nrf/ext/cjson/. -IC:/Nordic/ncs/nrf/subsys/net/lib/nrf_cloud/./include -IC:/Nordic/ncs/nrfxlib/bsdlib/include -IC:/Nordic/ncs/nrf/applications/asset_tracker/src -IC:/Nordic/ncs/nrfxlib/crypto/nrf_oberon/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include -isystem c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed -Os -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros C:/Nordic/ncs/nrf/applications/asset_tracker/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main -fno-common -mthumb -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -Wpointer-arith -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj -MF zephyr\CMakeFiles\zephyr.dir\misc\generated\configs.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj -c zephyr/misc/generated/configs.c
    In file included from C:/Nordic/ncs/zephyr/include/toolchain.h:21:0,
    from zephyr/misc/generated/configs.c:3:
    zephyr/misc/generated/configs.c: In function '_ConfigAbsSyms':
    C:/Nordic/ncs/zephyr/include/toolchain/gcc.h:331:51: error: expected expression before ')' token
    "\n\t.type\t" #name ",%%object" : : "n"(~(value)))
    ^
    zephyr/misc/generated/configs.c:18:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
    GEN_ABSOLUTE_SYM(CONFIG_FLIP_INPUT, );
    ^~~~~~~~~~~~~~~~
    C:/Nordic/ncs/zephyr/include/toolchain/gcc.h:331:51: error: expected expression before ')' token
    "\n\t.type\t" #name ",%%object" : : "n"(~(value)))
    ^
    zephyr/misc/generated/configs.c:25:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
    GEN_ABSOLUTE_SYM(CONFIG_TEMP_SIM_BUTTON, );
    ^~~~~~~~~~~~~~~~
    [52/137] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    ninja: build stopped: subcommand failed.

    Then I re-ran in SES and see the following. 

    Building ‘zephyr/include/generated/driver-validation.h’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/kobj-types-enum.h’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/otype-to-str.h’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/misc/generated/syscalls.json’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/syscall_list.h’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/syscall_dispatch.c’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/syscall_macros.h’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/include/generated/offsets.h’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/include/generated/offsets.h’
    Building ‘zephyr/linker.cmd’ from solution ‘build’ in configuration ‘Common’
    1> Combining ‘zephyr/linker.cmd’
    Building ‘app/libapp.a’ from solution ‘build’ in configuration ‘Common’
    Building ‘zephyr/libzephyr.a’ from solution ‘build’ in configuration ‘Common’
    1> Compiling ‘configs.c’
    2> Compiling ‘soc.c’
    3> Compiling ‘mpu_regions.c’
    4> Compiling ‘system_nrf9160.c’
    1> In file included from C:/Nordic/ncs/zephyr/include/toolchain.h:21:0,
    1> from zephyr/misc/generated/configs.c:3:
    1> C:/Nordic/ncs/zephyr/include/toolchain/gcc.h:331:51: error: expected expression before ')' token
    1> zephyr/misc/generated/configs.c:18:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
    1> C:/Nordic/ncs/zephyr/include/toolchain/gcc.h:331:51: error: expected expression before ')' token
    1> zephyr/misc/generated/configs.c:25:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
    Build failed

    It appears there are some known compiler errors with SES when building the solution but if you build the solution using ninja in the build directory using Command prompt after you load the project in ses, it will compile but there are some failures (See above)

    I had it working previously but not sure why this is happening now..I also tried the licence suggestions mentioned here and no luck. 

  • The master's will not work with Segger Embedded Studio. Please roll back to the v0.3.0 tag using:

    Please let us know if it works.

  • I have asked about this internally & will let you know when I receive an update.

Related