Re: nrf.h missing....

Lawrence King

It all becomes clear now...

I checked out various revisions of zephyr (rc1, rc2, etc) and ran west update at each step. You are correct it compiles correctly if I run 'west update' AFTER checking out a particular kernel (I had done 'west update' BEFORE checking out the latest kernel).

Thanks for your help.

P.S, of course in the process of upgrading the kernel step-by-step my app is broken somewhere between rc1 and rc2, but that is a separate problem for a separate thread if I can't figure it out. " error: macro "BT_GATT_CCC" passed 2 arguments, but takes just 1 "

Lawrence King
Principal Developer

-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@...>
Sent: Wednesday, September 4, 2019 2:22 PM
To: Lawrence King <lawrence.king@...>; Nashif, Anas <anas.nashif@...>; Zephyr-users@...
Cc: users@...
Subject: Re: [Zephyr-users] nrf.h missing....

"Lawrence King via Lists.Zephyrproject.Org"
<> writes:

Yes, in fact it was the process of running ‘west update’ that broke my
build in the first place.
Can you provide details on this?

As explained in the documentation PR, if you change your zephyr repository without running west update, the other repositories (in this case, the nRF HAL) may be either missing or out of sync with the main zephyr repository. This will lead to bad results.

You can think of "west update" as being like "git submodule update".


Lawrence King
Principal Developer

From: users@... <users@...> On
Behalf Of Nashif, Anas
Sent: Wednesday, September 4, 2019 2:10 PM
To: Lawrence King <lawrence.king@...>;
Cc: carles.cufi@...
Subject: Re: [Zephyr-users] nrf.h missing....

Did you run `west update` ?

on behalf of Lawrence King
Date: Wednesday, 4 September 2019 at 14:05
Cc: "carles.cufi@...<mailto:carles.cufi@...>"
Subject: [Zephyr-users] nrf.h missing....

Today I upgraded to the head of the zephyr tree and my compile broke.
Backing up to the labels
I found that my compile became broken somewhere between rc1 and rc2. A quick ‘git bisect’ found that the change that breaks my compile is:

cf3af6af5fa3e656d6caf0b3429fde52e895fa79 is the first bad commit
commit cf3af6af5fa3e656d6caf0b3429fde52e895fa79
Author: Carles Cufi <carles.cufi@...<mailto:carles.cufi@...>>
Date: Thu Aug 15 17:17:01 2019 +0200

ext: hal: Make Nordic HALs a Zephyr module

Moved to an external repo,

Signed-off-by: Carles Cufi

:100644 100644 73ad5c4f4fd10c2c1e3fbc0cc718b9f44cc198e7 696b06ec0d05db577603e10331186412f60ecbe3 M CODEOWNERS
:040000 040000 26b7c0c40f816f24989e7a7507cc21e298413f8e 8e387167b591b949828dc0ca08e0aff80ad5919f M ext
:040000 040000 772099e01dd7e4f586c782eb079b11ffbec86d39 2b5a71ac9918e09e3c801b2e90746da19f8b9437 M modules
:100644 100644 08f26e785ead096c10fcec7905c0e1061b8ba3f6 fe98cafd8cf915bf73f82e25abfb5a4c2b83fcbd M west.yml

For now my workaround is to stay at rc1.

I am using today’s release of west (0.6.2), I haven’t tried reverting west yet, but I did try manually running cmake and ninja and I get the same error, so I suspect this is not a west problem.

Here is the build error message I get (can’t find <nrf.h>):

west build -b nrf52840_mdk
-- west build: build configuration:
source directory: /home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky
build directory: /home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/build (created)
BOARD: nrf52840_mdk (origin: command line)
-- west build: generating a build system Zephyr version: 2.0.0
-- Found PythonInterp: /usr/bin/python3 (found suitable version
"3.6.8", minimum required is "3.4")
-- Selected BOARD nrf52840_mdk
-- Found west: /home/lawrence/.local/bin/west (found suitable version
"0.6.2", minimum required is "0.6.0")
-- Loading
/nrf52840_mdk.dts as base
-- Overlaying
Device tree configuration written to
Parsing Kconfig tree in
Loaded configuration '/home/lawrence/workspace/rc-demo/zephyr/zephyr/boards/arm/nrf52840_mdk/nrf52840_mdk_defconfig'
Merged configuration '/home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/build/zephyr/.config'

warning: UART_CONSOLE (defined at drivers/console/Kconfig:46) was
assigned the value 'y' but got the value 'n'. You can check symbol
information (including dependencies) in the 'menuconfig' interface
(see the Application Development Primer section of the manual), or in
the Kconfig reference at (which is updated regularly from the master branch). See the 'Setting configuration values' section of the Board Porting Guide as well.

warning: the choice symbol UART_0_NRF_UART (defined at
drivers/serial/Kconfig.nrfx:28) was selected (set =y), but no symbol
ended up as the choice selection. You can check symbol information
(including dependencies) in the 'menuconfig' interface (see the
Application Development Primer section of the manual), or in the
Kconfig reference at (which is updated regularly from the master branch). See the 'Setting configuration values' section of the Board Porting Guide as well.
-- Cache files will be written to: /home/lawrence/.cache/zephyr
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success Including module:
civetweb in path:
Including module: esp-idf in path:
Including module: fatfs in path:
Including module: qmsi in path:
Including module: cypress in path:
Including module: silabs in path:
Including module: st in path:
Including module: stm32 in path:
Including module: libmetal in path:
Including module: lvgl in path:
Including module: mbedtls in path:
Including module: mcumgr in path:
Including module: nffs in path:
Including module: open-amp in path:
Including module: openthread in path:
Including module: segger in path:
Including module: tinycbor in path:
Including module: littlefs in path:
-- Configuring done
-- Generating done
-- Build files have been written to:
-- west build: building application
[2/109] Preparing syscall dependency handling

[8/109] Building C object
FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /usr/bin/arm-none-eabi-gcc -DBUILD_VERSION=v2.0.0-rc1-156-gcf3af6af5fa3 -DKERNEL -D_FORTIFY_SOURCE=2 -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../../../../soc/arm/nordic_nrf/include -I../../../../ext/hal/cmsis/Include -isystem ../../../../lib/libc/minimal/include -isystem /usr/lib/gcc/arm-none-eabi/6.3.1/include -isystem /usr/lib/gcc/arm-none-eabi/6.3.1/include-fixed -Os -imacros/home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m4 -imacros/home/lawrence/workspace/rc-demo/zephyr/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 -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/lawrence/workspace/rc-demo/zephyr/zephyr/arch/arm/core/offsets/offsets.c
In file included from ../../../../include/arch/arm/cortex_m/cmsis.h:17:0,
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/lawrence/workspace/rc-demo/zephyr/zephyr/arch/arm/core/offsets/offsets.c:26:
../../../../soc/arm/nordic_nrf/nrf52/soc.h:17:17: fatal error: nrf.h:
No such file or directory #include <nrf.h>
compilation terminated.
ninja: build stopped: subcommand failed.
ERROR: command exited with status 1: /home/lawrence/.local/bin/cmake

The problem exists compiling simple things like blinky. To reproduce the issue run the following commands:
$ cd zephyr/samples/basic/blinky $ west build -b

Lawrence King
Principal Developer
Connected Transport Market Unit

[1]<> [2 - linkedin] <> [3 - instagram] <> [4 - youtube] <> [6 - facebook] <> [7] <>

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

Join to automatically receive all group messages.