Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Locked Topic Unable to start debugging. miDebuggerpath is invalid (Read 4191 times)
Steve BB
Newbies
*
Offline


Posts: 5
Joined: Jul 20th, 2020
Unable to start debugging. miDebuggerpath is invalid
Jul 21st, 2020 at 11:23am
 
I'm trying to debug a stm32 blue pill using st-link, in Visual Studio 2019. I can get it to compile and download, but when I ry to start debug, I get a pop-up window saying "value of miDebuggerPath" is invalid.
I've set the debug to Hardware, STLink v2 external, with no optimisation.
I believe I have a full license purchased in 2017.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #1 - Jul 21st, 2020 at 11:55am
 
Could you please attach the below logs so we can see the full setup:-
1) Build log with the vMicro > Compiler > Verbose and Show build properties enabled as shown at the top of this page in the yellow box
2) Enable vMicro > Upload > Verbose, and attach the output from the Micro Build Window when attaching the debugger (you will need to dismiss the error first then attach this)

There may be alternative solutions to get this working:-
1) Install the latest SAMD Adafruit board package 
or
2) To use the STM32 tools > Right click project, Add > Local Board.txt and add the below line to it:-
Code
Select All
tools.stlinkv2.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin 


Then save and try re-attaching the debugger
  
Back to top
 
IP Logged
 
Steve BB
Newbies
*
Offline


Posts: 5
Joined: Jul 20th, 2020
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #2 - Jul 21st, 2020 at 4:17pm
 
Here is the build output.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #3 - Jul 21st, 2020 at 4:44pm
 
Thanks, and this confirms that the solutions above will work for your project.

The simplest is #2 To use the STM32 tools > Right click project, Add > Local Board.txt and add the below line to it:-
Code
Select All
tools.stlinkv2.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin  



The variety of cores for the STM32 boards have made it difficult to resolve to a reliable single property in the past, and we will re-check this to see if this can be avoided in future with a more suitable default.
  
Back to top
 
IP Logged
 
Steve BB
Newbies
*
Offline


Posts: 5
Joined: Jul 20th, 2020
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #4 - Jul 21st, 2020 at 5:55pm
 
I added that  line into a board.txt file and re-ran. Now I get a popup saying "unable to establish a connection to gdb". I disable my virus protection, and now when I run I get a popup "GDB exited unexpectedly with exit code 1". Debug output is:
Starting: "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" -d2 -l no_DebugOpenOCD.log}" -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/stlink.cfg" -f "target/stm32f1x.cfg" -c "init; reset halt"
Starting: -gcc\9.2.1-1.1/bin\arm-none-eabi-gdb.exe" --interpreter=mi
"C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe" exited with code 1 (0x1).
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #5 - Jul 21st, 2020 at 6:16pm
 
Thanks, could you attach the below log file as this should have further information as to what the issue is:-
Code
Select All
_DebugOpenOCD.log 

  
Back to top
 
IP Logged
 
Steve BB
Newbies
*
Offline


Posts: 5
Joined: Jul 20th, 2020
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #6 - Jul 21st, 2020 at 6:26pm
 
I feel we're getting close now. Could be a clone of STM32 with wrong chip id. But how to pass correct chipid into openocd?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #7 - Jul 21st, 2020 at 6:45pm
 
There are two ways to change this:-

Option 1: Edit the OpenOCD cfg file directly:-
Edit the file below in notepad, and change the _CPUTAPID line #42 from 0x1ba01477 to  0x2ba01477
Code
Select All
C:\ProgramData\VMicro\tools\openocd-0.10.0.20200213\scripts\target\stm32f1x.cfg 



Option 2: Add another Local board.txt property
This will override the default OpenOCD config file shown in Option 1 without the file edit:-
Code
Select All
tools.stlinkv2.server.targetCmd=-c "set CPUTAPID 0x2ba01477" -f "{tools.openocd.debug.build.openocdscript}" 



It should spring to life (fingers crossed) with either of these options set....
  
Back to top
 
IP Logged
 
Steve BB
Newbies
*
Offline


Posts: 5
Joined: Jul 20th, 2020
Re: Unable to start debugging. miDebuggerpath is invalid
Reply #8 - Jul 21st, 2020 at 7:28pm
 
I played the second option and we're all debugging happily now. Cheesy

Simon, thanks very much for your help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint