Skip to main content
Associate III
Nov 5, 2025 1:12 AM UTC
Solved

Choosing a specific device in JTAG chain

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

Florent V
Florent VBest answer
ST Employee
Nov 5, 2025 8:56 AM UTC

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.

6 replies

Florent V
Florent VBest answer
ST Employee
Nov 5, 2025 8:56 AM UTC

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 III
Nov 5, 2025 5:28 PM UTC

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

Florent V
ST Employee
Dec 15, 2025 4:51 PM UTC

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 III
Dec 15, 2025 8:54 PM UTC

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 III
Jan 6, 2026 10:43 PM UTC

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