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
Hot Topic (More than 8 Replies) Unable to start debugging. The Value of miDebuggerPath is invalid (Read 11572 times)
Chris.Deerleg
Newbies
*
Offline


Posts: 5
Joined: Mar 18th, 2021
Unable to start debugging. The Value of miDebuggerPath is invalid
Mar 18th, 2021 at 1:08pm
Print Post  
Hi 
I want setup a debugger with a st-link. It looks like that the miDebuggerPath from debugger_launch.json file is ignored. 

the output file shows: "MIDebuggerPath": "{runtime.tools.arm-none-eabi-gcc.path}/bin\\arm-none-eabi-gdb.exe",   

and I defined in the Debug.debugger_launch.json:
"MIDebuggerPath": arm-none-eabi-gcc\\9.2.1-1.1\\bin\\arm-none-eabi-gdb.exe",

I also tryed to define the path in the borad file:
e-eabi-gdb.exe
   
I followed the procedures as shown in https://www.visualmicro.com/page/Debugging-Using-Custom-Hardware.aspx

Have anyone a idea how to fix the issue? 
  

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. The Value of miDebuggerPath is invalid
Reply #1 - Mar 18th, 2021 at 1:19pm
Print Post  
Thanks for the report.

To use the debugger_launch.json the Debugger needs to be set to Manual/Custom, so all entries would need defining in the JSON, the board.txt is a more portable route here.

The Board.txt definition would need to be without the {} around it:
Code
Select All
eabi-gdb.exe 



And can also be set pointing to the merge field to keep it portable instead of the static entry above (which could break with updates etc..):
Code
Select All
} 


  
Back to top
 
IP Logged
 
Chris.Deerleg
Newbies
*
Offline


Posts: 5
Joined: Mar 18th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #2 - Mar 18th, 2021 at 1:39pm
Print Post  
Thanks now the path is shown correct. 
is  there a option to define the path in the json file? 

because now I get a other error "unable to start the debugger" and I have to figure out the right parameter for "debugServerArgs": to get the debugger running. 

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #3 - Mar 18th, 2021 at 1:51pm
Print Post  
The path in the JSON has to be directly defined, and reviewing the output the missing configuration entry is "{tools.openocd.debug.build.openocdscript}"

If you could attach a build log with the Verbose and Show Build Properties both set (shown at the top of this page), we should be able to advise further on the config, and once working we can fold the board entry into the default configuration for vMicro.
  
Back to top
 
IP Logged
 
Chris.Deerleg
Newbies
*
Offline


Posts: 5
Joined: Mar 18th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #4 - Mar 18th, 2021 at 6:14pm
Print Post  
Hi simon,

I spend my day and figure out how the command line should look like to initiate openocd. (see below cmd line:) 

