MCUXPRESSO Zephyr Custom Device Driver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCUXPRESSO Zephyr Custom Device Driver

1,328件の閲覧回数
bretts
Contributor I

I'm trying to add support for a custom board and custom device drivers (I have an FRAM chip that is not supported).  I have been able to get the custom board to build, but I cannot get my custom driver to build (or to get Kconfig invoked).  I have the following tree:

bretts_0-1742924049911.png

Or alternate view:

bretts_1-1742924122569.png

 

I just need a template to get started with the custom drivers.  I have found an example that is using west directly, but not the mcuxpresso build system.  Does anyone have any experience with this?

Thank you,

Brett Swimley

0 件の賞賛
返信
5 返答(返信)

1,143件の閲覧回数
diego_charles
NXP TechSupport
NXP TechSupport

Hi @bretts 

My apologies for the delayed response.

To add custom driver, the simplest way is to edit the Cmakelist associated to your project.

diego_charles_0-1744676560042.png

This way, I created the most simple driver on the drivers folder. 

diego_charles_1-1744676721871.png

 

Then I called the driver function on main and it worked. This is related to this.

https://cmake.org/cmake/help/latest/command/target_sources.html

I think it is okay for a single file, but for a complete directory not. So I think this could do better the job 

https://cmake.org/cmake/help/latest/command/include_directories.html

If you want to include an nxp sdk  driver , you could check out this post from Derek

https://community.nxp.com/t5/Zephyr-Project-Knowledge-Base/Using-MCUXpresso-SDK-drivers-in-a-Zephyr-...

I hope this could help you! 

Diego

 

 

 

0 件の賞賛
返信

579件の閲覧回数
ARosman
Contributor I

Hi,

Is this even supported in MCUXpresso for VSCODE? I followed some tutorial and it seems that the driver compiles correctly, but it doesn't link to the main app, returning  undefined reference to '__device_dts_ord_xx'.

Any new information about how to build Custom drivers?

Ales

タグ(2)
0 件の賞賛
返信

1,311件の閲覧回数
bretts
Contributor I

I am basing my custom board off the MIMXRT1024 (we have successfully used this in a previous project with MCUXpresso SDK and FreeRTOS).  As a test, because I know we will eventually need it, I want to build a custom board, and I am trying to interface it to an SPI FRAM part (again, we have used this part previously).  I cannot figure out how to get the project to recognize my custom driver directory.  I looked at the example-application as part of the Zephyr project, but that uses west as the build system, and the application has a Kconfig file.  Everytime I add a Kconfig file to my application root directory, I run into build errors.

Any thoughts?

0 件の賞賛
返信

1,310件の閲覧回数
bretts
Contributor I

I am tempted to just move to the "out of the box" zephyr development, rather than trying to use the visual studio code mcuxpresso extension.

 

0 件の賞賛
返信

1,314件の閲覧回数
Alondra
NXP TechSupport
NXP TechSupport
Hello Brett,
Which part number are you using?

Best regards
0 件の賞賛
返信