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

build mesh example failed

Hello

I meet a build problem, could any one help me solve this? 

Mesh build enviorment: ubuntu + cmake 

build command:
cmake --build /home/yuguorong/work/nordicMesh/build --config Debug --target light_switch_client_nrf52832_xxAA_s132_7.0.1 -- -j 4

The error information:
[build] [ 28%] Building C object examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/__/__/__/mesh/core/src/flash_manager_defrag.c.obj
[build] /tmp/ccqaNgrN.s: Assembler messages:
[build] /tmp/ccqaNgrN.s:398: Error: invalid constant (dead) after fixup
[build] examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/build.make:309: recipe for target 'examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/__/__/common/src/app_error_weak.c.obj' failed
[build] make[3]: *** [examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/__/__/common/src/app_error_weak.c.obj] Error 1
[build] make[3]: *** Waiting for unfinished jobs....
[build] CMakeFiles/Makefile2:4140: recipe for target 'examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/all' failed
[build] make[2]: *** [examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/all] Error 2
[build] CMakeFiles/Makefile2:4152: recipe for target 'examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/rule' failed
[build] Makefile:1171: recipe for target 'light_switch_client_nrf52832_xxAA_s132_7.0.1' failed
[build] make[1]: *** [examples/light_switch/client/CMakeFiles/light_switch_client_nrf52832_xxAA_s132_7.0.1.dir/rule] Error 2
[build] make: *** [light_switch_client_nrf52832_xxAA_s132_7.0.1] Error 2
[build] Build finished with exit code 2

  • build with nijia also meet same problem. 

    ~/work/mesh/build$ ninja light_switch_server_nrf52840_xxAA_s140_7.0.1
    [37/124] Building C object examples/light_switch/server/CMakeFiles/light_switch_server_nrf52840_xxAA_s140_7.0.1.dir/__/__/common/src/app_error_weak.c.obj
    FAILED: /usr/local/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc -DBOARD_PCA10056 -DCONFIG_APP_IN_CORE -DCONFIG_GPIO_AS_PINRESET -DNRF52840 -DNRF52840_XXAA -DNRF52_SERIES -DNRF_SD_BLE_API_VERSION=7 -DS140 -DSOFTDEVICE_PRESENT -DUSE_APP_CONFIG -I../examples/light_switch/server/include -I../examples/light_switch/server/../include -I../examples/common/include -I../external/rtt/include -I../../nRF5_SDK_16.0.0_98a08e2/components/ble/common -I../../nRF5_SDK_16.0.0_98a08e2/components/softdevice/common -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/strerror -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/atomic -I../models/foundation/config/include -I../models/foundation/health/include -I../models/model_spec/generic_onoff/include -I../models/model_spec/common/include -I../mesh/friend/api -I../mesh/friend/include -I../mesh/bearer/api -I../mesh/bearer/include -I../mesh/stack/api -I../mesh/core/api -I../mesh/core/include -I../mesh/access/api -I../mesh/access/include -I../mesh/dfu/api -I../mesh/dfu/include -I../mesh/prov/api -I../mesh/prov/include -I../mesh/gatt/api -I../mesh/gatt/include -I../../nRF5_SDK_16.0.0_98a08e2/components/softdevice/s140/headers -I../../nRF5_SDK_16.0.0_98a08e2/components/softdevice/s140/headers/nrf52 -I../../nRF5_SDK_16.0.0_98a08e2/modules/nrfx -I../../nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk -I../../nRF5_SDK_16.0.0_98a08e2/modules/nrfx/hal -I../../nRF5_SDK_16.0.0_98a08e2/components/toolchain/cmsis/include -I../../nRF5_SDK_16.0.0_98a08e2/components/toolchain/gcc -I../../nRF5_SDK_16.0.0_98a08e2/components/toolchain/cmsis/dsp/GCC -I../../nRF5_SDK_16.0.0_98a08e2/components/boards -I../../nRF5_SDK_16.0.0_98a08e2/integration/nrfx -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/util -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/timer -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/log -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/log/src -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/experimental_section_vars -I../../nRF5_SDK_16.0.0_98a08e2/components/libraries/delay -I../external/micro-ecc -I../external/micro-ecc/../../mesh/core/include --std=gnu99 -Wall -Wno-attributes -Wno-format -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -Og -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -MD -MT examples/light_switch/server/CMakeFiles/light_switch_server_nrf52840_xxAA_s140_7.0.1.dir/__/__/common/src/app_error_weak.c.obj -MF examples/light_switch/server/CMakeFiles/light_switch_server_nrf52840_xxAA_s140_7.0.1.dir/__/__/common/src/app_error_weak.c.obj.d -o examples/light_switch/server/CMakeFiles/light_switch_server_nrf52840_xxAA_s140_7.0.1.dir/__/__/common/src/app_error_weak.c.obj -c ../examples/common/src/app_error_weak.c
    /tmp/ccjiKHUR.s: Assembler messages:
    /tmp/ccjiKHUR.s:400: Error: invalid constant (dead) after fixup
    [37/124] Building C object examples/light_switch/server/CMakeFiles/light_switch_server_nrf52840_xxAA_s140_7.0.1.dir/__/__/__/mesh/core/src/aes.c.obj
    ninja: build stopped: subcommand failed.

  • Test passed with sgs embed studio at local host. but we need a remote shell tools for build project. what's wrong????

  • Hi,

    What version of the GNU ARM Embedded Toolchain are you using? nRF5 SDK for Mesh v4.2.0 is tested with 9-2019-q4-major (9.2.1).

    Have you followed the Generating Ninja or make build files section of the "Building the mesh stack and examples" documentation? What is the log output you get from that?

    Regards,
    Terje

  • My gcc version is: gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2

    My building is strictly following  Generating Ninja or make build files section steps.

    source ~/work/tools/virtualenvs/mesh/bin/activate

    ~/work/mesh/build$ cmake -G Ninja -DGENERATE_SES_PROJECTS=ON -DTOOLCHAIN=gccarmemb -DPLATFORM=nrf52840_xxAA -DSOFTDEVICE=s140_7.0.1 ..

Related