Select out-of-tree SDK using VS-Code

Is there a way to select an out-of-tree SDK from VS-Code?

From the NRF-Connect plugin welcome menu, I can select  stock Nordic distributions, but I can't seem to select an arbitrary path for the SDK.

The "Manage SDKs" plugins will let me create a west manifest, but I can't figure out how to select the SDK once I populate it with `west update`.

I know that NRF-Connect will find the SDK if it the `.west` direcdtory is in a parent directory. I am looking for a way to select an out-of-the-tree SDK.

Thanks.

Kent

Parents
  • Hi Kent,

    If you open VS Code from inside your out-of-tree SDK, then the nRF Connect extension should be able to detect the custom SDK installation.

    Does this work for you?

    I will try to look if there is any way for the extension to automatically detect another SDK installation. I don't think it can detect anywhere, as that would involve scanning the entire PC's file system every time, and 99.999% not something doable or desirable. 

    Regards,

    Hieu

Reply
  • Hi Kent,

    If you open VS Code from inside your out-of-tree SDK, then the nRF Connect extension should be able to detect the custom SDK installation.

    Does this work for you?

    I will try to look if there is any way for the extension to automatically detect another SDK installation. I don't think it can detect anywhere, as that would involve scanning the entire PC's file system every time, and 99.999% not something doable or desirable. 

    Regards,

    Hieu

Children
  • That's not exactly what I was looking for. I'd like to be able to select the SDK (ideally using the "Manage SDK" facility). Let me explain how I'm using VS-Code now.

    I develop software for various embedded boards, none of which have great development environments: maybe limited memory, never have a console, less than ideal debugger interface. My solution is to do as much development as possible on nordic DKs (normally nrf52840dk, sometimes nrf5340dk), and once everything is complete, rebuild for target hardware. For this phase, I just use the nordic SDK.

    When I transfer to the target hardware, if the target runs on a Nordic chip, I'm done. If it runs on some other SOC, I need the stock zephyr SDK. My current method is to install a zephyr manifest directory in the same directory as the app and then do "west init"/"west update" to create a ".west" directory also in the same directory as the app. When I then "refrest" the VS-Code "Manage SDK", it selects the SDK from the manifest. I can create a new "build" alongside the ones for the NRF DKs.

    One problem with this is that I must manually delete the `.west` directory whenever I want to go back to the Nordic SDK (for more work on the DKs). I can later recreate the `.west` directory with a simple `west init` (and I don't need to update the installation).

    This method is clunky and doesn't play nicely with build servers. I was hoping to be able to specify a directory that holds manifest files (or a tree with manifest directories). 

    My question is, with the current tool, can one specify a Zephyr SDK, or are we limited to the list of nordic SDKs, and the parent directories.

    Thanks,

    Kent

  • Hi Kent,

    I understand your issue now. To my understanding, if there is a .west/config file in the project folder, the nRF Connect Extension will consider it a "workspace application" and only consider the locally detected SDK for that project.

    Can you check if you can change the nrf-connect.topdir setting?

    What do you think about installing the vanilla Zephyr SDK independently of the project, and use west zephyr-export? The nRF Connect Extension will be able to detect it then.

    Regards,

    Hieu

Related