-
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:
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 I'm also using 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. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Hi, NCS doesn't include the NXP hal by default so you need to set up a west workspace and define your own west.yml manifest to allow the NXP hal see here for an example https://github.com/nrfconnect/ncs-example-application Once you have this set up and you run 'west update' you should see the nxp hal cloned and then you will be able to build. |
Beta Was this translation helpful? Give feedback.
-
This is not allowed as per the license, if you want to use with non-nordic devices then you must use upstream zephyr without any part of the nRF connect SDK |
Beta Was this translation helpful? Give feedback.
-
Hi @mondalaci , You can build with this board using CLI, or if you prefer VS Code, NXP offers our MCUXpresso extension. I suggest you first get started following the steps for these options. Either will include the hal_nxp repo in your West workspace. That will provide a working example for you. After that, you can modify the west.yml in your standalone application to include the required repos for your application. To install Zephyr and the tools needed for NXP hardware, I recommend following the instructions for our MCUXpresso extension for VS Code. These steps use the MCUXpresso Installer, which installs the Zephyr dependencies like West, Python, Zephyr SDK, etc., and it installs the drivers for the debug probes used with the NXP boards. (Another option is to install manually following Zephyr's Getting Started, but the MCUXpresso Installer does simplify this process.) Then you can follow the steps at MCUXpresso extension for VS Code to import the Zephyr samples into VS Code, build, flash, and debug on the
With the samples working for you, you can then update your standalone app to include these same repos. Use the west.yml manifest included in the Zephyr repo as a reference. At a minimum, your app's manifest will need to include the repos zephyr, hal_nxp, and cmsis. As mentioned in this post, Zephyr's example-application repo provides a great reference for trimming down the west.yml manifest to include only the repos required by your application. Best regards west.yml |
Beta Was this translation helpful? Give feedback.
Hi @DerekSnell,
Thank you very much for elaborating on the details!
I was able to build the Zephyr firmware not only for nRF528* but also for the K22, using the following
west.yml
:west has taken care of importing the
hal-nxp
CMake dependencies, so theMK22FN512VLH12-pinc…