Re: build failed due to missing headers


Carles Cufi
 

-----Original Message-----
From: users@... <users@...> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@...>;
users@...
Cc: users@...
Subject: Re: [Zephyr-users] build failed due to missing headers

On 10/4/19 2:07 PM, Cufi, Carles wrote:


On 10/4/19 1:50 PM, Cufi, Carles wrote:
Hi there,

I'm doing (west version is 0.6.2):
west build -b nrf52840_mdk samples/basic/blinky

and got:
...
...
../soc/arm/nordic_nrf/nrf52/soc.h:16:10: fatal error: nrfx.h: No
such file or directory
#include <nrfx.h>
^~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.


Any idea, on what is wrong and how to fix it?
Works fine here, are you sure you ran "west update"?

[...]
Can you try removing the entire
/home/sdalu/Z/zephyrproject/zephyr/build folder and building again? It
might be an issue with stale build files.
Same thing:

$ rm -rf build
$ ~/.local/bin/west -vvv build -b nrf52840_mdk samples/basic/blinky ...
...
../soc/arm/nordic_nrf/nrf52/soc.h:16:10: fatal error: nrfx.h: No such
file or directory
#include <nrfx.h>
^~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.


I attached the full log
Right, but I noticed now that your .zephyrrc ontains:

my ~/.zephyrrc:
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE=/usr/local/gcc-arm-embedded/bin/arm-none-eabi-
export HOSTCC=cc
Could you try using ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb and GNUARMEMB_TOOLCHAIN_PATH=/usr/local/gcc-arm-embedded/ instead?
See here: https://docs.zephyrproject.org/latest/getting_started/toolchain_3rd_party_x_compilers.html#gnu-arm-embedded

I think that cross-compile is valid to use when your toolchain is installed in a certain way (using your distro's package manager?) whereas gnuarmemb is the right one to use when you download the GNU Arm Embedded toolchain and place it somewhere in your disk.

Carles

Join users@lists.zephyrproject.org to automatically receive all group messages.