Re: getting started setting up Zephyr build environment on Ubuntu...errors

Carles Cufi

Hi Eric,


Building DTC from source is relatively simple.


$ git clone

$ cd dtc

$ make

$ make install




From: <users@...> on behalf of Andy Ross <andrew.j.ross@...>
Date: Saturday, 10 November 2018 at 16:32
To: Eric <ericmdwest@...>, "users@..." <users@...>
Subject: Re: [Zephyr-users] getting started setting up Zephyr build environment on Ubuntu...errors


So... the specific error you're getting is that the DeviceTree compiler on your build host is a bit stale.  But more broadly you're trying to build on a ARM host, and we don't have ARM binaries for the SDK.   Building with a custom toolchain is possible (I mean in theory the host gcc is probably on a Pi distro is probably configured with everything you need), but nontrivial and probably not a good fit for someone who doesn't want to learn about Zephyr or the toolchain.


On 11/9/2018 11:13 PM, Eric wrote:

I'm completely new to Zephyr.  I want to make bluetooth mesh projects for Nordic nRF52840.  I'm going through the Getting Started guide, and (typical of how these things go) I'm getting errors not covered in the guide.

When I used mbed, this isn't a problem.  I just log in online, import someone's mbed project, compile, and use OpenOCD on a Raspberry Pi to load the firmware onto a nRF51822.

Is there a Raspberry Pi image that has everything setup and ready for you to just build binaries?  I think there are many in my situation - no interest in the build system, I'm just copying and pasting the instructions and hoping it works.  What I'm really interested in is learning about Bluetooth mesh, not Zephyr, or Eclipse, or any of the toolchain.  The getting started process isn't very valuable for me.  Is there an easier way?

I'm on Ubuntu 18.04 running on an Odroid xU4.  The reason I'm using this SBC is so I can make an image of the eMMc when it's all setup and I hope I won't have to go through this again.  And other people can spend $110 on the Odroid xU4 and just download the image and also be on their way in less than 10 minutes.  Totally worth it.

Here's my error.  I'm at the step of building the hello world for Arduino.  It saids my dtc version is too old.  But I don't know how to solve that.  apt-get tells me that the version 1.4.5-3 is the latest already (yes, I've updated).  I can't find a ready made pre-compiled updated DTC for the ODroid xu4.

odroid@odroid:~/zephyr$ cd zephyr/odroid@odroid:~/zephyr/zephyr$ lsCMakeLists.txt    LICENSE     boards   ext      samples  version.h.inCODEOWNERS        Makefile    cmake    include  scripts  zephyr-env.cmdCONTRIBUTING.rst  README.rst  doc      kernel   soc      zephyr-env.shKconfig           VERSION     drivers  lib      subsysKconfig.zephyr    arch        dts      misc     testsodroid@odroid:~/zephyr/zephyr$ source zephyr-env.shodroid@odroid:~/zephyr/zephyr$ cd samples/hello_worldodroid@odroid:~/zephyr/zephyr/samples/hello_world$ lsCMakeLists.txt  README.rst  prj.conf  sample.yaml  srcodroid@odroid:~/zephyr/zephyr/samples/hello_world$ mkdir build && cd buildodroid@odroid:~/zephyr/zephyr/samples/hello_world/build$ lsodroid@odroid:~/zephyr/zephyr/samples/hello_world/build$ cmake -GNinja -DBOARD=arduino_101 ..-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.6", minimum required is "3.4") -- Selected BOARD arduino_101Zephyr version: 1.13.99CMake Error at /home/odroid/zephyr/zephyr/cmake/extensions.cmake:1076 (message):  Assertion failed: The detected dtc version is unsupported.       The version was found to be 1.4.5       But the minimum supported version is 1.4.6       See       for how to use the SDK's dtc alongside a custom toolchain.Call Stack (most recent call first):  /home/odroid/zephyr/zephyr/cmake/host-tools.cmake:24 (assert)  /home/odroid/zephyr/zephyr/cmake/app/boilerplate.cmake:270 (include)  CMakeLists.txt:3 (include)-- Configuring incomplete, errors occurred!odroid@odroid:~/zephyr/zephyr/samples/hello_world/build$ ninjaninja: error: loading '': No such file or directoryodroid@odroid:~/zephyr/zephyr/samples/hello_world/build$ lsCMakeCache.txt  CMakeFilesodroid@odroid:~/zephyr/zephyr/samples/hello_world/build$


Join to automatically receive all group messages.