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
Normal Topic Unable to start debugger, miDebuggerPath invalid for STM32 (Read 2528 times)
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Unable to start debugger, miDebuggerPath invalid for STM32
Jan 26th, 2021 at 12:32pm
Print Post  
I'm trying to debug an STM32 but when i try to launch the debugger, it comes up with the error in the image attached.

The following results are attempts with no local board.txt defined.

Here is the output when uploading using the STLink External 2.1 with OpenOCD method
Code
Select All
Uploading 'SAIN' to 'Nucleo-64' using 'COM3'
Uploader started for board Nucleo-64
Upload method will be: bootloader
Uploading via Bootloader
C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/stlink.cfg" -f "board/st_nucleo_l4.cfg" -c "echo -n {****[vMicro]**** Uploading ELF :}" -c "reset_config; telnet_port disabled; program {C:\Users\Richa\AppData\Local\Temp\VMBuilds\SAIN\STM32_~1\Debug/SAIN.ino.elf} reset;reset_config;shutdown"
Open On-Chip Debugger 0.10.0+dev-01058-g853a05287 (2020-02-13-16:41)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
****[vMicro]**** Uploading ELF :Info : clock speed 500 kHz
Info : STLINK V2J35M26 (API v2) VID:PID 0483:374B
Info : Target voltage: 6.087302
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x1fff3f3a msp: 0x20002c68
** Programming Started **
Info : device idcode = 0x20016462 (STM32L45/L46xx - Rev: Y)
Info : flash size = 256kbytes
Info : flash mode : single-bank
Warn : no flash bank found for address 0x08040000
Warn : no flash bank found for address 0x0804fe60
** Programming Finished **
** Resetting Target **
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
shutdown command invoked
	The upload process has finished.
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination:


# MI Debugger Properties
{
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "localhost:3333",
  "cwd": ,
  "MIDebuggerPath": "{runtime.tools.arm-none-eabi-gcc.path}/bin\\arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "",
  "debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
  "debugServerArgs": "-d2 -l g/SAIN.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -f \"board/st_nucleo_l4.cfg\" -c \"init; reset halt\"",
  "program": elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": \debugger_tmp.natvis",
  "showDisplayString": true
}
 



Output when using STM32CubeProgrammer upload method.
Code
Select All
Uploading 'SAIN' to 'Nucleo-64' using 'COM3'
Uploader started for board Nucleo-64
Upload method will be: bootloader
Uploading via Bootloader
ls\win\stm32CubeProg.bat 0 "C:\Users\Richa\AppData\Local\Temp\VMBuilds\SAIN\STM32_~1\Debug/SAIN.ino.bin" -g
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.6.0                  
      -------------------------------------------------------------------
ST-LINK SN  : 0663FF525750877267234013
ST-LINK FW  : V2J35M26
Board       : NUCLEO-L452RE-P
Voltage     : 6.07V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x462
Revision ID : Rev Y
Device name : STM32L45x/L46x
Flash size  : 256 KBytes
Device type : MCU
Device CPU  : Cortex-M4
Memory Programming ...
Opening and parsing file: SAIN.ino.bin
  File          : SAIN.ino.bin
  Size          : 327832 Bytes
  Address       : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 160]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:10.062
	The upload process has finished.
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination:
RUNNING Program ...
  Address:      : 0x8000000
Application is running
Start operation achieved successfully


# MI Debugger Properties
{
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "localhost:3333",
  "cwd": ,
  "MIDebuggerPath": "{runtime.tools.arm-none-eabi-gcc.path}/bin\\arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "",
  "debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
  "debugServerArgs": "-d2 -l g/SAIN.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -f \"board/st_nucleo_l4.cfg\" -c \"init; reset halt\"",
  "program": elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": \debugger_tmp.natvis",
  "showDisplayString": true
}
 



Cheers!
Richard
« Last Edit: Jan 26th, 2021 at 12:34pm by Bambo »  

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


Posts: 2174
Joined: Feb 13th, 2019
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #1 - Jan 26th, 2021 at 12:44pm
Print Post  
Thanks for the report.

Can you confirm you are not using any entries in a local board.txt? (as the image shows that there are overrides present)

Please set the additional options as shown at the top of the page, and perform a full clean build and attach the output, so we can understand your environment in full.
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #2 - Jan 26th, 2021 at 1:02pm
Print Post  
Simon@Visual Micro wrote on Jan 26th, 2021 at 12:44pm:
Thanks for the report.

Can you confirm you are not using any entries in a local board.txt? (as the image shows that there are overrides present)

Please set the additional options as shown at the top of the page, and perform a full clean build and attach the output, so we can understand your environment in full.


Hi, email has been sent, the board.txt has been deleted. It was not present for the 2 compile outputs in the original post too

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


Posts: 2174
Joined: Feb 13th, 2019
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #3 - Jan 26th, 2021 at 1:45pm
Print Post  
Thanks for the logs, and confirmation.

If you add the below property to the local board.txt file, it should allow the debugging to work as expected for this toolchain:
Code
Select All
} 

  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #4 - Jan 26th, 2021 at 2:07pm
Print Post  
Simon@Visual Micro wrote on Jan 26th, 2021 at 1:45pm:
Thanks for the logs, and confirmation.

If you add the below property to the local board.txt file, it should allow the debugging to work as expected for this toolchain:
Code
Select All
} 



Thank you! It's all working now, but i did have to put this back into the new boards.txt for it to work:
Code
Select All
tools.stlinkv2.server.initCmd=-c "init"  

  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #5 - Jan 26th, 2021 at 2:25pm
Print Post  
Simon@Visual Micro wrote on Jan 26th, 2021 at 1:45pm:
Thanks for the logs, and confirmation.

If you add the below property to the local board.txt file, it should allow the debugging to work as expected for this toolchain:
Code
Select All
} 



Strangely there are now intellisense errors in the IDE, see attached the built in arduino F() and other classes are not being found too.

« Last Edit: Jan 26th, 2021 at 2:28pm by Bambo »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #6 - Jan 26th, 2021 at 2:38pm
Print Post  
It seems like it has broken the arduino libraries somehow, see this in the built in delay() function

« Last Edit: Jan 26th, 2021 at 2:38pm by Bambo »  

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


Posts: 2174
Joined: Feb 13th, 2019
Re: Unable to start debugger, miDebuggerPath invalid for STM32
Reply #7 - Jan 26th, 2021 at 4:32pm
Print Post  
Can you try replacing the previous board.txt entry with the below:
Code
Select All
# Comment this out --> }
tools.stlinkv2.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin
 



This should more accurately override the debug command without affecting intellisense.

The Optimization option may need changing to debug the core functionality more accurately (on the vMicro > Debugger Menu)

Also if you Click vMicro > Show / Hide Hidden Files, this may improve the debugging experience.


  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint