cancel
Showing results for 
Search instead for 
Did you mean: 

Choosing a specific device in JTAG chain

Visques
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Florent V
ST Employee

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.

View solution in original post

2 REPLIES 2
Florent V
ST Employee

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.
Visques
Associate II

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