This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

west builds a build.ninja with errors?

Hello!

First of all, thank you for your support.

I'm starting to develop firmware for Nordic chips (I'm a complete newbie). I have been able to compile and download examples on my nRF 52840 DK, but when I'm trying to develop for a custom nRF52811 board, I get an error when building a sample code:

> Executing task: nRF Connect: Dynamic Build Task <

Building ble_app_uart
west build --build-dir d:\nrfsrc\nrf52811-ble-long-range-demo-master\ble_app_uart\build d:\nrfsrc\nrf52811-ble-long-range-demo-master\ble_app_uart --pristine --board nrf52840dk_nrf52811 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="d:/nrfsrc/parche_frank_52811;d:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart" -DCONF_FILE:STRING="d:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/prj.conf"

-- west build: generating a build system
Including boilerplate (Zephyr base): D:/ncs/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart
-- Zephyr version: 2.7.99 (D:/ncs/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: D:/ncs/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52811
-- Cache files will be written to: D:/ncs/v1.9.1/zephyr/.cache
-- Found dtc: D:/ncs/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (d:/ncs/v1.9.1/toolchain/opt)
-- Found BOARD.dts: D:/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52811/nrf52840dk_nrf52811.dts
-- Generated zephyr.dts: D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build/zephyr/dts.cmake
Parsing D:/ncs/v1.9.1/zephyr/Kconfig
Loaded configuration 'D:/ncs/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52811/nrf52840dk_nrf52811_defconfig'
Merged configuration 'd:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/prj.conf'
Configuration saved to 'D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build/zephyr/.config'
Kconfig header saved to 'D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/ncs/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nrfsrc/nrf52811-ble-long-range-demo-master/ble_app_uart/build
-- west build: building application
ninja: error: d:\nrfsrc\nrf52811-ble-long-range-demo-master\ble_app_uart\build\build.ninja:142: expected '=', got newline
RF
^ near here
FATAL ERROR: command exited with status 1: 'd:\ncs\v1.9.1\toolchain\opt\bin\cmake.EXE' --build 'd:\nrfsrc\nrf52811-ble-long-range-demo-master\ble_app_uart\build'

As I don't generate the build.ninja, could it be an error in west? Or is it a mistake in one of my configuration files?

My development setup:

- Visual Studio Code on Windows with nRF Connect plugin installed.

- nRF52840 DK

Thank you again,

David.

  • Hi David,

    I see that your project is called nrf52811-ble-long-range-demo-master. Is this the nRF52811 long range demo by Jimmy Wong, https://github.com/jimmywong2003/nrf52811-ble-long-range-demo?

    This is an example based on nRF5 SDK. However, the nRF Connect for VS Code extension, as well as using west to build, is only supported in nRF Connect SDK. We have a blog post explaining the differences between the two here: nRF Connect SDK and nRF5 SDK statement.

    Since you are new to Nordic I recommend going through the nRF Connect SDK Tutorial series, This is for nRF Connect SDK v1.5.0, and the latest release is v1.9.1, so some of the information might be outdated, but it does a good job of explaining how to get started and to explain the different concepts in nRF Connect SDK. I also recommend looking at our nRF Connect for VS Code tutorials on YouTube since you are using the VS Code extension. If you want to test out some examples for nRF52811 you can find documentation for all of our official examples in the nRF Connect SDK here: nRF Connect SDK » Samples

    Best regards,

    Marte

  • Hi Marte:

    Thank you for your reply.

    - Yes, it's that code from Jimmy Wong.

    - I already watched the VS Code tutorials in YouTube (very good, by the way).

    - I have read some documents about nRF Connect SDK, but I will review the tutorial series you recommend.

    - About your official examples, I have tried some of them, but my impression was that including Zephyr made almost impossible to develop an application with BT for 82411, that's why I searched for something like Jimmy Wong's code.

    I will study more :) and will come back if I hace more doubts (sure I will).

    Best regards,

    David.

  • Hi David,

    Several of the examples have the option to build the sample with minimum configuration to reduce code size and RAM usage in order to support nRF52810 and nRF52811. If this is supported in a sample there will be a section called 'Minimal build' in the sample's documentation explaining how to enable this, such as in the Peripheral LBS sample: Peripheral LBS » Minimal build.

    Best regards,

    Marte

  • Thank you, Marte. Just one more question: if I want to use Jimmy Wong's code, what should I do? I assumed that creating a Cmake file would suffice, but I got this error. What else do I have to do?

  • Hi,

    You will need to use nRF5 SDK instead. This is not recommended for new development, as nRF5 SDK is in maintenance mode, which  you can read about in the statement regarding nRF Connect SDK and nRF5 SDK that I linked to earlier. 

    If you still want to test it you need to install nRF5 SDK and corresponding tools. I would recommend following the Getting started with nRF5 SDK and SES (nRF51 & nRF52 Series) guide. You should also be aware that the latest version of nRF5 SDK is v17.1.0, but the example by Jimmy Wong is based on v15.3.

    Best regards,

    Marte

Related