Re: C++ support (Eclipse CDT4) - 'printk' could not be resolved
#west
Hi and thanks for your prompt response!
I tried both toolchains, gnuarmemb and zephyr. I can successfully load a zephyr project *without cpp support* into Segger (as in the link) or Eclipse and compile, flash and debug just fine. Also, you are right in that everything works as expected when using the command line, no matter if the project is c or cpp. The issue only occurs when you use Eclipse to import a project that requires cpp support: Eclipse wont recognize some functions (such as printk) and some symbols, instead it will highlight them as if they were not declared anywhere. Just to make sure I understood correctly, you successfully built the project (the cpp version; main.c --> main.cpp), but did you import it into Eclipse and got no errors after indexing finished? I read that Eclipse has two separate tools for indexing and resolving symbols/function so I wonder if this error has anything to do with the configuration in Eclipse as opposed to the cmake generator. Another likely situation is that I am not setting things right... either way, help is appreciated! Thanks! Leo
|
|
Re: C++ support (Eclipse CDT4) - 'printk' could not be resolved
#west
Bolivar, Marti
"leonardomt via Lists.Zephyrproject.Org"
<leonardomt=gmail.com@lists.zephyrproject.org> writes: Hello!Hi again! I copied these into samples/hello_world/prj.conf, but: I can't reproduce this on my Arch Linux machine with ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb, toolchain version gcc-arm-none-eabi-7-2018-q2-update. The build finishes successfully for me, and works when I flash it to my board. What toolchain are you using? Can you try with gnuarmemb? https://docs.zephyrproject.org/latest/getting_started/toolchain_3rd_party_x_compilers.html#gnu-arm-embedded One warning:BTW, since you mentioned Segger and you're using nRF: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_programming.html#building-with-ses Best, Marti
|
|
Re: nrf.h missing....
Thanks Johjan
toggle quoted messageShow quoted text
Yes I had just figured that out, the change to my source code is trivial, and not an issue, but I do find it strange that APIs are changing between rc1 and rc2. I would have thought that a change in API required a rev in the second digit of the release number. Lawrence King Principal Developer +1(416)627-7302
-----Original Message-----
From: Hedberg, Johan <johan.hedberg@intel.com> Sent: Wednesday, September 4, 2019 3:02 PM To: Lawrence King <lawrence.king@irdeto.com> Cc: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>; Nashif, Anas <anas.nashif@intel.com>; Zephyr-users@lists.zephyrproject.org; users@lists.zephyrproject.org Subject: Re: [Zephyr-users] nrf.h missing.... Hi, On 4 Sep 2019, at 21.30, Lawrence King <lawrence.king@irdeto.com> wrote: 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 “See this commit: https://github.com/zephyrproject-rtos/zephyr/pull/18270/commits/730778b4864abdd6a79cc38c071d03ae0aa6e015 Basically the fix is just to drop your custom bt_gatt_ccc_cfg array and not pass it as a parameter to BT_GATT_CCC(). Johan
|
|
Re: nrf.h missing....
Bolivar, Marti
Lawrence King <lawrence.king@irdeto.com> writes:
It all becomes clear now...Sure thing! I am glad that fixed your issue. Marti
|
|
Re: nrf.h missing....
Hi,
On 4 Sep 2019, at 21.30, Lawrence King <lawrence.king@irdeto.com> wrote: 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 “See this commit: https://github.com/zephyrproject-rtos/zephyr/pull/18270/commits/730778b4864abdd6a79cc38c071d03ae0aa6e015 Basically the fix is just to drop your custom bt_gatt_ccc_cfg array and not pass it as a parameter to BT_GATT_CCC(). Johan
|
|
Re: [Zephyr-devel] Do not use west v0.6.1; upgrade to v0.6.2
Marc Herbert
it seems extremely serious, considering that west basically has one job (versioning).One of those jobs that everyone needs but no one wants to do? PS: versioning plus a bit more https://docs.zephyrproject.org/latest/guides/west/why.html
|
|
Re: nrf.h missing....
It all becomes clear now...
toggle quoted messageShow quoted text
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@nordicsemi.no> Sent: Wednesday, September 4, 2019 2:22 PM To: Lawrence King <lawrence.king@irdeto.com>; Nashif, Anas <anas.nashif@intel.com>; Zephyr-users@lists.zephyrproject.org Cc: users@lists.zephyrproject.org Subject: Re: [Zephyr-users] nrf.h missing.... "Lawrence King via Lists.Zephyrproject.Org" <lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Yes, in fact it was the process of running ‘west update’ that broke myCan 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
|
|
Re: nrf.h missing....
Bolivar, Marti
"Lawrence King via Lists.Zephyrproject.Org"
<lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Yes, in fact it was the process of running ‘west update’ that broke myCan 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
|
|
Re: nrf.h missing....
Bolivar, Marti
"Nashif, Anas via Lists.Zephyrproject.Org"
<anas.nashif=intel.com@lists.zephyrproject.org> writes: Did you run `west update` ?Probably should add this to the getting started guide: https://github.com/zephyrproject-rtos/zephyr/pull/18911
|
|
Re: nrf.h missing....
Bolivar, Marti
Hi,
"Lawrence King via Lists.Zephyrproject.Org" <lawrence.king=irdeto.com@lists.zephyrproject.org> writes: Today I upgraded to the head of the zephyr tree and my compile broke. Backing up to the labelsYou need to run "west update". "Zephyr module", as mentioned in the commit message that git bisect found, means "external repository tracked upstream in zephyr/west.yml": https://docs.zephyrproject.org/latest/guides/modules.html You need to run "west update" after switching to a zephyr version that changes west.yml to keep these repositories in sync. This is discussed in the west documentation, but should probably be added to the getting started guide as well. I am using today's release of west (0.6.2), I haven't tried revertingThanks for updating to 0.6.2, and please let me know if a "west update" doesn't fix your issue. Marti
|
|
Re: nrf.h missing....
Yes, in fact it was the process of running ‘west update’ that broke my build in the first place.
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@...> on behalf of Lawrence King <lawrence.king@...>
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@...> 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@...>
: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/build/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/build -- 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/build
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 +1(416)627-7302
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.
|
|
Re: nrf.h missing....
Nashif, Anas
Did you run `west update` ?
From:
<users@...> on behalf of Lawrence King <lawrence.king@...>
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@...> 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@...>
: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/build/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/build -- 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/build
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 +1(416)627-7302
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.
|
|
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@...> 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@...>
: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/build/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/build -- 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/build
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 +1(416)627-7302
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.
|
|
Re: [Zephyr-devel] Do not use west v0.6.1; upgrade to v0.6.2
Bolivar, Marti
"Youse, Charles via Lists.Zephyrproject.Org"
<charles.youse=intel.com@lists.zephyrproject.org> writes: Hi Marti,I agree that it is a serious bug (see "high impact", below), and again, I'm sorry for the lack of test coverage that led to it happening in the first place. I'm grateful to the reporter for bringing it up. Now that the hotfix is out in the 0.6.x branch, I'm going to be adding regression testing. I do my best to make sure fixes get regression tests. Thanks, Marti
|
|
Re: Do not use west v0.6.1; upgrade to v0.6.2
Bolivar, Marti
"Youse, Charles" <charles.youse@intel.com> writes:
Marti,Of course. We have a process in place. It failed here due to lack of coverage, which unfortunate oversight and I'm very sorry for it, especially for those who ran into it. However, it was lack of coverage, and not lack of process, that was to blame. West has a test suite that works at both API and functional levels. The repository CI runs it on each commit (on Linux, via shippable). We also run it on supported platforms before cutting a release. In this case, that's Windows 10 and macOS. (This is in addition to informal testing that people are doing on the code in the master branch, which isn't relevant to this point since you are asking about process.) More testers and attention to testing are always welcome, so feel free to make any concrete suggestions for how we can improve our QA. Thanks, Marti
|
|
Re: [Zephyr-devel] Do not use west v0.6.1; upgrade to v0.6.2
Youse, Charles <charles.youse@...>
Hi Marti,
toggle quoted messageShow quoted text
In spite of the fact that it doesn't cause data loss, it seems extremely serious, considering that west basically has one job (versioning). Thanks, Charles
-----Original Message-----
From: devel@lists.zephyrproject.org [mailto:devel@lists.zephyrproject.org] On Behalf Of Bolivar, Marti Sent: Wednesday, September 4, 2019 12:39 PM To: users@lists.zephyrproject.org; devel@lists.zephyrproject.org Subject: Re: [Zephyr-devel] Do not use west v0.6.1; upgrade to v0.6.2 Marti Bolivar <marti.bolivar@nordicsemi.no> writes: Hi,I was requested to add a link to the bug: https://github.com/zephyrproject-rtos/west/issues/298 It won't cause data loss, but it will cause west update to fail to check out the correct revision in some cases. Marti
|
|
Re: Do not use west v0.6.1; upgrade to v0.6.2
Bolivar, Marti
Marti Bolivar <marti.bolivar@nordicsemi.no> writes:
Hi,I was requested to add a link to the bug: https://github.com/zephyrproject-rtos/west/issues/298 It won't cause data loss, but it will cause west update to fail to check out the correct revision in some cases. Marti
|
|
Re: Error in NRF SoC flash memory compilation
#nrf52840
Marc Herbert
Hi,
Are these messages from a C++ compiler? If yes trying casting.
Marc
From:
<users@...> on behalf of "giriprasad@..." <giriprasad@...>
When Iam trying to include flash.h file in my application noticed below compilation error. Can you help me to resolve the issue
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_read(device*, off_t, void*, size_t)':
|
|
Re: Do not use west v0.6.1; upgrade to v0.6.2
Youse, Charles <charles.youse@...>
Marti,
toggle quoted messageShow quoted text
Thanks for letting us know. Perhaps, since 'west' has been made practically essential to Zephyr, we should investigate some kind of QA process for west releases. Thanks Charles
-----Original Message-----
From: devel@lists.zephyrproject.org [mailto:devel@lists.zephyrproject.org] On Behalf Of Bolivar, Marti Sent: Wednesday, September 4, 2019 9:48 AM To: users@lists.zephyrproject.org; devel@lists.zephyrproject.org Subject: [Zephyr-devel] Do not use west v0.6.1; upgrade to v0.6.2 Hi, West v0.6.1 contains a high impact bug in the "west update" behavior that is fixed in v0.6.2. Users of v0.6.0 and earlier are not affected. If you are using west v0.6.1 (check with west --version), please upgrade now using the usual process: Linux: pip3 install -U --user west macOS and Windows: pip3 install -U west Thanks, Marti
|
|
Do not use west v0.6.1; upgrade to v0.6.2
Bolivar, Marti
Hi,
West v0.6.1 contains a high impact bug in the "west update" behavior that is fixed in v0.6.2. Users of v0.6.0 and earlier are not affected. If you are using west v0.6.1 (check with west --version), please upgrade now using the usual process: Linux: pip3 install -U --user west macOS and Windows: pip3 install -U west Thanks, Marti
|
|