Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4616

General • Pico-SDK Extension VSC and 2 Picoprobes / 2 Picos

$
0
0
Hi All,

I am working on a project that uses a few MCU boards, and part of researching through this, I will have multi-root workspaces that involve more than one Pico, and others that use a Pico/Pico2, and other MCU's, like an ESP32, Atmel Pro Mini, maybe even STM32 devices.

For starters, I wanted to duplicate my individually written and successful SPI master/slave test using two picos.
To start,
  • I flashed two Picos with the picoprobe firmware.
    Accessed them using the command line picotool to get their flash serial numbers.
    Connected them to their target picos.
    Created two additional CFG files uncommenting the line that ID's them by serial number and adding the serial numbers I got from picotool.
    Modified each task.json in each folder to use those individual cfg files.
I can build each project individually or build them all by changing my CMAKE target, no issues.
But the extension does not present a button to flash, so you go to the extension's icon and select it from the menu. But there is no option to select a project to flash so apparently it just flashes the first root in the workspace. I would like to flash each project individually if I could, using the picoprobe I have connected to that project's targeted pico. And yes, there are command-line options for me, but I am trying to get my whole master project (multi-root workspace) to encompass the whole multi-mcu design, and allow me to work on all their builds individually but in parallel. It certainly will help my SPI Master/Slave project to have each next to each other.

So my question is... is it possible to individually trigger a task defined in a task.json within each project in a multi-root workspace? Do I have to name them uniquely? Do I have to write my own addon to do that?

Here is one of my task.json files (flash portion) showing the CFG used for flashing is the unique copy I copied and modified to include the serial. It's for my 2-target blink experiment (not SPI Master/Slave) but the idea is the same.

Code:

        {            "label": "Flash",            "type": "process",            "command": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe",            "args": [                "-s",                "${userHome}/.pico-sdk/openocd/0.12.0+dev/scripts",                "-f",                "interface/cmsis-dap-E66038B7139B6C38.cfg",                "-f",                "target/${command:raspberry-pi-pico.getTarget}.cfg",                "-c",                "adapter speed 5000; program \"${command:raspberry-pi-pico.launchTargetPath}\" verify reset exit"            ],            "problemMatcher": [],            "windows": {                "command": "${env:USERPROFILE}/.pico-sdk/openocd/0.12.0+dev/openocd.exe",            }        },
It's cool that I can build each project individually but I suspect this is with the help from the CMAKE Tools extension I am using. I just want and need the same functionality with the flashing process.

I visited the GitHub of the extension and it is clear that it was meant for single projects in a workspace, but there is consideration to include multiple flash targets. I am looking for a working work-around until they include it.

Thanks for your time and hopefully help with this issue!

Statistics: Posted by HopWorks — Sat Mar 01, 2025 9:48 pm — Replies 0 — Views 43



Viewing all articles
Browse latest Browse all 4616

Trending Articles