Including NXP HAL modules in network driver #53181
-
Hey, I'm currently rewriting NXP MIMXRT1060_EVKB board's network driver (eth_mcux.c) for our custom board which based on the same microcontroller, and I'm finding it hard to include and use ENET_* functions in my zephyr module driver. In my driver I tried to include the needed header files: and in my CMakeLists.txt file I included the appropriate directories: but it doesn't work for me. Did someone deal with that problem ? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
It might be helpful to also post the errors you get. |
Beta Was this translation helpful? Give feedback.
-
Hi @ofirshe , You show using BTW, do you also have Best regards |
Beta Was this translation helpful? Give feedback.
-
Hi @ofirshe , Are you aware of an actual error, besides this CMake warning? |
Beta Was this translation helpful? Give feedback.
Hi @ofirshe ,
From the errors, it appears your build is not including
fsl_enet.c
in the NXP HAL. This driver is included in CMake in hal_nxp.cmake.You show using
zephyr_include_directories()
to include the enet folder. My understanding is this Cmake command tells the compiler where the include files are, like .h files. But a command likezephyr_library_sources()
is needed to include a source file in the build, like here in hal_nxp.cmake. Or here is how driver_enet.cmake addsfsl_enet.c
to the build.BTW, do you also have
CONFIG_ETH_MCUX
selected for your board?Best regards