Date   

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


Re: [Zephyr-devel] question in zephyrproject

Allen Curtis <allen@...>
 

I had this same problem. My solution was to export PYTHONPATH to include the directory containing this module. If you went through the instructions, installing all the dependencies, it is installed on your system somewhere.


On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org <jaeminy.choi=samsung.com@...> wrote:

Hello.

 

This is Jaemin from Samsung Electronics and we are trying to set the environment up for Zephyr with  https://docs.zephyrproject.org/latest/getting_started/index.html.

 

Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )

 

The error which can't find pykwalify comes up like below.


I've googled it to solve the problem but i ended up here.

Can I have some advices? 

(All programs I should install are beyond minimum version and I skipped set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin 

 

 



--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


question in zephyrproject

최재민 <jaeminy.choi@...>
 

Hello.

 

This is Jaemin from Samsung Electronics and we are trying to set the environment up for Zephyr with  https://docs.zephyrproject.org/latest/getting_started/index.html.

 

Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )

 

The error which can't find pykwalify comes up like below.


I've googled it to solve the problem but i ended up here.

Can I have some advices? 

(All programs I should install are beyond minimum version and I skipped set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin 

 

 


API meeting: agenda

Carles Cufi
 

Hi all,

This week we will look at:

- Sensor API: Update on progress

- GPIO: Update on progress
- Merge https://github.com/zephyrproject-rtos/zephyr/pull/16648 to topic-gpio. CI issues are currently preventing us from doing that.
- Resolve contract: https://github.com/zephyrproject-rtos/zephyr/issues/18530#issuecomment-530472454

- V4Z: Quick update on PR status https://github.com/zephyrproject-rtos/zephyr/pull/17194

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: MCUBoot as a west module

Bolivar, Marti
 

Becker Markus <Markus.Becker@tridonic.com> writes:

Hi Marti.

Hi,

I am trying to get Zephyr up and running with MCUboot as bootloader.

Is the documentation at https://juullabs-oss.github.io/mcuboot/readme-zephyr.html up-to-date?
Or is there a possibility to build mcuboot as a west module in one go
with the application and get a merged hex file?
A single merged hex isn't possible upstream, but mcuboot is being added as a west module here:
[MB] Alright, I had seen it in https://github.com/NordicPlayground/fw-nrfconnect-nrf. But since I could not get the partition manager to use the external flash device, I have been switching back to upstream Zephyr.

https://github.com/zephyrproject-rtos/zephyr/pull/17868
[MB] OK, so this PR ties in the west module. After this, you build
mcuboot in applications/mcuboot/boot/zephyr/build according to
https://juullabs-oss.github.io/mcuboot/readme-zephyr.html
Cherry-picking that PR and then remembering to running "west update":

$ west build -b my-board -d my-mcuboot-build-dir applications/mcuboot/boot/zephyr
$ west flash -d my-mcuboot-build-dir

and build the application with the prj.conf?

CONFIG_MCUBOOT_CMAKELISTS_DIR="$ ZEPHYR_BASE/applications/mcuboot/boot/zephyr/"
CONFIG_MCUBOOT_BUILD_STRATEGY_FROM_SOURCE=y
CONFIG_MCUBOOT_IMAGE_VERSION="0.0.1+0"
All this stuff looks like downstream NCS only. If your application is
already MCUboot aware (i.e. sets CONFIG_BOOTLOADER_MCUBOOT=y), just:

$ west build -b my-board -d my-application-build-dir path/to/my/application
$ west flash -d my-application-build-dir

CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"
# CONFIG_MCUMGR is not set
# CONFIG_IS_BOOTLOADER is not set
CONFIG_BOOTLOADER_MCUBOOT=y

You can build and flash the bootloader once, then flash your application separately.


I am also interested in getting mcuboot/Zephyr working using an
external flash chip for the secondary slot:
http://lists.runtime.co/pipermail/dev-mcuboot_lists.runtime.co/2019-Se
ptember/000634.html. Any hints?
I've often wondered whether this is true myself. I've heard conflicting reports.
After adding

diff --git a/boot/zephyr/prj.conf b/boot/zephyr/prj.conf
index dd67333..f55739d 100644
--- a/boot/zephyr/prj.conf
+++ b/boot/zephyr/prj.conf
@@ -47,3 +47,12 @@ CONFIG_LOG=y
CONFIG_LOG_IMMEDIATE=y
### Ensure Zephyr logging changes don't use more resources
CONFIG_LOG_DEFAULT_LEVEL=0
+
+### Enable external flash support
+CONFIG_SPI=y
+CONFIG_SPI_NOR=y
+CONFIG_SPI_NOR_SECTOR_SIZE=4096
+CONFIG_SPI_NOR_PAGE_SIZE=256
+CONFIG_SPI_NOR_CS_WAIT_DELAY=50

And

diff --git a/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts b/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
index d90b1dd684..aa50abb5f5 100644
--- a/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
+++ b/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
@@ -186,6 +188,23 @@ arduino_i2c: &i2c0 {
has-be32k;
wp-gpios = <&gpio0 22 0>;
hold-gpios = <&gpio0 23 0>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ // use same layout on external flash as in internal flash
+ // optimize external flash layout later
+ slot1_partition: partition@73000 {
+ label = "image-1";
+ reg = <0x00073000 0x000067000>;
+ };
+ scratch_partition: partition@da000 {
+ label = "image-scratch";
+ reg = <0x000da000 0x0001e000>;
+ };
+ };
};
};

@@ -214,6 +233,7 @@ arduino_spi: &spi3 {
label = "image-0";
reg = <0x0000C000 0x000067000>;
};
+ /*
slot1_partition: partition@73000 {
label = "image-1";
reg = <0x00073000 0x000067000>;
@@ -222,7 +242,7 @@ arduino_spi: &spi3 {
label = "image-scratch";
reg = <0x000da000 0x0001e000>;
};
-
+ */

I am currently getting

FATAL: ***** USAGE FAULT *****
FATAL: Illegal load of EXC_RETURN into PC
FATAL: r0/a1: 0xf3efb501 r1/a2: 0xf1a08005 r2/a3: 0xea4f0010
FATAL: r3/a4: 0x490400c0 r12/ip: 0xc9094401 r14/lr: 0xe8bd4798
FATAL: xpsr: 0x00004708
FATAL: Faulting instruction address (r15/pc): 0x49024001

on spi_context_release() in zephyr/drivers/spi/spi_nrfx_spi.c. Seems
like _current Thread is NULL at DEVICE_AND_API_INIT in POST_KERNEL
stage.
No idea here, sorry; hopefully someone else can help you.

Marti


Best,
Marti
________________________________
The contents of this e-mail and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this e-mail is received in error, please immediately notify the sender and delete the e-mail and attached documents. Please note that neither the sender nor the sender's company accept any responsibility for viruses and it is your responsibility to scan or otherwise check this e-mail and any attachments.

741 - 760 of 2455