2024-07-15 12:47 AM
Hello,
After updating STM32CubeIDE to version 1.16, starting a debugging session doesn't load program into the STM32L5 target and jumps directly to the reset Handler.
I tried programming the bin file using STM32CubeProgrammer and it works well.
However, erasing the FLASH using STM32CubeProgrammer and launching a debug session then reading back the FLASH using STM32CubeProgrammer shows that it's empty.
Im trying to load the program to the address 0x08020000, here is the memories definition.
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
SRAM2 (xrw) : ORIGIN = 0x20030000, LENGTH = 64K
BOOTLOADER (rx) : ORIGIN = 0x08000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 352K
}
Solved! Go to Solution.
2024-08-20 11:04 PM
@BluntDog actually yes, the update corrupted some STM32CubeProgrammer Files in this directory "C:\ST\STM32CubeIDE_1.16.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.400.202404281720\tools\bin\FlashLoader"
I understood that it contains the configuration used by the STM32CubeProgrammer prior to programming the binary.
I replaced the "FlashLoader" directory by the one I found in the previous version of STM32CubeProgrammer "com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.201.202404072231" and everything worked fine.
2024-07-15 02:54 AM
@ABouk.1 wrote:starting a debugging session doesn't load program into the STM32L5 target
Is downloading enabled in your Debug Config:
2024-07-15 04:47 AM
2024-07-15 08:11 AM
Hello @ABouk.1 ,
Which file have you modified? Is it the STM32xxxx_FLASH.ld or have you create a new one?
If so, have you updated the project settings to select the proper linker script ?
2024-07-15 08:16 AM
Hi @SMarie ,
I modified the STM32L562VETXQ_FLASH.ld and selected it in the linker script (in projet properties) as you can see in the attached screenshot.
In OpenOCD the program is loaded before debugging but in GDB server mode it jumps directly to debugging without erasing/programming the flash.
2024-07-16 12:37 PM
Any ideas pls ? im struggling with this problem.
I tried uninstalling/reinstalling STM32CubeIDE but I still have the same problem.
Im only able to use OpenOCD but I cannot enable RTOS Awareness / SWV ...
Does the log file says something about this problem ?
2024-07-18 03:07 AM
Update : When using the initialization command : "monitor flash mass_erase", the STM32CubeProgrammer v2.17.0 is invoked and performs the command, however calling load <project_name>.elf doesn't, it's like this command is just ignored.
Any ideas pls ?
------ Switching to STM32CubeProgrammer -----
-------------------------------------------------------------------
STM32CubeProgrammer v2.17.0
-------------------------------------------------------------------
Log output file: C:\Users\ABO1\AppData\Local\Temp\STM32CubeProgrammer_a12776.log
ST-LINK SN : 38FF6906304E4B3043191943
ST-LINK FW : V2J45S7
Board : --
Voltage : 2.37V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x472
Revision ID : Rev Z
Device name : STM32L5xx
Flash size : 512 KBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0x92
Mass erase ...
Mass erase successfully achieved
------ Switching context -----
2024-08-20 03:26 PM
I have exactly the same problem with STM32CubeIDE 1.16.0 and an STM32L562RET6. Did you solve the problem?
2024-08-20 11:04 PM
@BluntDog actually yes, the update corrupted some STM32CubeProgrammer Files in this directory "C:\ST\STM32CubeIDE_1.16.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.400.202404281720\tools\bin\FlashLoader"
I understood that it contains the configuration used by the STM32CubeProgrammer prior to programming the binary.
I replaced the "FlashLoader" directory by the one I found in the previous version of STM32CubeProgrammer "com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.201.202404072231" and everything worked fine.
2024-10-29 12:16 PM
I can confirm this is still an issue on clean install of stm32cubeide 1.16.1 and 1.16.0. Then I did clean install of 1.15.1 and it debugging now performs upload.