How to add an NXP HAL module to my project? #71571
-
I'm building an application for an NXP device that needs to use the What magical CMake incantations do I need to add to my application level CMakeLists.txt file to include that module? I've looked at several example CMakeLists.txt files etc and googled but I'm just not experienced with CMake enough to make sense of it all. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Edited: This discussion is no longer up to date with the latest HAL_NXP. These details still work to include a driver file, and are still useful for versions of Zephyr v4.1 or older, or when working with a device that is not supported in the latest MCUXpresso SDK. For the latest details, see Using MCUXpresso SDK drivers in a Zephyr application. Many drivers in the HAL are enabled for Zephyr and included with Kconfigs. The enabled drivers are included from the hal_nxp.cmake file. But the HAL includes many other SDK drivers that are not yet enabled in Zephyr. These drivers can be included by the application, and the SDK driver APIs can be called directly from the application. This example uses the PUF driver, a security feature on many NXP SOCs, including the LPC55S69. To include this driver, add the following lines to the Zephyr application's CmakeLists.txt file after the command
|
Beta Was this translation helpful? Give feedback.
-
Continuing discussion here as it seems fitting. I'm using Zephyr 3.7 where the above mentioned way indeed works, except in one case.
That can be solved by including PUF and IAP1 drivers in the same way as above. However, the next break is a missing variable
This is defined in So the question: is there a better way to include modules without Zephyr support? v4.2 does change it but I'd like to hear if anyone knows how to solve this "properly". |
Beta Was this translation helpful? Give feedback.
Edited: This discussion is no longer up to date with the latest HAL_NXP. These details still work to include a driver file, and are still useful for versions of Zephyr v4.1 or older, or when working with a device that is not supported in the latest MCUXpresso SDK. For the latest details, see Using MCUXpresso SDK drivers in a Zephyr application.
Many drivers in the HAL are enabled for Zephyr and included with Kconfigs. The enabled drivers are included from the hal_nxp.cmake file. But the HAL includes many other SDK drivers that are not yet enabled in Zephyr. These drivers can be included by the application, and the SDK driver APIs can be called directly from the application.
This example u…