nRF Connect Custom / Supported Board

Sysprogs forums Forums VisualGDB nRF Connect Custom / Supported Board

This topic contains 8 replies, has 2 voices, and was last updated by  grindstaffp 1 month, 2 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29991

    grindstaffp
    Participant

    Hello,

    In a nRF Connect project, what is the correct way to add a custom board to a project? In project properties I assume it is related to the “Custom Root Board Directory” and “Device Tree Overlay Files” options under Hardware Configuration. Is this simply asking for the board directory that one would create under a project?

    Also, if I would like to use a board that is not in the supported platforms list, for example, the particle xenon (which is nordic based and has a board definition in Zephyr), how would I go about using that platform in my project?

    Thanks!

    #29996

    support
    Keymaster

    Hi,

    The “Custom Board Root Directory” corresponds to the BOARD_ROOT variable used by the NRFConnect SDK, while the “Device Tree Overlay Files” sets the DTC_OVERLAY_FILE variable. Please refer to the NRFConnect SDK documentation for detailed explanation of these variables and instructions on porting the SDK to support additional boards.

    You can also try right-clicking on the existing board in Solution Explorer and select “Copy to project directory”. This will copy the current board directory from the SDK to a subdirectory under the project directory and will set BOARD_ROOT accordingly.

    #29997

    grindstaffp
    Participant

    Once I have a board defined in the local project directory (ProjDir/boards), how do you select it as a platform in the project? It seems like does some detective work when a change is made and finds the original platform device tree but it does not detect what I have added. Thanks for the guidance.

    #29998

    grindstaffp
    Participant

    I cannot edit my last reply but I’d like to add that I have added the following to CMakeLists.txt, as outlined in the documentation and still do not see my custom board.

    list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR})

    #30008

    support
    Keymaster

    Hi,

    Please make sure the Custom Board Root Directory setting points to your boards directory. Then VisualGDB will scan it and show the boards from there. If it still doesn’t work, please share a screenshot showing the “Custom Board Root Directory” setting, another screenshot showing the list of boards and a zip file with the contents of your board directory, and we will try to reproduce this on our side.

    #30012

    grindstaffp
    Participant

    Please see the attached. After copying the board to the project directory, the custom board root directory is automatically set to $(ProjectDir) and the following log output is generated.

    Running CMake: C:\Users\patri\AppData\Local\VisualGDB\CMake\bin\cmake.exe ../../.. -G "Ninja" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_MAKE_PROGRAM="C:/Program Files (x86)/Sysprogs/VisualGDB/ninja.exe" -DBOARD=nrf52840dk_nrf52840 -DBOARD_ROOT=H:\Development\VisualGDB\Projects\ncs_test
    Including boilerplate (Zephyr base (cached)): H:/Development/SDKs/Nordic/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: H:/Development/VisualGDB/Projects/ncs_test
    -- Zephyr version: 2.4.99 (H:/Development/SDKs/Nordic/ncs/v1.5.0/zephyr)
    -- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Cache files will be written to: H:/Development/SDKs/Nordic/ncs/v1.5.0/zephyr/.cache
    -- Found toolchain: gnuarmemb (H:/Development/Tools/SysGCC/arm-eabi)
    -- Found BOARD.dts: H:/Development/VisualGDB/Projects/ncs_test/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: H:/Development/VisualGDB/Projects/ncs_test/boards/nrf52840dk_nrf52840.overlay
    -- Generated zephyr.dts: H:/Development/VisualGDB/Projects/ncs_test/build/nrf52840dk_nrf52840/Debug/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: H:/Development/VisualGDB/Projects/ncs_test/build/nrf52840dk_nrf52840/Debug/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: H:/Development/VisualGDB/Projects/ncs_test/build/nrf52840dk_nrf52840/Debug/zephyr/include/generated/device_extern.h
    Parsing H:/Development/VisualGDB/Projects/ncs_test/Kconfig
    Loaded configuration 'H:/Development/VisualGDB/Projects/ncs_test/build/nrf52840dk_nrf52840/Debug/zephyr/.config'
    No change to configuration in 'H:/Development/VisualGDB/Projects/ncs_test/build/nrf52840dk_nrf52840/Debug/zephyr/.config'
    No change to Kconfig header in 'H:/Development/VisualGDB/Projects/ncs_test/build/nrf52840dk_nrf52840/Debug/zephyr/include/generated/autoconf.h'

    I then add another board to the newly created directory, H:/Development/VisualGDB/Projects/ncs_test/boards/arm/, see attached boards.zip. This board definition is from the main zephyr repo. I then reload the CMake project but the board is not detected and the log output is the same as above.

    In order to try to rule things out, I have cleared the cache and build directories, re-launched VS, tried setting the custom board root directory to $(ProjectDir)\boards, all to no avail.

    Oddly, at one point i did see the overlay files show up in the log (only once) but the boards were still not added to the boards list. I was only able to have this occur once and spent a fair amount of time trying to re-produce this behavior.

    Attachments:
    You must be logged in to view attached files.
    #30060

    grindstaffp
    Participant

    I have also attempted the above an a separate, new project, with the same results. Thanks for the help!

    #30062

    support
    Keymaster

    Hi,

    Sorry for the delay. We have reproduced the issue on our side. VisualGDB was applying the “nrf*” filter to the boards in the custom directory similar to the way it does for the regular Zephyr boards.

    We have fixed it in the following build: VisualGDB-5.6.1.4039.msi

    #30095

    grindstaffp
    Participant

    No worries, thanks for the update, works great.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.