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) ST-Link not visible in Hardware Debugger List, shows only Manual/Custom (Read 251 times)
Swiss Matt
Junior Member
**
Offline


Posts: 16
Joined: Nov 30th, 2022
ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Mar 30th, 2026 at 1:46pm
Print Post  
I have a problem... (I don't often have problems Smiley
With an Arduino GIGA R1 connected to an ST-Link V3 box via the JTAG connector, I see "STMMicroelectronics STLINK" in the Uploader/Hardware Programmer list, but it is not shown in the Debugger / Hardware Debugger list which shows only "Manual/Custom". See the attached picture "missing-stlink.png".
How can I debug with STLINK?
(The STMCubeProgrammer seems to work OK and can access the MCU.)
  

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


Posts: 2883
Joined: Feb 13th, 2019
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #1 - Mar 30th, 2026 at 3:02pm
Print Post  
Thanks for the report, and we will look into getting this configured for the STLink Debugger so it appears in the list.

The Manual Custom option can be setup today, and there looks to be partial configuration in the platform.txt for the board already, and we can help configure this if desired?
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2883
Joined: Feb 13th, 2019
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #2 - Mar 30th, 2026 at 4:10pm
Print Post  
Can you try adding a Custom Debug JSON to the project (vMicro > Add Code > Add Custom GDB Debugger (Advanced), and then paste in the contents of the below file.

Then if you run the debugging session via Debug > Attach to Process it should kick in.  If the code needs to build and upload first use Debug > Start Debugging.
  

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


Posts: 16
Joined: Nov 30th, 2022
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #3 - Mar 31st, 2026 at 8:23am
Print Post  
Good morning Simon,
Thanks for your response. I tried that, and get some rather different errors, see the attached file. I noticed that "Add Code" added a boards.txt file too.
The STLINK box works well with the Arduino IDE for download and debugging, and it works with the STMCubeProgrammer, so I am not being delayed. But it would be very nice to get it working with Visual Micro.
  

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


Posts: 2883
Joined: Feb 13th, 2019
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #4 - Mar 31st, 2026 at 10:31am
Print Post  
Thanks for the update.

Just to clarify, when you say debugging works in the Arduino IDE, is that:
a) Using the Ozone Debugger
b) Using the RPC approach
c) Using the STLink and the Standard Arduino 2 IDE Debugging

If it is C can you attach a verbose log from attaching the debugger as there seem to be some missing configurations when I try it.

  
Back to top
IP Logged
 
Swiss Matt
Junior Member
**
Offline


Posts: 16
Joined: Nov 30th, 2022
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #5 - Mar 31st, 2026 at 10:51am
Print Post  
I'm using c) STLink and the standard Arduino IDE.
Attached is a file with the text from the Debug Console and gdb-server output tabs.
  

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


Posts: 2883
Joined: Feb 13th, 2019
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #6 - Mar 31st, 2026 at 11:45am
Print Post  
Thanks for the log and detail, can you try the attached launch.json in vMicro?
  

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


Posts: 16
Joined: Nov 30th, 2022
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #7 - Mar 31st, 2026 at 2:08pm
Print Post  
I tried it, but we're not there yet. I get a message box with "Unable to start debugging. Unable to establish a connection to GDB." Micro Build output text is attached.

  

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


Posts: 2883
Joined: Feb 13th, 2019
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #8 - Apr 1st, 2026 at 2:35pm
Print Post  
Thanks for trying it, can you try the attached when possible?

The only change is to use the ELF file currently, as there are no other obvious differences I can see currently.
  

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


Posts: 16
Joined: Nov 30th, 2022
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #9 - Apr 1st, 2026 at 5:32pm
Print Post  
Hi Simon, 

This is what I have tried:

* Successfully updated the bootloader via ST-Link V3, with both the Arduino IDE, Visual Micro and the STMCubeProgrammer. So that part is working.
* The program upload via the ST-Link also works with the Arduino IDE and Visual Micro.
* I also tried JLink Mini. Burn bootloader and upload both work with Visual Micro.
* Debugging with ST-Link and JLink both work well with the Arduino IDE.
* But ST-LINK and J-link both fail with Visual Micro when it tries to start the debugger with the same error message box, "Unable to start debugging. Unable to establish communication to GDB."

To use JLink for debugging, I just changed the launch script -f switch to this ... -f \"interface\\jlink.cfg\" (not that I have any idea what I'm doing there).

Here's the Debug output (it's for JLink, but ST-Link is the same)
Starting: duino2\bin\openocd.exe" "-s uino2\share\openocd\scripts\ -f "interface\jlink.cfg" -c "transport select hla_swd" -f "target\stm32h7x_dual_bank.cfg""
Starting: \7-2017q4/bin/arm-none-eabi-gdb.exe" --interpreter=mi -ex "set pagination off" -ex "set remotetimeout 5"
duino2\bin\openocd.exe" exited with code 1 (0x1).

I shall play a bit more tomorrow.
But if you have any more ideas...

Cheers, Matt
« Last Edit: Apr 1st, 2026 at 5:33pm by Swiss Matt »  
Back to top
 
IP Logged
 
Swiss Matt
Junior Member
**
Offline


Posts: 16
Joined: Nov 30th, 2022
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #10 - Apr 1st, 2026 at 6:00pm
Print Post  
In case this helps, here's a file with the text from the output tabs of the Arduino IDE, where debugging is working (although with the Arduino IDE it's sometimes hard to tell if it's working or not...  Smiley

And this is from the "Upload Using Programmer" in the Arduino IDE, maybe the "Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED" message has something to do with it. I've seen the same message with Visual Micro.

***

Sketch uses 111696 bytes (5%) of program storage space. Maximum is 1966080 bytes.
Global variables use 47512 bytes (9%) of dynamic memory, leaving 476112 bytes for local variables. Maximum is 523624 bytes.
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 0

hla_swd
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800067c msp: 0x24080000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800067c msp: 0x24080000
** Programming Started **
** Programming Finished **
shutdown command invoked

« Last Edit: Apr 1st, 2026 at 6:12pm by Swiss Matt »  

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


Posts: 2883
Joined: Feb 13th, 2019
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #11 - Apr 2nd, 2026 at 9:23am
Print Post  
Thanks for the detail, and normally the "Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED" is a false error, as the WinUSB Driver should be installed for the probe using Zadig.

Can you give the attached a try, I had over quoted the OpenOCD commands which wouldn't have helped test this.

If this doesn't work then a remote session may be the fastest way to iron this out so we can integrate it into the menus for simpler setup in the future.
  

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


Posts: 16
Joined: Nov 30th, 2022
Re: ST-Link not visible in Hardware Debugger List, shows only Manual/Custom
Reply #12 - Apr 3rd, 2026 at 1:33pm
Print Post  
Hi Simon,
It's working! Thank you very much!  Smiley

(There was a minor error in the JSON, but I fixed it...
"program": "C:\\Users\\matth\\AppData\\Local\\Temp
\\VMBuilds\\OptimizedGPIO\\giga\\OptimizedGPIO.ino.elf", 
Was missing the Debug subdirectory, "\\Debug\\OptimizedGPIO.ino.elf".)

Another thing I noticed which caused a problem:

My VS Solution now has two Projects, OptimizedGPIO and OutputExpander8. I had the OptimizedGPIO project as the Active Project. 
When I did the "VMicro / Add code ..." it created the xx_launch.json file in the OutputExpander8 directory and added it to that project. 
I expected it to add it to the Active Project.
« Last Edit: Apr 3rd, 2026 at 1:34pm by Swiss Matt »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint