Date   

Re: build failed due to missing headers

Lawrence King
 

Hi Stephane:

Charles and I went through the Getting Started guide a month or so ago, getting ~/.local/bin into the path was one of thing I had tripped over, and we made sure it was in the getting started guide, normally west is installed in ~/.local/bin/west and we made sure you put this in your path. See: https://docs.zephyrproject.org/latest/getting_started/index.html#install-host-dependencies

Lawrence King
Principal Developer
+1(416)627-7302

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On Behalf Of Stephane D'Alu
Sent: Friday, October 4, 2019 2:58 PM
To: Bolivar, Marti <marti.bolivar@nordicsemi.no>; Cufi, Carles <Carles.Cufi@nordicsemi.no>; users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] build failed due to missing headers

On 10/4/19 8:35 PM, Bolivar, Marti wrote:
"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> writes:

On 10/4/19 7:52 PM, Bolivar, Marti wrote:
"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> 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@lists.zephyrproject.org
<users@lists.zephyrproject.org> On Behalf Of Stephane D'Alu via
Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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_3
rd_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"
don't have such file
That's your problem, then. If you're doing a pristine build and the
build system finds west on PATH, it ought to be generating this file.

Looking at your full log, I see:

-- Selected BOARD nrf52840_mdk
-- Loading
/home/sdalu/Z/zephyrproject/zephyr/boards/arm/nrf52840_mdk/nrf52840_md
k.dts
as base

On my system, I get:

-- Selected BOARD nrf52840_pca10056
-- Found west: /home/mbolivar/.virtualenvs/west-dev/bin/west (found
suitable version "0.6.99", minimum required is "0.6.0")
-- Loading
/home/mbolivar/zp/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca1005
6.dts as base

Note "Found west" appears in my output, but not yours.

Can you please make sure 'west' is on PATH and try again with a
pristine build directory?
You got it! That was related to west not being in the PATH.
It is now compiling fine, thanks


Perhaps it could be usefudl for other to add a note in the getting started guide, that west must be accessible using PATH


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


Re: build failed due to missing headers

Stephane D'Alu
 

On 10/4/19 8:35 PM, Bolivar, Marti wrote:
"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> writes:

On 10/4/19 7:52 PM, Bolivar, Marti wrote:
"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> 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@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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"
don't have such file
That's your problem, then. If you're doing a pristine build and the build
system finds west on PATH, it ought to be generating this file.
Looking at your full log, I see:
-- Selected BOARD nrf52840_mdk
-- Loading
/home/sdalu/Z/zephyrproject/zephyr/boards/arm/nrf52840_mdk/nrf52840_mdk.dts
as base
On my system, I get:
-- Selected BOARD nrf52840_pca10056
-- Found west: /home/mbolivar/.virtualenvs/west-dev/bin/west (found suitable version "0.6.99", minimum required is "0.6.0")
-- Loading /home/mbolivar/zp/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts as base
Note "Found west" appears in my output, but not yours.
Can you please make sure 'west' is on PATH and try again with a pristine
build directory?
You got it! That was related to west not being in the PATH.
It is now compiling fine, thanks


Perhaps it could be usefudl for other to add a note in the getting started guide, that west must be accessible using PATH


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


Re: build failed due to missing headers

Bolivar, Marti
 

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

On 10/4/19 7:52 PM, Bolivar, Marti wrote:
"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> 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@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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"
don't have such file
That's your problem, then. If you're doing a pristine build and the build
system finds west on PATH, it ought to be generating this file.

Looking at your full log, I see:

-- Selected BOARD nrf52840_mdk
-- Loading
/home/sdalu/Z/zephyrproject/zephyr/boards/arm/nrf52840_mdk/nrf52840_mdk.dts
as base

On my system, I get:

-- Selected BOARD nrf52840_pca10056
-- Found west: /home/mbolivar/.virtualenvs/west-dev/bin/west (found suitable version "0.6.99", minimum required is "0.6.0")
-- Loading /home/mbolivar/zp/zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts as base

Note "Found west" appears in my output, but not yours.

Can you please make sure 'west' is on PATH and try again with a pristine
build directory?


sdalu@hyperion:~/Z/zephyrproject$ find . -name 'zephyr_modules.txt'
// no files reported //




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.
Guessing that abspath is ~/Z/zephyrproject in my case ?
I really meant to copy paste that exact string, hehe.

The -f option is a (python) format string specifier, and {abspath} means
"put the absolute path of the project here". The default -f is
"{name:12} {path:28} {revision:40} {url}", which is more information
than we need here, so I was suggesting a shorter command that would get
to the heart of the issue (as the build system runs plain "west list -f
{abspath}" to print the absolute paths of all the projects in the
manfiest).

You can see 'west list -h' for more details.


$ ~/.local/bin/west list -f ~/Z/zephyrproject/ hal_nordic
/home/sdalu/Z/zephyrproject/
This is equivalent to "echo ~/Z/zephyrproject/", so it's not quite
helpful here.

Thanks!
Marti



in ~/Z/zephyrproject, I have a modules directory with nordic files
$ ls modules/hal/nordic
CMakeLists.txt nrfx_config_nrf52811.h nrfx_glue.c
drivers nrfx_config_nrf52832.h nrfx_glue.h
nrfx nrfx_config_nrf52840.h nrfx_log.h
nrfx_config_nrf51.h nrfx_config_nrf9160.h zephyr
nrfx_config_nrf52810.h nrfx_config.h




Marti




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


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


Re: build failed due to missing headers

Stephane D'Alu
 

On 10/4/19 7:52 PM, Bolivar, Marti wrote:
"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> 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@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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"
don't have such file

sdalu@hyperion:~/Z/zephyrproject$ find . -name 'zephyr_modules.txt'
// no files reported //




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.
Guessing that abspath is ~/Z/zephyrproject in my case ?

$ ~/.local/bin/west list -f ~/Z/zephyrproject/ hal_nordic
/home/sdalu/Z/zephyrproject/


in ~/Z/zephyrproject, I have a modules directory with nordic files
$ ls modules/hal/nordic
CMakeLists.txt nrfx_config_nrf52811.h nrfx_glue.c
drivers nrfx_config_nrf52832.h nrfx_glue.h
nrfx nrfx_config_nrf52840.h nrfx_log.h
nrfx_config_nrf51.h nrfx_config_nrf9160.h zephyr
nrfx_config_nrf52810.h nrfx_config.h



Marti




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


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


Re: build failed due to missing headers

Bolivar, Marti
 

"Stephane D'Alu via Lists.Zephyrproject.Org"
<stephane.dalu=insa-lyon.fr@lists.zephyrproject.org> 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@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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


Re: build failed due to missing headers

Stephane D'Alu
 

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@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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 ?



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


Re: build failed due to missing headers

Stephane D'Alu
 

On 10/4/19 5:09 PM, Cufi, Carles wrote:

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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 :(



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


Re: build failed due to missing headers

Carles Cufi
 

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Stephane D'Alu via Lists.Zephyrproject.Org
Sent: 04 October 2019 14:48
To: Cufi, Carles <Carles.Cufi@nordicsemi.no>;
users@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
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


Re: build failed due to missing headers

Stephane D'Alu
 

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


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


Re: build failed due to missing headers

Carles Cufi
 

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"?
yeap.

nrxf.h exist in modules directory but doesn't seems to be picked up:

sdalu@hyperion:~/Z/zephyrproject$ find . -name 'nrfx.h'
./modules/lib/openthread/third_party/NordicSemiconductor/nrfx/nrfx.h
./modules/hal/nordic/nrfx/nrfx.h


re-run west update:
=== updating hal_atmel (modules/hal/atmel):
--- hal_atmel: checked out 04ff67a0826a51041e51034faf8fc4d3eeacd846 as
detached HEAD === updating ci-tools (tools/ci-tools):
--- ci-tools: checked out e01f3bce2a94847253369efb9a081f5c0e9ec882 as
detached HEAD === updating civetweb (modules/lib/civetweb):
--- civetweb: checked out 99129c5efc907ea613c4b73ccff07581feb58a7a as
detached HEAD === updating esp-idf (modules/hal/esp-idf):
--- esp-idf: checked out 6835bfc741bf15e98fb7971293913f770df6081f as
detached HEAD === updating fatfs (modules/fs/fatfs):
--- fatfs: checked out df96914dd989907f3a5de4cb95b116c2f305820d as
detached HEAD === updating hal_cypress (modules/hal/cypress):
--- hal_cypress: checked out a12d92816a53a521d79cefcf5c38b9dc8a4fed6e as
detached HEAD === updating hal_nordic (modules/hal/nordic):
--- hal_nordic: checked out 1b14177ff2176a1d17f3dd5e7e217f44337255db as
detached HEAD === updating hal_openisa (modules/hal/openisa):
--- hal_openisa: checked out be5c01f86c96500def5079bcc58d2baefdffb6c8 as
detached HEAD === updating hal_microchip (modules/hal/microchip):
--- hal_microchip: checked out 85302959c0c659311cf90ac51d133e5ce19c9288
as detached HEAD
=== updating hal_silabs (modules/hal/silabs):
--- hal_silabs: checked out 9151e614c23997074acd1096a3e8a9e5c255d5b9 as
detached HEAD === updating hal_st (modules/hal/st):
--- hal_st: checked out 0ec40aed8087f26bd9ac1b70fb5a6c326a6451aa as
detached HEAD === updating hal_stm32 (modules/hal/stm32):
--- hal_stm32: checked out 272281a1990ec7097f1844778955ed60fe28662a as
detached HEAD === updating hal_ti (modules/hal/ti):
--- hal_ti: checked out 7a82e93e14766ef6e42df9915ea2ab8e3b952a8b as
detached HEAD === updating libmetal (modules/hal/libmetal):
--- libmetal: checked out 45e630d6152824f807d3f919958605c4626cbdff as
detached HEAD === updating lvgl (modules/lib/gui/lvgl):
--- lvgl: checked out d4708d0a432e95f51bdc712591ba5295b751140c as
detached HEAD === updating mbedtls (modules/crypto/mbedtls):
--- mbedtls: checked out bbcb1b14285ac1b694d8c7e47c2f139c80b7fc4c as
detached HEAD === updating mcumgr (modules/lib/mcumgr):
--- mcumgr: checked out 84934959d2d1722a23b7e7e200191ae4a6f96168 as
detached HEAD === updating net-tools (tools/net-tools):
--- net-tools: checked out 30b7efa827b04d2e47840716b0372737fe7d6c92 as
detached HEAD === updating nffs (modules/fs/nffs):
--- nffs: checked out bc62a2fa9d98ddb5d633c932ea199bc68e10f194 as
detached HEAD === updating hal_nxp (modules/hal/nxp):
--- hal_nxp: checked out 97265a5396edc6a9de5f2fb643d505f37064e606 as
detached HEAD === updating open-amp (modules/lib/open-amp):
--- open-amp: checked out 9b591b289e1f37339bd038b5a1f0e6c8ad39c63a as
detached HEAD === updating openthread (modules/lib/openthread):
--- openthread: checked out 3c32244f098f8daf8741efe0a2ad839b67f8567f as
detached HEAD === updating segger (modules/debug/segger):
--- segger: checked out 6fcf61606d6012d2c44129edc033f59331e268bc as
detached HEAD === updating tinycbor (modules/lib/tinycbor):
--- tinycbor: checked out 31ae89e4b768612722620cb6cb173a0de4a19cc9 as
detached HEAD === updating littlefs (modules/fs/littlefs):
--- littlefs: checked out fe9572dd5a9fcf93a249daa4233012692bd2881d as
detached HEAD


Got same error:
sdalu@hyperion:~/Z/zephyrproject/zephyr$ ~/.local/bin/west build -b
nrf52840_mdk samples/basic/blinky
-- west build: build configuration:
source directory:
/home/sdalu/Z/zephyrproject/zephyr/samples/basic/blinky
build directory: /home/sdalu/Z/zephyrproject/zephyr/build
BOARD: nrf52840_mdk (origin: CMakeCache.txt)
-- west build: building application
[1/106] Building C object
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED:
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /usr/local/gcc-arm-embedded/bin/arm-none-eabi-gcc
-DBUILD_VERSION=zephyr-v2.0.0-920-g4bca0f3d3391 -DKERNEL
-D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I../kernel/include
-I../arch/arm/include -I../include -I../include/drivers -
Izephyr/include/generated -I../soc/arm/nordic_nrf/nrf52 -
I../ext/hal/cmsis/Include -isystem ../lib/libc/minimal/include -isystem
/usr/local/gcc-arm-embedded-8-2018-q4-major/bin/../lib/gcc/arm-none-
eabi/8.2.1/include
-isystem
/usr/local/gcc-arm-embedded-8-2018-q4-major/bin/../lib/gcc/arm-none-
eabi/8.2.1/include-fixed
-Os
-
imacros/home/sdalu/Z/zephyrproject/zephyr/build/zephyr/include/generated
/autoconf.h
-ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -
imacros/home/sdalu/Z/zephyrproject/zephyr/include/toolchain/zephyr_stdin
t.h
-Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-
pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -
Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -
fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-
prefix-
map=/home/sdalu/Z/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE
_DIR
-fmacro-prefix-map=/home/sdalu/Z/zephyrproject/zephyr=ZEPHYR_BASE
-ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99
-nostdinc -MD -MT
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -c
/home/sdalu/Z/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c
In file included from ../include/arch/arm/cortex_m/cmsis.h:17,
from
../include/arch/arm/cortex_m/mpu/arm_mpu_v7m.h:10,
from ../include/arch/arm/cortex_m/mpu/arm_mpu.h:13,
from ../include/arch/arm/arch.h:246,
from ../include/arch/cpu.h:17,
from ../include/kernel_includes.h:34,
from ../include/kernel.h:17,
from ../kernel/include/kernel_structs.h:10,
from
/home/sdalu/Z/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c:26:
../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.
ERROR: command exited with status 1: /usr/local/bin/cmake --build
/home/sdalu/Z/zephyrproject/zephyr/build
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.

Carles


Re: build failed due to missing headers

Stephane D'Alu
 

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"?
yeap.

nrxf.h exist in modules directory but doesn't seems to be picked up:

sdalu@hyperion:~/Z/zephyrproject$ find . -name 'nrfx.h'
./modules/lib/openthread/third_party/NordicSemiconductor/nrfx/nrfx.h
./modules/hal/nordic/nrfx/nrfx.h


re-run west update:
=== updating hal_atmel (modules/hal/atmel):
--- hal_atmel: checked out 04ff67a0826a51041e51034faf8fc4d3eeacd846 as detached HEAD
=== updating ci-tools (tools/ci-tools):
--- ci-tools: checked out e01f3bce2a94847253369efb9a081f5c0e9ec882 as detached HEAD
=== updating civetweb (modules/lib/civetweb):
--- civetweb: checked out 99129c5efc907ea613c4b73ccff07581feb58a7a as detached HEAD
=== updating esp-idf (modules/hal/esp-idf):
--- esp-idf: checked out 6835bfc741bf15e98fb7971293913f770df6081f as detached HEAD
=== updating fatfs (modules/fs/fatfs):
--- fatfs: checked out df96914dd989907f3a5de4cb95b116c2f305820d as detached HEAD
=== updating hal_cypress (modules/hal/cypress):
--- hal_cypress: checked out a12d92816a53a521d79cefcf5c38b9dc8a4fed6e as detached HEAD
=== updating hal_nordic (modules/hal/nordic):
--- hal_nordic: checked out 1b14177ff2176a1d17f3dd5e7e217f44337255db as detached HEAD
=== updating hal_openisa (modules/hal/openisa):
--- hal_openisa: checked out be5c01f86c96500def5079bcc58d2baefdffb6c8 as detached HEAD
=== updating hal_microchip (modules/hal/microchip):
--- hal_microchip: checked out 85302959c0c659311cf90ac51d133e5ce19c9288 as detached HEAD
=== updating hal_silabs (modules/hal/silabs):
--- hal_silabs: checked out 9151e614c23997074acd1096a3e8a9e5c255d5b9 as detached HEAD
=== updating hal_st (modules/hal/st):
--- hal_st: checked out 0ec40aed8087f26bd9ac1b70fb5a6c326a6451aa as detached HEAD
=== updating hal_stm32 (modules/hal/stm32):
--- hal_stm32: checked out 272281a1990ec7097f1844778955ed60fe28662a as detached HEAD
=== updating hal_ti (modules/hal/ti):
--- hal_ti: checked out 7a82e93e14766ef6e42df9915ea2ab8e3b952a8b as detached HEAD
=== updating libmetal (modules/hal/libmetal):
--- libmetal: checked out 45e630d6152824f807d3f919958605c4626cbdff as detached HEAD
=== updating lvgl (modules/lib/gui/lvgl):
--- lvgl: checked out d4708d0a432e95f51bdc712591ba5295b751140c as detached HEAD
=== updating mbedtls (modules/crypto/mbedtls):
--- mbedtls: checked out bbcb1b14285ac1b694d8c7e47c2f139c80b7fc4c as detached HEAD
=== updating mcumgr (modules/lib/mcumgr):
--- mcumgr: checked out 84934959d2d1722a23b7e7e200191ae4a6f96168 as detached HEAD
=== updating net-tools (tools/net-tools):
--- net-tools: checked out 30b7efa827b04d2e47840716b0372737fe7d6c92 as detached HEAD
=== updating nffs (modules/fs/nffs):
--- nffs: checked out bc62a2fa9d98ddb5d633c932ea199bc68e10f194 as detached HEAD
=== updating hal_nxp (modules/hal/nxp):
--- hal_nxp: checked out 97265a5396edc6a9de5f2fb643d505f37064e606 as detached HEAD
=== updating open-amp (modules/lib/open-amp):
--- open-amp: checked out 9b591b289e1f37339bd038b5a1f0e6c8ad39c63a as detached HEAD
=== updating openthread (modules/lib/openthread):
--- openthread: checked out 3c32244f098f8daf8741efe0a2ad839b67f8567f as detached HEAD
=== updating segger (modules/debug/segger):
--- segger: checked out 6fcf61606d6012d2c44129edc033f59331e268bc as detached HEAD
=== updating tinycbor (modules/lib/tinycbor):
--- tinycbor: checked out 31ae89e4b768612722620cb6cb173a0de4a19cc9 as detached HEAD
=== updating littlefs (modules/fs/littlefs):
--- littlefs: checked out fe9572dd5a9fcf93a249daa4233012692bd2881d as detached HEAD


Got same error:
sdalu@hyperion:~/Z/zephyrproject/zephyr$ ~/.local/bin/west build -b nrf52840_mdk samples/basic/blinky
-- west build: build configuration:
source directory: /home/sdalu/Z/zephyrproject/zephyr/samples/basic/blinky
build directory: /home/sdalu/Z/zephyrproject/zephyr/build
BOARD: nrf52840_mdk (origin: CMakeCache.txt)
-- west build: building application
[1/106] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /usr/local/gcc-arm-embedded/bin/arm-none-eabi-gcc -DBUILD_VERSION=zephyr-v2.0.0-920-g4bca0f3d3391 -DKERNEL -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I../kernel/include -I../arch/arm/include -I../include -I../include/drivers -Izephyr/include/generated -I../soc/arm/nordic_nrf/nrf52 -I../ext/hal/cmsis/Include -isystem ../lib/libc/minimal/include -isystem /usr/local/gcc-arm-embedded-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/include -isystem /usr/local/gcc-arm-embedded-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/include-fixed -Os -imacros/home/sdalu/Z/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/sdalu/Z/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/sdalu/Z/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/sdalu/Z/zephyrproject/zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -march=armv7e-m -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -c /home/sdalu/Z/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c
In file included from ../include/arch/arm/cortex_m/cmsis.h:17,
from ../include/arch/arm/cortex_m/mpu/arm_mpu_v7m.h:10,
from ../include/arch/arm/cortex_m/mpu/arm_mpu.h:13,
from ../include/arch/arm/arch.h:246,
from ../include/arch/cpu.h:17,
from ../include/kernel_includes.h:34,
from ../include/kernel.h:17,
from ../kernel/include/kernel_structs.h:10,
from /home/sdalu/Z/zephyrproject/zephyr/arch/arm/core/offsets/offsets.c:26:
../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.
ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/sdalu/Z/zephyrproject/zephyr/build



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


Re: build failed due to missing headers

Carles Cufi
 

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

Carles


build failed due to missing headers

Stephane D'Alu
 

I just followed the Getting started guide [1], to install zephyr.
And tried to build my first example. Unfortunately it seems
that includes are not correctly picked up

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?


my ~/.zephyrrc:
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE=/usr/local/gcc-arm-embedded/bin/arm-none-eabi-
export HOSTCC=cc



[1]: https://docs.zephyrproject.org/latest/getting_started/index.html

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


Re: Atomic services

Boie, Andrew P
 

#include <sys/atomic.h> doesn’t work?

 

Andrew

 

From: users@... <users@...> On Behalf Of murad.durdyev.1989 via Lists.Zephyrproject.Org
Sent: Tuesday, October 1, 2019 11:47 AM
To: users@...
Cc: users@...
Subject: [Zephyr-users] Atomic services

 

Hi there!
There are two files in my project. How can I call a function atomic_get(constatomic_t *target) from one file if it is declared in another? I need extern it?


Atomic services

murad.durdyev.1989@...
 

Hi there!
There are two files in my project. How can I call a function atomic_get(constatomic_t *target) from one file if it is declared in another? I need extern it?


API meeting: agenda

Carles Cufi
 

Hi all,

This week we will look at:

- CAN: Unification of the TX error behavior
- https://github.com/zephyrproject-rtos/zephyr/issues/19502

- GPIO: Update on progress
- https://github.com/zephyrproject-rtos/zephyr/issues/18530

Additionally, if time permits and anyone interested is present:

- Status and concerns related to PR #17155 to change how timeout delays are represented:
https://github.com/zephyrproject-rtos/zephyr/pull/17155

- Sensor API: Update on progress

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


Re: user_data with gpio_callback #api

Hadrien KOHL
 

Hi Leo, 

Glad it did! You are very welcome.

Hadrien

On Tue, 2019-09-17 at 17:24 -0600, Leonardo Molina wrote:
Besides "Awesome, that worked!" I also meant to say THANKS!

On Tue, Sep 17, 2019 at 4:26 PM Hadrien KOHL <hadrien.kohl@...> wrote:
The callback receives a pointer to your gpio_callback struct. 

If the gpio_callback is within your own struct user_data you can use the CONTAINER_OF() macro to get a pointer to the user_data.

Something like this:

void isr_your_gpio_handler(struct device *dev, struct gpio_callback *CB) {
  struct user_data *data = CONTAINER_OF(cb, struct user_data,field_name_of_gpio_callback);
}

Hadrien

On Wed, Sep 18, 2019, 00:10 <leonardomt@...> wrote:
Hello Zephyr developers,

What are my options if I want an interrupt / gpio_init_callback to invoke a member function?
Is there a way to pass user_data with a gpio_callback?

Thanks,
Leo


Re: user_data with gpio_callback #api

Leo
 

Awesome, that worked!


Re: user_data with gpio_callback #api

Hadrien KOHL
 

The callback receives a pointer to your gpio_callback struct. 

If the gpio_callback is within your own struct user_data you can use the CONTAINER_OF() macro to get a pointer to the user_data.

Something like this:

void isr_your_gpio_handler(struct device *dev, struct gpio_callback *CB) {
  struct user_data *data = CONTAINER_OF(cb, struct user_data,field_name_of_gpio_callback);
}

Hadrien

On Wed, Sep 18, 2019, 00:10 <leonardomt@...> wrote:
Hello Zephyr developers,

What are my options if I want an interrupt / gpio_init_callback to invoke a member function?
Is there a way to pass user_data with a gpio_callback?

Thanks,
Leo


user_data with gpio_callback #api

Leo
 

Hello Zephyr developers,

What are my options if I want an interrupt / gpio_init_callback to invoke a member function?
Is there a way to pass user_data with a gpio_callback?

Thanks,
Leo

881 - 900 of 2599