VS Code custom board in external module not showing

 Hello,


We have a workspace in the T3 topology (Forest).

Our own module is then in <zephyr_topdir>/our_module and this folder has a boards folder. But when I want to add a new build config, I don't see my custom board on the list.


For testing purpose I also added a boards folder inside our application folder and it's working. But we want to have only a boards folder in our module as to reuse those files.


In the build/zephyr_settings.txt of our application I see our module in BOARD_ROOT but not on the UI to create a new build config.

Did I do something wrong or is this not implemented as of today ?

Kind regards,

Andrew

Parents
  • Hello Andrew, have you followed the Custom Board, Devicetree and SOC Definitions chapter in the Zephyr documentation?

    The structure needed to support out-of-tree board and SOC development is similar to how boards and SOCs are maintained in the Zephyr tree.

    In the build/zephyr_settings.txt of our application I see our module in BOARD_ROOT but not on the UI to create a new build config.

    What does BOARD_ROOT point to? Where have you configured BOARD_ROOT?

    From: zephyr/cmake/modules/boards.cmake it states

    Hints:
    - if your board directory is '/foo/bar/boards/<ARCH>/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
    - if in doubt, use absolute paths")

     More information is found in Boards sub-chapter in Custom Board, Devicetree and SOC Definitions chapter:

    When specifyingBOARD_ROOTin a CMakeLists.txt, then an absolute path must be provided, for examplelist(APPENDBOARD_ROOT${CMAKE_CURRENT_SOURCE_DIR}/<extra-board-root>). When using-DBOARD_ROOT=<board-root>both absolute and relative paths can be used. Relative paths are treated relatively to the application directory.

    Kind regards,
    Øyvind

  • Hello,

    Yes I have followed the documentation. I will explain better, when I use directly west on a terminal, I can build my project with my custom board with no problem.

    The problem is that I also want to be able to select this custom board on the UI of your extension for VSCode when adding a new build configuration for my project.

    My custom board is in a module at the root of the workspace folder (like the nrf, nrfxlib, zephyr, bootloader, mbedtls, etc folders). This custom module is correctly put inside my west.yml file.

    I've used a module and didn't put my board insid my project folder because I reuse it on several projects with other customs drivers.

    Packageworkspace
     ┣ Open file folderapplications
     ┃ ┗ Open file foldercustom_app <= my projects are here
     ┣ Open file folderbootloader
     ┣ Open file foldermbedtls
     ┣ Open file foldermodules
     ┣ Open file foldernrf
     ┣ Open file foldernrfxlib
     ┣ Open file foldercustom_modules <= the west.yml to init my workspace with west is here
     ┃ ┗ Open file folderboards <= custom boards are here
     ┣ Open file foldertest
     ┣ Open file foldertools
     ┗ Open file folderzephyr

    Kind regards,

    Andrew

Reply
  • Hello,

    Yes I have followed the documentation. I will explain better, when I use directly west on a terminal, I can build my project with my custom board with no problem.

    The problem is that I also want to be able to select this custom board on the UI of your extension for VSCode when adding a new build configuration for my project.

    My custom board is in a module at the root of the workspace folder (like the nrf, nrfxlib, zephyr, bootloader, mbedtls, etc folders). This custom module is correctly put inside my west.yml file.

    I've used a module and didn't put my board insid my project folder because I reuse it on several projects with other customs drivers.

    Packageworkspace
     ┣ Open file folderapplications
     ┃ ┗ Open file foldercustom_app <= my projects are here
     ┣ Open file folderbootloader
     ┣ Open file foldermbedtls
     ┣ Open file foldermodules
     ┣ Open file foldernrf
     ┣ Open file foldernrfxlib
     ┣ Open file foldercustom_modules <= the west.yml to init my workspace with west is here
     ┃ ┗ Open file folderboards <= custom boards are here
     ┣ Open file foldertest
     ┣ Open file foldertools
     ┗ Open file folderzephyr

    Kind regards,

    Andrew

Children
Related