-
I try to add a new board using the nxp imxrt1062 soc. I am confused about the board name dependency within the hal. To get the board working I had to extend the CMakeLists.txt within the hal and add my board name: https://github.com/bdkrae/hal_nxp/commit/0c115d783d9e62cfa5a9dd5e0e63d04fcfa5d6d7 Since this solution doesn't scale really good I wonder if this is the correct way to solve the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hmm, that's a little tricky. I am not super familiar with the HAL. You could also add your case into the first section of the CMake file where the MCUX_BOARD variable is set which seems slightly better. I think the proper solution would be to rework the MCUX_BOARD variable into some sort of Kconfig solution. That would allow the variable to be set in any boards |
Beta Was this translation helpful? Give feedback.
-
Thanks for your input @ejohnso49. With your hints I took a closer look at this CMake file. The sources files selected within the CMake file aim to configure the SOC´s SPI-Hardware to access external flash memory. As far as I can see this is not only a SOC dependent task, but also adapts to the used external memory (e.g. regarding SPI clocking). With that in mind I conclude that this files should be located in the board directory. That simplifies the solution although it produces duplicate code in this case. New proposed solution is entirely located in the board directory: |
Beta Was this translation helpful? Give feedback.
Thanks for your input @ejohnso49. With your hints I took a closer look at this CMake file. The sources files selected within the CMake file aim to configure the SOC´s SPI-Hardware to access external flash memory. As far as I can see this is not only a SOC dependent task, but also adapts to the used external memory (e.g. regarding SPI clocking).
With that in mind I conclude that this files should be located in the board directory. That simplifies the solution although it produces duplicate code in this case. New proposed solution is entirely located in the board directory:
bdkrae@0553000