2023-05-26 12:56 AM - edited 2023-11-20 04:31 AM
Hi everybody
I'm unable to start my project within the STM32CubeIDE on a STM32U5A9J-DK with the debugger. I would like to use the Segger J-Link as we will use it in our custom design. But i also have problems using the ST-Link V3.
The project was generated with TouchGFX Designer.
My Setup:
I have tested it with the onboard ST-Link V3 and with a Segger J-Link.
ST-Link V3 Setup:
Segger J-Link Setup:
In both cases, sometimes i was able to bring the debugger up, when pressing the Reset button on the Dev Kit. I would suggest, that the Reset of the MCU is not correctly handled.
On the J-Link i always have to press the Reset Button so it might be a configuration issue or Bug of Reset/Startup behavior.
Do you have any suggestion, how i can bring up a reliable setup?
2023-05-26 04:26 AM
Hi @MMess.1
Can you try this test "Connect with cubeProgrammer" ?
Regards
Diane
2023-05-26 05:33 AM
Hi Diane
Maybe i do not get you, but what do you mean with "Connect with cubeProgrammer"?
Flashing the MCU is not the problem. This always works. It only happens when try to use the Debugger.
Regards
Martin
2023-05-26 05:46 AM
just..onboard stlink not working for debug is rather unlikely, ...
in your program, SWD or trace sw debug is enabled ?
and the pins not used in any other way?
or access/modify the option bytes ?
ed
just i seen: on first try after start ide its always working fine ?
-- then i have no good idea..
and if you disconn./USB to board, wait some minute and reconnect and try debug then ?
2023-05-26 06:34 AM - edited 2023-11-20 04:31 AM
Hi AScha.3
I also wondering, why a new received ST Development Kit is not working out of the box with the CubeIDE.
I have used TouchGFX Designer to create thy project, so i'm not 100% sure, what is already used.
But the Debug and Trace ports are not enabled in the *.ioc file.
The prints are sill in default state, i haven't modified or connected anything else.
Option Bytes are also not modified so far.
I just found out, that the CubeIDE starts the Debug perspective where it look's like it is in break state somewhere in the startup file. But in the Console, i see that the ST-LINK is still programming the memory:
So i guess, this is a bug of the CubeIDE which should wait for Flash programming before starting the Debugging perspective.
Still sometimes i have to reset the board manually by pressing the reset button first.
2023-11-13 10:22 AM
This is just a thought and your experience may vary.
In the debug configuration, I chose to NOT launch the debugger in the background.
Doing so seemed to resolve this annoying GUI state that would indicate that the memory download is completed but is in fact still ongoing.
I have also noticed a significant latency in the operation of the GDB or OpenOCD communication framework with the target. In my opinion this is more due to the design of the communication channels (TCP/IO, client server, etc. - you get the idea) more than a limitation of the debug hardware itself. I say this because direct connections to STM32 MCUs using an off-board stlink hardware works fine in most cases.
2023-12-06 01:26 PM
Do you need SWO for the JLink to work? I noticed that the SWO pin is not connected by default (solder bridge removed) and the pin is connected to something else. It's on page 39 in um2967-discovery-kit-with-stm32u5a9nj-mcu-stmicroelectronics.pdf