2024-11-08 08:49 AM
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:
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?
Solved! Go to Solution.
2024-11-12 05:03 AM
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.
2024-11-11 02:08 AM
Hello @colinmurphygc,
Can you send your J-Link configuration using Programmer GUI ?
Amine.
2024-11-12 04:02 AM
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?
2024-11-12 05:03 AM
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.
2024-11-12 08:25 AM
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:
Using the J-Link, I can read and erase sectors successfully, but not program:
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
2024-11-12 08:51 AM
@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.
2024-11-12 09:06 AM