Hi, is the workaround of modifying the boilerplate.cmake file (as shown here https://devzone.nordicsemi.com/f/nordic-q-a/49719/how-to-create-a-custom-board-file-for-the-nrf9160/199883#199883) still required for adding a custom board?
Thanks
Hi, is the workaround of modifying the boilerplate.cmake file (as shown here https://devzone.nordicsemi.com/f/nordic-q-a/49719/how-to-create-a-custom-board-file-for-the-nrf9160/199883#199883) still required for adding a custom board?
Thanks
I didn't need to do that workaround.
Zephyr has this guide for how to add a custom board directory: https://docs.zephyrproject.org/latest/application/index.html#custom-board-definition
Then you just need the correct directory tree and add the "-DBOARD_ROOT" parameter to the west build command.
After that it all worked!
Also check out "Using a custom board with NCS":
Hi Devin, could you please show the structure of your board directory? I am trying to set this up, my board directory looks fine, but west does not like it. Does your -DBOARD_ROOT end with "/board" or at the directory containing the board dir?
Hi Devin, could you please show the structure of your board directory?
My directory structure looks like this:
"<root repo>/boards/arm/demo_board/<board definition files here>"
You can also look in "ncs/nrf/boards/arm" to see how Nordic implemented the structure.
Does your -DBOARD_ROOT end with "/board" or at the directory containing the board dir?
For my build commands it looks like this: "-DBOARD_ROOT=<absolute path to root repo>/<root repo>/boards" so it ends at the /boards directory
I hope that helped!
I do know that Nordic had much more clever way of incorporating their custom directory into CMake, but I can't currently find how they did it. It is somewhere in the ncs/nrf repository.
Hi Devin, thank you for your quick reply. If I copy the my_board folder in e.g zephyr/boards/arm/ I can use the board, so I think the structure is correct. However if my folder is in "root repo/my_support_repo/boards/arm/my_board" it does not work. I might have to spend some more time to make sure the build variables and everything are properly set, but it is pretty frustrating that west does not give more hints than just "No board named 'stamp_nrf9160' found".
I am wondering why it only lists the boards in the zephyr/board repository, I do not see the boards from the ncs/nrf/boards directory...
Anyway, thanks again for your post.