Skip to main content
Associate II
November 5, 2025
Solved

Choosing a specific device in JTAG chain

  • November 5, 2025
  • 3 replies
  • 191 views

Hi,

I can't seem to find the launch configuration setting to specify a device in the JTAG chain by its position and IRpre length. I'm using a J-link programmer and I can usually do this from the command line by passing the -jtagconf x,y argument to the J-link executable. However, the debug console in VScode shows that the debug launch config called the Segger J-link GDB server without this argument. I can't seem to find how to make the debug config to append this to the J-link server call

 

Visques_0-1762305065631.png

Is this supported by the STM32Cube extension?

Thanks

Best answer by Florent V

Hi Visques,

The attribute serverJtagCfg will be available in the next delivery (planned for the end of November).

In the meantime, you can use the generic debug configuration to pass the -jtagconf argument in the serverParameters attribute.

Ex: 

 {
 "type": "stgdbtarget",
 "request": "launch",
 "name": "STM32Cube: STM32 Launch Generic GDB Server",
 "origin": "snippet",
 "cwd": "${workspaceFolder}",
 "preBuild": "${command:st-stm32-ide-debug-launch.build}",
 "program": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
 "gdb": "${command:st-stm32-ide-debug-launch.get-gdb-executable}",
 "serverExe": "JLinkGDBServerCL",
 "serverParameters": ["-s", "-if", "jtag", "-device", "STM32H723ZG", "-speed", "4000", "-endian", "little", "-novd", "-jtagconf", "9,2"],
 "serverHost": "localhost",
 "serverPort": "2331",
 "serverCwd": "<Path to your JLink installation>",
 "runEntry": "main",
 "imagesAndSymbols": [
 {
 "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
 "imageOffset": "",
 "symbolFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
 "symbolOffset": ""
 }
 ],
 "verbose": true
 },

 
(Note: Update the serverCwd attribute with your path)

Best Regards,
Flo

3 replies

Florent V
Florent VBest answer
ST Employee
November 5, 2025

Hi Visques,

The attribute serverJtagCfg will be available in the next delivery (planned for the end of November).

In the meantime, you can use the generic debug configuration to pass the -jtagconf argument in the serverParameters attribute.

Ex: 

 {
 "type": "stgdbtarget",
 "request": "launch",
 "name": "STM32Cube: STM32 Launch Generic GDB Server",
 "origin": "snippet",
 "cwd": "${workspaceFolder}",
 "preBuild": "${command:st-stm32-ide-debug-launch.build}",
 "program": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
 "gdb": "${command:st-stm32-ide-debug-launch.get-gdb-executable}",
 "serverExe": "JLinkGDBServerCL",
 "serverParameters": ["-s", "-if", "jtag", "-device", "STM32H723ZG", "-speed", "4000", "-endian", "little", "-novd", "-jtagconf", "9,2"],
 "serverHost": "localhost",
 "serverPort": "2331",
 "serverCwd": "<Path to your JLink installation>",
 "runEntry": "main",
 "imagesAndSymbols": [
 {
 "imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
 "imageOffset": "",
 "symbolFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}",
 "symbolOffset": ""
 }
 ],
 "verbose": true
 },

 
(Note: Update the serverCwd attribute with your path)

Best Regards,
Flo

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
VisquesAuthor
Associate II
November 5, 2025

Thanks for your quick reply. I'll wait until the next update then

Florent V
ST Employee
December 15, 2025

Hi @Visques ,

Thanks to the latest 3.7.0 release, the attribute for JTAG configuration is now available.

"serverJtagCfg": "<IRPre>,<DRPre>",

With the tooltip:

FlorentV_1-1765817419976.png

 

Regards,
Flo

 

 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
VisquesAuthor
Associate II
December 15, 2025

Thanks so much! 

 

Btw: Not sure if the information box should say TDO instead of TDI? Usually IRPre and DRPre are counted from TDO

VisquesAuthor
Associate II
January 6, 2026

One more thing: How can I attach to a running STM32 target by using its specific JTAG address? If I select "attach" in "request" the "serverJtagCfg" option becomes invalid. 

Thanks