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

Trouble compiling the Thingy91 samples on linux

Hi,

I'm trying to compile the asset_tracker application and the at_client off the v1.0.0 branch, and I'm getting the error below:

cmedianu@ubuntumisc2:~/ncs/nrf/applications/asset_tracker$ west build -d build_folder/
source directory: /home/cmedianu/ncs/nrf/applications/asset_tracker
build directory: /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder
BOARD: nrf9160_pca10090ns (origin: CMakeCache.txt)
[6/280] Building C object spm/zephyr/CMakeFiles/spm_zephyr.dir/home/cmedianu/ncs/nrf/subsys/spm/spm.c.obj
FAILED: spm/zephyr/CMakeFiles/spm_zephyr.dir/home/cmedianu/ncs/nrf/subsys/spm/spm.c.obj
/home/cmedianu/gcc-arm/bin/arm-none-eabi-gcc -DBUILD_VERSION=v1.14.99-ncs2 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DNRF9160_XXAA -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -I/home/cmedianu/ncs/zephyr/kernel/include -I/home/cmedianu/ncs/zephyr/arch/arm/include -I/home/cmedianu/ncs/zephyr/include -I/home/cmedianu/ncs/zephyr/include/drivers -Ispm/zephyr/include/generated -I/home/cmedianu/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -I/home/cmedianu/ncs/zephyr/soc/arm/nordic_nrf/include -I/home/cmedianu/ncs/zephyr/lib/libc/minimal/include -I/home/cmedianu/ncs/zephyr/ext/hal/cmsis/Include -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx/hal -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx/mdk -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/. -I/home/cmedianu/ncs/nrf/include -I/home/cmedianu/ncs/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -Ispm/zephyr/modules/nrfxlib/nrf_security/include -I/home/cmedianu/ncs/mbedtls/include -I/home/cmedianu/ncs/mbedtls/include/mbedtls -isystem /home/cmedianu/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/include -isystem /home/cmedianu/tools/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/include-fixed -Os -nostdinc -g -imacros /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder/spm/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -mthumb -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/cmedianu/ncs/zephyr=. -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -mcmse -std=c99 -MD -MT spm/zephyr/CMakeFiles/spm_zephyr.dir/home/cmedianu/ncs/nrf/subsys/spm/spm.c.obj -MF spm/zephyr/CMakeFiles/spm_zephyr.dir/home/cmedianu/ncs/nrf/subsys/spm/spm.c.obj.d -o spm/zephyr/CMakeFiles/spm_zephyr.dir/home/cmedianu/ncs/nrf/subsys/spm/spm.c.obj   -c /home/cmedianu/ncs/nrf/subsys/spm/spm.c
In file included from /home/cmedianu/ncs/nrf/subsys/spm/spm.c:20:
/home/cmedianu/ncs/nrf/subsys/spm/spm.c: In function 'spm_jump':
/home/cmedianu/ncs/zephyr/arch/arm/include/cortex_m/tz.h:319:22: error: called object is not a function or function pointer
  ((tz_ns_func_ptr_t)(cmse_nsfptr_create(fptr)))
                      ^~~~~~~~~~~~~~~~~~
/home/cmedianu/ncs/nrf/subsys/spm/spm.c:392:13: note: in expansion of macro 'TZ_NONSECURE_FUNC_PTR_CREATE'
  reset_ns = TZ_NONSECURE_FUNC_PTR_CREATE(vtor_ns[1]);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[11/280] Building C object spm/zephyr/arch/arm/core/CMakeFiles/spm_arch__arm__core.dir/thread_abort.c.obj
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/cmedianu/tools/cmake/bin/cmake --build /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder

When I try to compile it for the Thingy board, I get similar errors:

medianu@ubuntumisc2:~/ncs/nrf/applications/asset_tracker$ west build --board nrf9160_pca20035 -d build_folder/
source directory: /home/cmedianu/ncs/nrf/applications/asset_tracker
build directory: /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder (created)
BOARD: nrf9160_pca20035 (origin: command line)
-- Using application from '/home/cmedianu/ncs/nrf/applications/asset_tracker'
Zephyr version: 1.14.99
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.8", minimum required is "3.4")
-- Selected BOARD nrf9160_pca20035
-- Found west: /home/cmedianu/.local/bin/west (found suitable version "0.6.2", minimum required is "0.5.6")
-- Cache files will be written to: /home/cmedianu/.cache/zephyr
USING OUT OF TREE BOARD
-- Loading /home/cmedianu/ncs/nrf/boards/arm/nrf9160_pca20035/nrf9160_pca20035.dts as base
-- Overlaying /home/cmedianu/ncs/zephyr/dts/common/common.dts
Parsing Kconfig tree in /home/cmedianu/ncs/nrf/applications/asset_tracker/Kconfig
Loading /home/cmedianu/ncs/nrf/boards/arm/nrf9160_pca20035/nrf9160_pca20035_defconfig as base
Merging /home/cmedianu/ncs/nrf/applications/asset_tracker/prj.conf
Configuration written to '/home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder/zephyr/.config'

warning: BSD_LIBRARY (defined at ../nrf/lib/bsdlib/Kconfig:8) has direct dependencies TRUSTED_EXECUTION_NONSECURE with value n, but is currently being y-selected by the following symbols:
 - MODEM_INFO (defined at ../nrf/lib/modem_info/Kconfig:7), with value y, direct dependencies "y" (value: y)
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/cmedianu/gcc-arm/bin/arm-none-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
Including module: nrf in path: /home/cmedianu/ncs/nrf
Including module: nffs in path: /home/cmedianu/ncs/modules/fs/nffs
Including module: segger in path: /home/cmedianu/ncs/modules/debug/segger
Including module: mcuboot in path: /home/cmedianu/ncs/mcuboot/zephyr
Including module: mcumgr in path: /home/cmedianu/ncs/modules/lib/mcumgr
Including module: tinycbor in path: /home/cmedianu/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /home/cmedianu/ncs/nrfxlib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder
[1/156] Preparing syscall dependency handling

[20/156] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
/home/cmedianu/gcc-arm/bin/arm-none-eabi-gcc -DBUILD_VERSION=v1.14.99-ncs2 -DKERNEL -DNRF9160_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR__=1 -I/home/cmedianu/ncs/zephyr/kernel/include -I/home/cmedianu/ncs/zephyr/arch/arm/include -I/home/cmedianu/ncs/zephyr/include -I/home/cmedianu/ncs/zephyr/include/drivers -Izephyr/include/generated -I/home/cmedianu/ncs/zephyr/soc/arm/nordic_nrf/nrf91 -I/home/cmedianu/ncs/zephyr/soc/arm/nordic_nrf/include -I/home/cmedianu/ncs/zephyr/ext/hal/cmsis/Include -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx/drivers/include -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx/hal -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/nrfx/mdk -I/home/cmedianu/ncs/zephyr/ext/hal/nordic/. -I/home/cmedianu/ncs/zephyr/subsys/net/lib/sockets/. -I/home/cmedianu/ncs/nrf/include -I/home/cmedianu/ncs/nrf/ext/cjson/. -I/home/cmedianu/ncs/nrf/lib/at_cmd_parser/include -I/home/cmedianu/ncs/nrf/subsys/net/lib/nrf_cloud/./include -I/home/cmedianu/ncs/nrfxlib/bsdlib/include -I/home/cmedianu/ncs/nrf/applications/asset_tracker/src -isystem /home/cmedianu/gcc-arm/arm-none-eabi/include -Os -g -imacros /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -mthumb -mcpu=cortex-m33 -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/cmedianu/ncs/zephyr=. -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 /home/cmedianu/ncs/zephyr/include/toolchain.h:39,
                 from zephyr/misc/generated/configs.c:7:
zephyr/misc/generated/configs.c: In function '_ConfigAbsSyms':
/home/cmedianu/ncs/zephyr/include/toolchain/gcc.h:341:51: error: expected expression before ')' token
   "\n\t.type\t" #name ",%%object" :  : "n"(~(value)))
                                                   ^
zephyr/misc/generated/configs.c:22:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
 GEN_ABSOLUTE_SYM(CONFIG_FLIP_INPUT, );
 ^~~~~~~~~~~~~~~~
/home/cmedianu/ncs/zephyr/include/toolchain/gcc.h:341:51: error: expected expression before ')' token
   "\n\t.type\t" #name ",%%object" :  : "n"(~(value)))
                                                   ^
zephyr/misc/generated/configs.c:29:1: note: in expansion of macro 'GEN_ABSOLUTE_SYM'
 GEN_ABSOLUTE_SYM(CONFIG_TEMP_SIM_BUTTON, );
 ^~~~~~~~~~~~~~~~
[22/156] Building C object CMakeFiles/app.dir/src/main.c.obj
In file included from /home/cmedianu/ncs/zephyr/include/sched_priq.h:9,
                 from /home/cmedianu/ncs/zephyr/include/kernel_includes.h:23,
                 from /home/cmedianu/ncs/zephyr/include/kernel.h:17,
                 from /home/cmedianu/ncs/zephyr/include/zephyr.h:18,
                 from ../src/main.c:7:
../src/main.c: In function 'button_handler':
/home/cmedianu/ncs/zephyr/include/misc/util.h:136:22: warning: left shift count is negative [-Wshift-count-negative]
 #define BIT(n)  (1UL << (n))
                      ^~
../src/main.c:57:22: note: in expansion of macro 'BIT'
 #define FLIP_INPUT   BIT(CONFIG_FLIP_INPUT - 1)
                      ^~~
../src/main.c:851:57: note: in expansion of macro 'FLIP_INPUT'
  if (IS_ENABLED(CONFIG_ACCEL_USE_SIM) && (has_changed & FLIP_INPUT)) {
                                                         ^~~~~~~~~~
[25/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/cmedianu/tools/cmake/bin/cmake --build /home/cmedianu/ncs/nrf/applications/asset_tracker/build_folder

I actually want to compile it for the thingy.

I get similar errors when I want to compile the at_client.

Any ideas what I'm doing wrong?

Also, how do I start the text based build configuration tool (menuconfig)

Thanks!

gcc version 8.3.1 20190703 (release) [gcc-8-branch revision 273027] (GNU Tools for Arm Embedded Processors 8-2019-q3-update)

ninja 1.9.0

cmake version 3.15.3

West version: v0.6.2

Parents Reply Children
No Data
Related