Re: build failed due to missing headers


Bolivar, Marti
 

"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@...> writes:

On 10/4/19 5:38 PM, Stephane D'Alu wrote:
On 10/4/19 5:09 PM, Cufi, Carles wrote:


-----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.

~/.zypherrc is now:
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/usr/local/gcc-arm-embedded
export HOSTCC=cc


I removed the build directory, started a new session so that env is
correctly loaded with new values



Same error :(
Note also, that I'm on freebsd, that's shouldn't impact the way build is
working, but perhaps something is not done correctly in west ?
Can you check for a line like this in build/zephyr_modules.txt?

$ grep nordic build/zephyr_modules.txt
"nordic":"/home/mbolivar/zp/modules/hal/nordic"

You can also try running "west list -f {abspath} hal_nordic" to see if
the module is found by west on your system. If not, that is in fact the
problem. If so, it's an issue higher up in the stack.

Marti




--
Stephane D'Alu -- Ingenieur Recherche
Laboratoire CITI / INSA-Lyon
Tel: +33 47243 8925

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