ARM-software / vscode-arm-debugger

https://marketplace.visualstudio.com/items?itemName=Arm.arm-debugger
Other
6 stars 0 forks source link

Debug launch with multiproject solution #3

Open vescovd1 opened 5 months ago

vescovd1 commented 5 months ago

Windows 10 Arm debugger 1.0.0 VSC extension

When I generate a solution with a single project all works fine. my launch.json looks like: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Arm Debug", "type": "arm-debug", "request": "launch", "serialNumber": "${command:device-manager.getSerialNumber}", "program": "${command:embedded-debug.getApplicationFile}", "cmsisPack": "${command:cmsis-csolution.getTargetPack}", "connectMode": "auto", "debugFrom": "main", "probe": "CMSIS-DAP", "programMode": "auto", "resetMode": "auto", "preLaunchTask": "Flash Device" } ] } and my task json looks like: { "version": "2.0.0", "tasks": [ { "label": "Build Context", "type": "cmsis-csolution.build", "solution": "${command:cmsis-csolution.getSolutionPath}", "rebuild": false, "problemMatcher": [], "group": { "kind": "build", "isDefault": true } }, { "label": "Flash Device", "type": "arm-debugger.flash", "serialNumber": "${command:device-manager.getSerialNumber}", "program": "${command:arm-debugger.getApplicationFile}", "cmsisPack": "${command:device-manager.getDevicePack}", "problemMatcher": [], "dependsOn": "Build Context" } ] }

This works just fine for singe project solution. I can build flash and debug. If I have a solution that contains three projects, the first two listed are library build projects and the third is the actual app with dependency of the previous two libraries. This also builds fine but debug launch seems to try to flash and debug only the first listed project (the library). I know I could hard code the absolute build output path in the launch.json's "program" node but that does not seem like the right thing to do. Is there another way?

jreineckearm commented 5 months ago

@vescovd1 , thanks a lot for raising this issue here again!

A change to support such scenarios is in the works. We will notify you here once it has been released.

As a brief outlook: we offer the planned functionality already with the latest Arm Debugger extension release. It replaces the Embedded Debugger in the Arm Keil Studio Pack going forward. There we handle this via the programs option. It can be either an array of paths, or a string that can make use of the following command provided by the Arm CMSIS csolution extension: ${command:cmsis-csolution.getBinaryFiles}.