Hi to everyone, new here:
So I have a set of Zephyr RTOS projects that I can compile fine with the Zephyr west tool.
Right now I’m porting/moving some of them to platformio, so that I can have an integrated development environment.
The issue that I’m having has to do with Zephyr modules, not extra modules, but Zephyr provided modules that are on the framework packages such as framework-zephyr-canopennode or framework-zephyr-lorawan.
For example, if I add to the prj.conf config file under the zephyr directory for the Platformio project a line such as:
CONFIG_TINYCBOR=y
Since TinyCBOR is a zephyr module provided by framework-zehyr-tinycbor, it compiles with no issue. Other modules such CAN, also compile.
But If I add for example the framework-zephyr-loramac-node with:
CONFIG_LORAWAN=y
The compilation fails:
Processing TestNode (platform: ststm32; board: disco_l072cz_lrwan1; framework: zephyr)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/disco_l072cz_lrwan1.html
PLATFORM: ST STM32 (11.0.0) > ST DISCO-L072CZ-LRWAN1
HARDWARE: STM32L072CZ 32MHz, 20KB RAM, 192KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES:
- framework-zephyr 2.20400.201210 (2.4.0)
- framework-zephyr-canopennode 0.0.0-alpha+sha.468d350028
- framework-zephyr-civetweb 0.0.0-alpha+sha.99129c5efc
- framework-zephyr-cmsis 0.0.0-alpha+sha.542b2296e6
- framework-zephyr-fatfs 0.0.0-alpha+sha.13697783bf
- framework-zephyr-hal-st 0.0.0-alpha+sha.5b3ec3e182
- framework-zephyr-hal-stm32 0.0.0-alpha+sha.cea57f86d3
- framework-zephyr-libmetal 0.0.0-alpha+sha.0b23894a04
- framework-zephyr-littlefs 0.0.0-alpha+sha.9e4498d1c7
- framework-zephyr-loramac-node 0.0.0-alpha+sha.3f545d76a2
- framework-zephyr-lvgl 0.0.0-alpha+sha.928b61c7c8
- framework-zephyr-mbedtls 0.0.0-alpha+sha.aef137b1af
- framework-zephyr-mcuboot 0.0.0-alpha+sha.a5d79cf8cc
- framework-zephyr-mcumgr 0.0.0-alpha+sha.5051f9d900
- framework-zephyr-mipi-sys-t 0.0.0-alpha+sha.957d46bc3c
- framework-zephyr-open-amp 0.0.0-alpha+sha.724f7e2a45
- framework-zephyr-openthread 0.0.0-alpha+sha.07f430dac6
- framework-zephyr-segger 0.0.0-alpha+sha.874d9e9696
- framework-zephyr-tinycbor 0.0.0-alpha+sha.40daca97b4
- framework-zephyr-tinycrypt 0.0.0-alpha+sha.3e9a49d267
- framework-zephyr-trusted-firmware-m 0.0.0-alpha+sha.143df67555
- tool-cmake 3.16.4
- tool-dtc 1.4.7
- tool-gperf 3.0.4
- tool-ninja 1.7.1
- toolchain-gccarmnoneeabi 1.80201.181220 (8.2.1)
Reading CMake configuration...
-- Application: /opt/pZephyrTest/zephyr
-- Zephyr version: 2.4.0 (/home/dev/.platformio/packages/framework-zephyr)
-- Found Python3: /usr/bin/python3.9 (found suitable exact version "3.9.1") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: b_l072z_lrwan1
-- Cache files will be written to: /home/dev/.cache/zephyr
-- Found dtc: /home/dev/.platformio/packages/tool-dtc/dtc (found suitable version "1.4.7", minimum
required is "1.4.6")
-- Found toolchain: gnuarmemb (/home/dev/.platformio/packages/toolchain-gccarmnoneeabi)
-- Found BOARD.dts: /home/dev/.platformio/packages/framework-zephyr/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1.dts
-- Generated zephyr.dts: /opt/pZephyrTest/.pio/build/TestNode/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /opt/pZephyrTest/.pio/build/TestNode/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/dev/.platformio/packages/framework-zephyr/Kconfig
Loaded configuration '/home/dev/.platformio/packages/framework-zephyr/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1_defconfig'
Merged configuration '/opt/pZephyrTest/zephyr/prj.conf'
Configuration saved to '/opt/pZephyrTest/.pio/build/TestNode/zephyr/.config'
Kconfig header saved to '/opt/pZephyrTest/.pio/build/TestNode/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/dev/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc
-- Configuring done
FATAL ERROR: no west workspace found from "/home/dev/.platformio/packages/framework-zephyr"; "west topdir" requires one.
Things to try:
- Change directory to somewhere inside a west workspace and retry.
- Set ZEPHYR_BASE to a zephyr repository path in a west workspace.
- Run "west init" to set up a workspace here.
- Run "west init -h" for additional information.
warning: The choice symbol LOG_MODE_OVERFLOW (defined at subsys/logging/Kconfig:154) was selected
(set =y), but no symbol ended up as the choice selection. See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_MODE_OVERFLOW.html and/or look up
LOG_MODE_OVERFLOW in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.
CMake Warning at /home/dev/.platformio/packages/framework-zephyr/CMakeLists.txt:1327 (message):
__ASSERT() statements are globally ENABLED
CMake Error at /home/dev/.platformio/packages/framework-zephyr/cmake/extensions.cmake:398 (add_library):
No SOURCES given to target: loramac-node
Call Stack (most recent call first):
/home/dev/.platformio/packages/framework-zephyr/drivers/lora/CMakeLists.txt:3 (zephyr_library_named)
CMake Generate step failed. Build files cannot be regenerated correctly.
And that’s it.
Platformio and packages are fully updated.
Any ideas?