Hi guys,
We need to port our bare-metal, KSDK-based firmware to Zephyr, but I can't even build the Hello World Zephyr sample application on the FRDM-K22F dev board:
Building hello_world
/bin/sh -c west build --build-dir /home/laci/download/hello_world/build /home/laci/download/hello_world --pristine --board frdm_k22f --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/home/laci/projects/firmware-uhk" -DCONF_FILE:STRING="/home/laci/download/hello_world/prj.conf"
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/laci/download/hello_world
-- CMake version: 3.25.1
-- Found Python3: /usr/bin/python3.10 (found suitable exact version "3.10.12") found components: Interpreter
-- Cache files will be written to: /home/laci/.cache/zephyr
-- Zephyr version: 3.3.99 (/home/laci/apps/ncs/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
-- Board: frdm_k22f
-- Found host-tools: zephyr 0.16.1 (/home/laci/apps/zephyr-sdk-0.16.1)
-- Found toolchain: zephyr 0.16.1 (/home/laci/apps/zephyr-sdk-0.16.1)
-- Found Dtc: /home/laci/apps/zephyr-sdk-0.16.1/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/laci/apps/ncs/zephyr/boards/arm/frdm_k22f/frdm_k22f.dts
In file included from /home/laci/apps/ncs/zephyr/boards/arm/frdm_k22f/frdm_k22f.dts:11,
from <command-line>:
/home/laci/apps/ncs/zephyr/boards/arm/frdm_k22f/frdm_k22f-pinctrl.dtsi:10:10: fatal error: nxp/kinetis/MK22FN512VLH12-pinctrl.h: No such file or directory
10 | #include <nxp/kinetis/MK22FN512VLH12-pinctrl.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMake Error at /home/laci/apps/ncs/zephyr/cmake/modules/extensions.cmake:3714 (message):
failed to preprocess devicetree files (error code 1):
/home/laci/apps/ncs/zephyr/boards/arm/frdm_k22f/frdm_k22f.dts
Call Stack (most recent call first):
/home/laci/apps/ncs/zephyr/cmake/modules/dts.cmake:223 (zephyr_dt_preprocess)
/home/laci/apps/ncs/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
/home/laci/apps/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/home/laci/apps/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/laci/download/hello_world/build -GNinja -DBOARD=frdm_k22f -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DBOARD_ROOT:STRING=/home/laci/projects/firmware-uhk -DCONF_FILE:STRING=/home/laci/download/hello_world/prj.conf -S/home/laci/download/hello_world
As it turns out, the missing MK22FN512VLH12-pinctrl.h file is not part of the Zephyr repository, but it's part of the https://github.com/zephyrproject-rtos/hal_nxp Zephyr module.
Strangely, the https://github.com/zephyrproject-rtos/zephyr/tree/main/modules/hal_nxp Zephyr module is already part of the main Zephyr repo, but it's almost empty compared to the above module.
The above makes me quite confused, and I need some help making Zephyr build on the MK22FN512VLH12.
I should also mention that I use Zephyr provided by the nRF Connect SDK and the nRF Connect for VS Code extension pack because we're also using nRF528* processors. I want to use the same environment to develop for both processors. According to my knowledge, this issue is not related to the Nordic tools.
Thanks in advance.
已解决! 转到解答。
Hello @laszlomonda,
For questions related to Zephyr we have a specific forum, where experts on the subject could help you. Could you please direct the related questions in the following communities?
Kind regards, Raul.
Hello @laszlomonda,
For questions related to Zephyr we have a specific forum, where experts on the subject could help you. Could you please direct the related questions in the following communities?
Kind regards, Raul.
Thanks for the idea! Just opened the https://github.com/zephyrproject-rtos/zephyr/discussions/63716 discussion on GitHub.