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

Board: nrf52dk_nrf52832 Do not work with Zephyr

I want to try Zephyr on the nrf52dk_nrf52832. (PCA10040)

I can not get it to work.

If I try to use -DBOARD=nrf52dk_nrf52810 All is OK

Here is what I do:

cd ~/zephyr_test/hello_world
mkdir _bld; cd _bld
cmake -DBOARD=nrf52dk_nrf52810 ..

The Output is:

Including boilerplate (Freestanding): /home/joe/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/joe/zephyr_test/hello_world
-- Zephyr version: 2.4.99 (/home/joe/zephyrproject/zephyr)
-- Found Python3: /usr/bin/python3.7 (found suitable exact version "3.7.3") found components:  Interpreter  
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52810
-- Cache files will be written to: /home/joe/.cache/zephyr
ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found toolchain: zephyr (/home/joe/zephyr-sdk-0.11.4)
-- Found dtc: /home/joe/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/joe/zephyrproject/zephyr/boards/arm/nrf52dk_nrf52810/nrf52dk_nrf52810.dts
-- Generated zephyr.dts: /home/joe/zephyr_test/hello_world/_bld/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/joe/zephyr_test/hello_world/_bld/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/joe/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/joe/zephyrproject/zephyr/boards/arm/nrf52dk_nrf52810/nrf52dk_nrf52810_defconfig'
Merged configuration '/home/joe/zephyr_test/hello_world/prj.conf'
Configuration saved to '/home/joe/zephyr_test/hello_world/_bld/zephyr/.config'
Kconfig header saved to '/home/joe/zephyr_test/hello_world/_bld/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/joe/zephyr-sdk-0.11.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joe/zephyr_test/hello_world/_bld

I then run make and all is OK.

Than (in another terminal window):
minicom -D /dev/ttyACM0 -b 115200

I'm Flashing the board:
nrfjprog -f nrf52 --program ./zephyr/zephyr.hex --sectorerase
And reset it:
nrfjprog -f nrf52 --reset

In minicom I get:
*** Booting Zephyr OS build zephyr-v2.4.0-1657-g5a58ad508cb3  ***
Hello World! nrf52dk_nrf52810

So far All is OK.

*****************

I then do:
rm -r *
cmake -DBOARD=nrf52dk_nrf52832 ..

And The Output is:

Including boilerplate (Freestanding): /home/joe/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/joe/zephyr_test/hello_world
-- Zephyr version: 2.4.99 (/home/joe/zephyrproject/zephyr)
-- Found Python3: /usr/bin/python3.7 (found suitable exact version "3.7.3") found components:  Interpreter  
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52832
-- Cache files will be written to: /home/joe/.cache/zephyr
ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found toolchain: zephyr (/home/joe/zephyr-sdk-0.11.4)
-- Found dtc: /home/joe/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/joe/zephyrproject/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
Error: nrf52dk_nrf52832.dts.pre.tmp:415.3-4 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at /home/joe/zephyrproject/zephyr/cmake/dts.cmake:206 (message):
 command failed with return code: 1
Call Stack (most recent call first):
 /home/joe/zephyrproject/zephyr/cmake/app/boilerplate.cmake:589 (include)
 /home/joe/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
 /home/joe/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:102 (include_boilerplate)
 CMakeLists.txt:5 (find_package)


****** And this is the end of the show ******

What is wrong?

Same Error with samples/basic/blinky   and   samples/bluetooth/beacon (the one I tested).
Guess it is the same with ALL "samples" that use "nrf52dk_nrf52832",
When I test with "nrf52dk_nrf52810", it is OK

  • Hi Jan Ove,

    I will be looking into your case this afternoon.

    Best regards,

    Håkon

  • Hi

    Found BOARD.dts: /home/joe/zephyrproject/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
    Error: nrf52dk_nrf52832.dts.pre.tmp:415.3-4 syntax error

    Your board has not a compatible configuration/dts but if you look at file: *build directory/zephyr/ nrf52dk_nrf52832.dts.pre.tmp 

    And the look at line number 415 you might find some hint to what is wrong. My first guess is that you have changed somthing in the original dts file that makes it fail since it fails on multiple projects.

    If you find the error correct the file in: 

    source_Code_Compoiling_ZephyrFrom\zephyr\boards\arm\nrf52dk_nrf52832/nrf52dk_nrf52832.dts

    Unless you have your own board setup files in your project?

    Happy hunting.

  • Hi Jan Ove,

    Sorry for keeping you waiting. Is it possible that you have several versions of Zephyr installed, and that some of the tools are referencing one version and some are referencing another version. Are you able to install Toolchain Manager? If so, and you then run into problems, it will be easier for us to reproduce the error.

    Building for both nrf52dk_nrf52832 and nrf52_nrf52832 works here.

    Håkon

  • Hi,

    The installation of Zephyr was the first installation I did on a newly, from scratch, installed mx_Linux (mxlinux.org/.../).
    Everything I try on this
    Zephyr installation works, except the nrf52dk_nrf52832target.

    I have ported the Semtech LoRaWan Stack to nRF52832 running my own OS (jos). The stack and jos seems stable, and I now I want to have BLE running together with the LoRaWan Stack.
    I see that there is a port of
    the LoRaWan Stack to Zephyr (although it is quite fresh), and I thought it wold be a better alternative using this, than trying to use BLE on jos.
    But it all falls apart when I try run "blinky" on the
    nrf52dk_nrf52832target.

    But, what I really NEED is to have the "/home/joe/zephyrproject/zephyr/samples/lorawan/class_a/" run on the nrf52dk_nrf52832target.
    I do:
    cmake -DBOARD=96b_wistrio ..
    make
        On the /zephyr/samples/lorawan/class_a/build
    And all is OK.

    Is it possible to get some help to get the "zephyr/samples/lorawan/class_a/" run on the nrf52dk_nrf52832target?
    What do I need to change to get it to compile?
    And again, how to get BLINKY work on the nrf52dk_nrf52832target?

  • Thank you for the update. Not everyone their own OS.

    I am investigating a few ideas here. However, let us start ruling out an easy one: Have you by any chance moved the Zephyr SDK after installing it?

Related