I changed the "Debugserverargs": in the json file but it seems that this don`t have impact on the output (see below mi debugger properties)

Do you have a clue what I could do next?

Best regrads 
Chris

P.S. I changed the caps to make it possible to post the code because of the forum rule whiche restrict ALL CAPS.


Code
Select All
Error: unable to start degugging. Unable to establish a connection to gdb. Debug output may contain more information

 Output from micro build:

# mi debugger properties
{
  "Serverlaunchtimeout": 5000,
  "Filterstdout": false,
  "Filterstderr": true,
  "Targetarchitecture": "Arm",
  "Stopatentry": false,
  "Externalconsole": false,
  "Mimode": "Gdb",
  "Midebuggerserveraddress": "Localhost:3333",
  "Cwd": hicudriverlocal\\debug",
  "Midebuggerpath": arm-none-eabi-gcc\\9.2.1-1.1/bin\\arm-none-eabi-gdb.Exe",
  "Midebuggerargs": "",
  "Debugserverpath": "C:\\programdata\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.Exe",
  "Debugserverargs": "-d2 -l 2_hicudriverlocal\\debug/hicudriver_san_v5.Ino_debugopenocd.Log}\" -s \"C:\\programdata\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"Interface/stlink.Cfg\" -f \"Stm32f0x.Cfg\" -c \"Init\"",
  "Setupcommands": [],
  "Program": erlocal/debug/hicudriver_san_v5.Ino.Elf",
  "Logging": {
    "Moduleload": false,
    "Trace": false,
    "Enginelogging": false,
    "Programoutput": false,
    "Exceptions": false,
    "Traceresponse": false
  },
  "Visualizerfile": hicudriverlocal\\debug\\debugger_tmp.Natvis",
  "Showdisplaystring": true
}


Debugger_launch.Json:

{
    // gdb project:  "$(projectname)"
    // microsoft mi: https://github.Com/microsoft/vscode-cpptools/blob/master/launch.Md#customlaunchsetupcommands
    // visualizations: https://docs.Microsoft.Com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?View=vs-2019
    // user guide: https://www.Visualmicro.Com/page/user-guide.Aspx?Doc=arduino-gdb-tutorial.Html
    // tips: to access resolved arduino 3rd party hardware spec. Properties, use $(variables) with the same name as the mi json prpperties
    //       to access visual studio macros and environment variables or hard code
    // this file is for advanced use. Please use the pre-configured built-in hardware debuggers where possible.
    //
    "Serverlaunchtimeout": 5000,
    "Filterstdout": false,
    "Filterstderr": true,
    "Targetarchitecture": "Arm",
    "Stopatentry": false,
    "Externalconsole": false,
    "Mimode": "Gdb",
    //"Environment": [],
    //"Customlaunchsetupcommands": [],
    "Midebuggerserveraddress": "$(midebuggerserveraddress)",
    "Cwd": "$(buildpath)",
    "Midebuggerpath": "$(midebuggerpath)",
    "Midebuggerargs": "\"-d3 -s c:\\programdata\\vmicro\\tools\\openocd-0.10.0.20200213\\scripts  -f /interface/stlink.Cfg -c \"Transport",
    "Select" "Hla_swd\" -c \"Set",
    "Workareasize" "0x1fff\" -c \"Set",
    "Chipname" "Stm32f103c8tx\"   -c \"Set",
    "Flash_size" "0xff00\" -c \"Set",
    "Enable_low_power" 1,
    " -c " "Set",
    "Stop_watchdog" 1,
    " -c " "Set",
    "Clock_freq" 480,
    "-f -c " "Set",
    "Connect_under_reset" 1,
    " -f /target/stm32f0x.Cfg ",,
    "Debugserverpath": "$(debugserverpath)",
    "Debugserverargs": "$(debugserverargs)",
    "Setupcommands": [],
    "Program": "$(program)",
    "Logging": {
        "Moduleload": false,
        "Trace": false,
        "Enginelogging": false,
        "Programoutput": false,
        "Exceptions": false,
        "Traceresponse": false
    }

}

Cmd line:
Openocd -d3 -s c:\programdata\vmicro\tools\openocd-0.10.0.20200213\scripts  -f /interface/stlink.Cfg -c "Transport select hla_swd" -c "Set workareasize 0x1fff" -c "Set chipname stm32f103c8tx"   -c "Set flash_size 0xff00" -c "Set enable_low_power 1" -c "Set stop_watchdog 1" -c "Set clock_freq 480"-f -c "Set connect_under_reset 1" -f /target/stm32f0x.Cfg 

 


« Last Edit: Mar 18th, 2021 at 6:19pm by Chris.Deerleg »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #5 - Mar 18th, 2021 at 6:35pm
Print Post  
The best way to post output/logs is to save them as *.txt files on your PC and then use the Attachment option on the message.

  • Is the CmdLine entry at the bottom what you are aiming to achieve (for clarity)?
  • Do you have the menu item vMicro > Debugger > Hardware Debugger set to Manual/Custom?


If you attach/email the full build output (as shown at the top of the page) we will be able to give a more specific answer, and any other settings needed to allow this to work,
« Last Edit: Mar 18th, 2021 at 6:39pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #6 - Mar 19th, 2021 at 1:09pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
 
IP Logged
 
Chris.Deerleg
Newbies
*
Offline


Posts: 5
Joined: Mar 18th, 2021
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #7 - Mar 19th, 2021 at 2:48pm
Print Post  
Thanks now it seems to work. 
I added in the board.txt the following points:
  • }
  • tools.openocd.debug.build.openocdscript=/target/stm32f0x.cfg

and I use the setting :
  • menu item vMicro > Debugger > Hardware Debugger set STLink v2 (extenal)



  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Unable to start debugging. The Value of miDebuggerPath is invalid
Reply #8 - Mar 19th, 2021 at 2:51pm
Print Post  
Thanks for the information, and can see from this that the Debugger is not set to Manual/Custom.

Note - We can always assist more easily and quickly if the build logs are supplied as requested.  Also without this information we cannot integrate this fix into the product so that it automatically works as expected in the future.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint