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

Parents
  • Hi Jan Ove,

    I will be looking into your case this afternoon.

    Best regards,

    Håkon

  • 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?

Reply
  • 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?

Children
  • 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?

  • No.
    I did not do anything but install Linux and then Zephyr according to the installation procedure at the Zephyr site. When I try something new, I like to make it as clean as possible.

  • Thank you for getting back quickly.

    I just had a brief chat with the team. One suggestion/recommendation was to try the latest tagged release of the SDK, v2.4.0.

  • I had the latest release installed (at least I thought so), I tried to update it, in every way I could think of.
    Nothing helped.
    I then made a new Zephyr install on a different PC (with the same OS). This worked as it should.
    I then copied the "~/zephyrproject/zephyr" directory from the new Zephyr installation to the PC with the faulty installation. And after that the "nrf52dk_nrf52832target" worked as it should.
    I have no idea of what might have gone wrong, but it seems like all is OK now.

    So now I can start on what I wanted to do with Zephyr:
    Get the "zephyr/samples/lorawan/class_a/" to compile for the "nrf52dk_nrf52832target".

    What do I have to change to achieve this?

    I do not expect it to work, but if I can get it to compile, I can then start with the configuration and "twisting" to, hopefully, get it to run on nrf52832.
    I think I know enough about LoRaWan and nrf52832 to manage this, but I do NOT know much about Zephyr.
    So a little help to get this started would be nice.

    I think it should be easier to get the LoRaWan Stack run on Zephyr, then it was to get LoRaWan run on "bare metal" nrf52832 (with my tiny little "jos").
    But I need a decent starting point.
    I have done a lot of work to get this far with LoRawan and nrf52832, and if I can get it to run with Zephyr, this should be a BIG step forward with my project.

    I know that all I want and need is already in place in mbed, but I do not know much about mbed either. But the little I have seen from both mbed and Zephyr, I think Zephyr is far closer to what I feel comfortable with. But sadly, it have little support for LoRaWan.

  • Good to hear that you are now able to build without any errors. However, I do not know exactly what may have caused the error. One thing you could try though is to compare the .dts files from your working and non-working installation folders (/home/joe/zephyrproject/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts). Like suggested by Eirik Aanonsen, there might be a clue in this file. When I insert a syntax error myself in this file I see a similar error as you do in the output.

    In general it is recommended to work on the latest tagged release(at the moment v1.4.0), and only work on the master branch when specific new features are to be explored.

    I will get back to you regarding the new topic, LoRaWan.

Related