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

Issue Building Examples for nRF5 SDK for Mesh

I am using version 4.1 of the Mesh SDK and version 16.0.0 of the nRF5 SDK on Windows. I was able to successfully generate the ninja build files using CMake. However, when I run ninja to build the examples it fails on building ASM object. It seems that the assembler is getting called with some invalid options.

CMake Output:

C:\Users\abumbalo\.nrf\nrf5_SDK_for_Mesh_v4.1.0_src\build>cmake -G Ninja -DPLATFORM=nrf52840_xxAA ..
-- Configuring CMake for nRF5 SDK for Bluetooth Mesh 4.1.0
-- Found PythonInterp: C:/Users/abumbalo/AppData/Local/Programs/Python/Python38-32/python.exe (found version "3.8.3")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at CMake/FindSDK.cmake:24 (message):
  Could not find `patch` executable.  Automatic patching of the nRF5 SDK not
  supported.  See for diff to apply.
Call Stack (most recent call first):
  CMakeLists.txt:49 (include)

-- SDK_ROOT=C:/Users/abumbalo/.nrf/nrf5_SDK_for_Mesh_v4.1.0_src/../nRF5_SDK_16.0.0_98a08e2 --- set with default PATH
-- Setting build type to 'RelWithDebInfo' as none was specified.
-- PC-Lint executable not found. Linting disabled.
-- SDK: nRF5_SDK_16.0.0_98a08e2
-- Platform: nrf52840_xxAA
-- Arch: cortex-m4f
-- SoftDevice: s140_7.0.1
-- Board: pca10056
-- The C compiler identification is GNU 9.3.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/arm-none-eabi-as.exe
-- Check for working C compiler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe
-- Check for working C compiler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/9 2020-q2-update/bin/arm-none-eabi-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:110 (message):
  Doxygen not found, documentation build is not available

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/abumbalo/.nrf/nrf5_SDK_for_Mesh_v4.1.0_src/build

