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
+1(416)627-7302

-----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"
<lawrence.king=irdeto.com@...> 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".

Thanks,
Marti


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

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

Did you run `west update` ?

From:
<users@...<mailto:users@...>>
on behalf of Lawrence King
<lawrence.king@...<mailto:lawrence.king@...>>
Date: Wednesday, 4 September 2019 at 14:05
To:
"Zephyr-users@...<mailto:Zephyr-users@...
project.org>"
<Zephyr-users@...<mailto:Zephyr-users@...
project.org>>
Cc: "carles.cufi@...<mailto:carles.cufi@...>"
<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
v2.0.0-rc3
v2.0.0-rc2
v2.0.0-rc1
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,
https://github.com/zephyrproject-rtos/hal_nordic.

Signed-off-by: Carles Cufi
<carles.cufi@...<mailto: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>):

lawrence@VM:~/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky$
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
/home/lawrence/workspace/rc-demo/zephyr/zephyr/boards/arm/nrf52840_mdk
/nrf52840_mdk.dts as base
-- Overlaying
/home/lawrence/workspace/rc-demo/zephyr/zephyr/dts/common/common.dts
Device tree configuration written to
/home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/bu
ild/zephyr/include/generated/generated_dts_board.conf
Parsing Kconfig tree in
/home/lawrence/workspace/rc-demo/zephyr/zephyr/Kconfig
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
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_CONSOLE.html (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
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_0_NRF_UART.html (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:
/home/lawrence/workspace/rc-demo/zephyr/modules/lib/civetweb
Including module: esp-idf in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/esp-idf/zephyr
Including module: fatfs in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/fs/fatfs
Including module: qmsi in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/qmsi
Including module: cypress in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/cypress
Including module: silabs in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/silabs
Including module: st in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/st
Including module: stm32 in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/stm32
Including module: libmetal in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/hal/libmetal
Including module: lvgl in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/lib/gui/lvgl
Including module: mbedtls in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/crypto/mbedtls
Including module: mcumgr in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/lib/mcumgr
Including module: nffs in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/fs/nffs
Including module: open-amp in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/lib/open-amp
Including module: openthread in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/lib/openthread
Including module: segger in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/debug/segger
Including module: tinycbor in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/lib/tinycbor
Including module: littlefs in path:
/home/lawrence/workspace/rc-demo/zephyr/modules/fs/littlefs
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/bu
ild
-- west build: building application
[2/109] Preparing syscall dependency handling

[8/109] 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/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
--build
/home/lawrence/workspace/rc-demo/zephyr/zephyr/samples/basic/blinky/bu
ild

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

Lawrence King
Principal Developer
Connected Transport Market Unit
https://www.Irdeto.com
+1(416)627-7302

[1]<https://careers.irdeto.com/> [2 - linkedin] <https://www.linkedin.com/company/irdeto/> [3 - instagram] <https://www.instagram.com/lifeatirdeto/?hl=en> [4 - youtube] <https://www.youtube.com/channel/UCwgT0-wMbEqx3qLfrPIEnRg> [6 - facebook] <https://www.facebook.com/JoinIrdeto/> [7] <https://twitter.com/Irdeto?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor>

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 users@lists.zephyrproject.org to automatically receive all group messages.