STM32CubeIDE enter in debug mode, but not flash the program.
Hi everyone,
I'm having some trouble entering in debug mode in the Nucleo-L496ZG.
It seems like the compiler and link works fine, as the output window shows:
arm-none-eabi-size CLP_STM32L4.elf
text data bss dec hex filename
39427 488 15964 55879 da47 xxxxxxxxxxxx.elf
Finished building: default.size.stdout
On the other hand when I click in the debug button, something strange happen:
STMicroelectronics ST-LINK GDB server. Version 5.2.3
Copyright (c) 2019, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
Waiting for debugger connection...
Debugger connected
And apparently it freezes, the ST-LINK LED in the board awkward turn "off" (green is very weakly on) and the play button of debug toolbar in the IDE is disabled, like it's trying to run to the main routine. No code is flashed, I checked by read the memory from it using ST Visual Programmer, I also erased before try again. Try another IDE (AC6 Workbench) with is very similar IDE and it works fine, flashing and debugging.
I also try to run debbug in the CubeIDE with my program made in AC6 in the flash. But now the debug stop in a new tab, informing that there is no debug info to show were the program hit the breakpoint. I stop debugging and the chip kept the behavior of my program compiled in the AC6 (CubeIDE main is empty, fresh from the CubeMX interface).
The video from the ST website seems to be very straight forward, hit the debbug button, check the Serial Wire Viewer Enabled, type the target core clock and start debbug no problem.
There are other configuration that need to be done before flash? I can't find anything to enable/disable this feature.
Thanks for the help!