Ninja Output:
C:\Users\abumbalo\.nrf\nrf5_SDK_for_Mesh_v4.1.0_src\build>ninja
[66/2229] Building ASM object examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s...ers/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
FAILED: examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
C:\PROGRA~2\GNUARM~1\92020-~1\bin\ARM-NO~3.EXE -DBOARD_PCA10056 -DCONFIG_GPIO_AS_PINRESET -DNRF52840 -DNRF52840_XXAA -DNRF52_SERIES -DNRF_SD_BLE_API_VERSION=7 -DS140 -DSOFTDEVICE_PRESENT -DUSE_APP_CONFIG -I../examples/beaconing/include -I../examples/beaconing/../include -I../examples/common/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../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/bearer/api -I../mesh/bearer/include -I../mesh/gatt/api -I../mesh/gatt/include -I../mesh/friend/api -I../mesh/friend/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/rtt/include -I../external/micro-ecc -I../external/micro-ecc/../../mesh/core/include -O2 -g -DNDEBUG   -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -MD -MT examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj -MF examples\beaconing\CMakeFiles\beaconing_nrf52840_xxAA_s140_7.0.1.dir\C_\Users\abumbalo\.nrf\nRF5_SDK_16.0.0_98a08e2\modules\nrfx\mdk\gcc_startup_nrf52840.S.obj.d -o examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj -c C:/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S
C:\PROGRA~2\GNUARM~1\92020-~1\bin\ARM-NO~3.EXE: unrecognized option `-BOARD_PCA10056'
[79/2229] Building C object examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/__/__/external/app_timer/app_timer_mesh.c.obj
ninja: build stopped: subcommand failed.
I have also attached the build.ninja file that was generated by CMake
Parents
  • Hi,

    Did you follow this documentation when using CMake? Can you try including this command -DTOOLCHAIN=<toolchain>, when you generate the build files in step 1? Does it make any difference?

  • I had no problem building it here. Can you try with a fresh copy of the SDK? 

  • I was able to successfully build the Mesh SDK and all examples in a Debian 10.4 virtual machine using version 7.3.1 of the GNU Arm Embedded Toolchain. I also tried installing the same version of the toolchain in my Windows 10 system but still received the same error as above. , what version of the toolchain are you using?

  • I'm using the one here(9-2020-q2-update), think it is the same one you used above.

  • Yes, that was the same version I used. Can you try building the SDK for Windows 10?

  • Hi,

    I just tested this on Windows 10 and managed to build the examples just fine. Could you try go through the toolchain again and update them?

  • I reinstalled the entire toolchain including CMake and Ninja. There build fails at the same point but the error is slightly different this time. It seems that the Ninja build files being generated by CMake have errors in them.

    [51/2229] Building ASM object examples/beaconing/CMakeFile...16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
    FAILED: examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
    C:\PROGRA~2\GNUARM~1\92020-~1\bin\ARM-NO~3.EXE --defsym BOARD_PCA10056 --defsym CONFIG_GPIO_AS_PINRESET --defsym NRF52840 --defsym NRF52840_XXAA --defsym NRF52_SERIES --defsym NRF_SD_BLE_API_VERSION=7 --defsym S140 --defsym SOFTDEVICE_PRESENT --defsym USE_APP_CONFIG -I../examples/beaconing/include -I../examples/beaconing/../include -I../examples/common/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../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/bearer/api -I../mesh/bearer/include -I../mesh/gatt/api -I../mesh/gatt/include -I../mesh/friend/api -I../mesh/friend/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/rtt/include -I../external/micro-ecc -I../external/micro-ecc/../../mesh/core/include -O2 -g -DNDEBUG -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 --MD examples\beaconing\CMakeFiles\beaconing_nrf52840_xxAA_s140_7.0.1.dir\C_\Users\abumbalo\.nrf\nRF5_SDK_16.0.0_98a08e2\modules\nrfx\mdk\gcc_startup_nrf52840.S.obj.d -o examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj -c C:/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S
    Assembler messages:
    Fatal error: bad defsym; format is --defsym name=value
    [64/2229] Building C object examples/beaconing/CMakeFiles/...xAA_s140_7.0.1.dir/__/__/mesh/core/src/flash_manager.c.obj
    ninja: build stopped: subcommand failed.

Reply
  • I reinstalled the entire toolchain including CMake and Ninja. There build fails at the same point but the error is slightly different this time. It seems that the Ninja build files being generated by CMake have errors in them.

    [51/2229] Building ASM object examples/beaconing/CMakeFile...16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
    FAILED: examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
    C:\PROGRA~2\GNUARM~1\92020-~1\bin\ARM-NO~3.EXE --defsym BOARD_PCA10056 --defsym CONFIG_GPIO_AS_PINRESET --defsym NRF52840 --defsym NRF52840_XXAA --defsym NRF52_SERIES --defsym NRF_SD_BLE_API_VERSION=7 --defsym S140 --defsym SOFTDEVICE_PRESENT --defsym USE_APP_CONFIG -I../examples/beaconing/include -I../examples/beaconing/../include -I../examples/common/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../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/bearer/api -I../mesh/bearer/include -I../mesh/gatt/api -I../mesh/gatt/include -I../mesh/friend/api -I../mesh/friend/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/rtt/include -I../external/micro-ecc -I../external/micro-ecc/../../mesh/core/include -O2 -g -DNDEBUG -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 --MD examples\beaconing\CMakeFiles\beaconing_nrf52840_xxAA_s140_7.0.1.dir\C_\Users\abumbalo\.nrf\nRF5_SDK_16.0.0_98a08e2\modules\nrfx\mdk\gcc_startup_nrf52840.S.obj.d -o examples/beaconing/CMakeFiles/beaconing_nrf52840_xxAA_s140_7.0.1.dir/C_/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj -c C:/Users/abumbalo/.nrf/nRF5_SDK_16.0.0_98a08e2/modules/nrfx/mdk/gcc_startup_nrf52840.S
    Assembler messages:
    Fatal error: bad defsym; format is --defsym name=value
    [64/2229] Building C object examples/beaconing/CMakeFiles/...xAA_s140_7.0.1.dir/__/__/mesh/core/src/flash_manager.c.obj
    ninja: build stopped: subcommand failed.

Children
Related