cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer J-Link issue

colinmurphygc
Associate II

I'm trying to use the STM32CubeProgrammer with the newly supported J-Link settings, but can't seem to get it to work.

I'm using:

  • STM32CubeProgrammer: v2.17.0
  • STM32H573I-DK
  • SEGGER J-Link PLUS: SEGGER J-Link Commander V8.10c (Compiled Oct 16 2024 16:20:30)

I have set the External Debug jumper JP1, and have connected my SEGGER to the DK. I can connect to the DK via the SEGGER using JLinkExe, can debug using JLinkGDBServer, etc. JP4 is set to USB-PD, and I have a usb cable plugged into CN17.

I'm trying to connect to the board using the STM32CubeProgrammer, but am running into issues. With the GUI, I get the following:

```

16:30:49 : UR connection mode is defined with the HWrst reset mode
16:30:54 : xxxxxxxx ---> (have removed SN here, it does show valid number)
16:30:54 : Error: J-Link - Connection to target failed
16:30:54 : Error: J-Link - Reading CPUID failed
16:30:54 : Voltage : 3.31V
16:30:54 : Error: Database cannot be found. DatabasePath = /Applications/STMicroelectronics/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/../Data_Base/STM32_Prog_DB_0xAAA.xml
16:30:54 : Error: flash loader cannot be loaded. FlashLoaderPath = /Applications/STMicroelectronics/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/FlashLoader/0xAAA.stldr
16:30:54 : Error: Database cannot be found. DatabasePath = /Applications/STMicroelectronics/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/../Data_Base/STM32_Prog_DB_0xAAA.xml

```

With the CLI:

```

./STM32_Programmer_CLI -c port=JLINK mode=UR reset=HWrst freq=4000
-------------------------------------------------------------------
STM32CubeProgrammer v2.17.0
-------------------------------------------------------------------

Connecting to J-Link Probe
Error: J-Link - Connection to target failed
Error: J-Link - Reading CPUID failed

```

Any ideas what I can try? I'm using an M1 mac, if you think that might be an issue/something extra I should configure?

1 ACCEPTED SOLUTION

Accepted Solutions
Amine_Jridi
ST Employee

Hello @colinmurphygc,

This is a known issue where the Programmer should automatically switch to AP 1 when it fails in AP 0, as it does with ST-LINK. This will be fixed in the next release.

For now, you can manually change the access port from 0 to 1.

Internal ticket number: 187048 (This is an internal tracking number and is not accessible or usable by customers).

I'll keep you updated.

Thanks,
Amine.


In order 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

8 REPLIES 8
Amine_Jridi
ST Employee

Hello @colinmurphygc,

Can you send your J-Link configuration using Programmer GUI ? 

Amine. 


In order 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.
colinmurphygc
Associate II

Ah, it seems to work with Access Port set to 1.

I've had a quick read through the docs, and can't seem to find what the different access ports relate to on the STM32H573-DK, do you know what these are?

Screenshot 2024-11-12 at 12.02.02.png

Screenshot 2024-11-12 at 10.06.44.png

Amine_Jridi
ST Employee

Hello @colinmurphygc,

This is a known issue where the Programmer should automatically switch to AP 1 when it fails in AP 0, as it does with ST-LINK. This will be fixed in the next release.

For now, you can manually change the access port from 0 to 1.

Internal ticket number: 187048 (This is an internal tracking number and is not accessible or usable by customers).

I'll keep you updated.

Thanks,
Amine.


In order 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.
colinmurphygc
Associate II

Thanks, I can now connect using the J-Link.

I'm trying to interact with the external flash on the DK, and having some more issues. I'm using the `MX25LM51245G_STM32H573I-DK-RevB.stldr` external loader. I can read the flash and erase sectors, but the program immediately crashes when I try to program a file.

Using the ST-LINK with the same external loader and the same .bin, I can program successfully:

Screenshot 2024-11-12 at 16.09.44.png

Using the J-Link, I can read and erase sectors successfully, but not program:

Screenshot 2024-11-12 at 16.11.39.png

Screenshot 2024-11-12 at 16.11.26.png

Using the CLI seems to suggest a Seg fault:

/STM32_Programmer_CLI -c port=JLINK mode=UR reset=HWrst freq=4000 ap=1 -el ExternalLoader/MX25LM51245G_STM32H573I-DK-RevB.stldr -d demo.bin 0x90000000
-------------------------------------------------------------------
STM32CubeProgrammer v2.17.0
-------------------------------------------------------------------

Connecting to J-Link Probe
Device=Cortex-M33
Device ID : 0x484
Voltage : 3.31V
Flash size : 2 MBytes
Segmentation fault: 11

 


@colinmurphygc wrote:

Thanks, I can now connect using the J-Link.


Great - so please mark the solution for this topic:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

 


@colinmurphygc wrote:

I'm trying to interact with the external flash on the DK, and having some more issues.


So that's another issue - please start a new thread for that.

Give a link here to your new thread, so that people can find it.

Amine_Jridi
ST Employee

Hello @colinmurphygc 

 

The issue has been fixed in STM32CubeProgrammer v2.18.

You can download it from this Link.

 

Thanks,

Amine.


In order 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.

@Amine_Jridi wrote:

Hello @Andrew Neil,


you mean @colinmurphygc  ?