2023-08-08 09:21 PM
Hi,
While flashing code in STM32G474VBT6, I am getting below error. After reinstalling cube ide and cube programmer, same error continues.
STMicroelectronics ST-LINK GDB server. Version 7.4.0
Copyright (c) 2023, 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
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.14.0
-------------------------------------------------------------------
Log output file: C:\Users\NIKHIL~1\AppData\Local\Temp\STM32CubeProgrammer_a02888.log
ST-LINK SN : 68005200040000363036544E
ST-LINK FW : V2J42S7
Board : --
Voltage : 3.26V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x469
Revision ID : Rev X
Device name : STM32G47x/G48x
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M4
BL Version : 0xD5
Debug in Low Power mode enabled
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a02888.srec
File : ST-LINK_GDB_server_a02888.srec
Size : 73.29 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Error: Operation exceeds memory limits
Error: failed to erase memory
Encountered Error when opening C:\ST\STM32CubeIDE_1.13.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.0.202305091550\tools\bin\STM32_Programmer_CLI.exe.
Error in STM32CubeProgrammer
Shutting down...
Exit.
Can anyone help me to get solution?
Thanks
Nikhil
Solved! Go to Solution.
2023-08-10 04:44 AM
Hello @HMoens
Yeah Agree with you.
2023-11-29 12:23 PM
I had the same weird erase problem with 1.13 - it worked with older versions and also with STM32CubeProgrammer I can still erase and program the microcontroller (STM32G473 in my case) without a problem using the same ST-LINK/V2 and same frequency setting.
Now I tried the new Version 1.14 - still same problem.
For a product like the STM32CubeIDE, which is still actively developed, it is inacceptable to be forced to use an old version. Calling this downgrade a "solution" is an outrage.
2024-02-09 02:38 PM
I was experiencing the same error on my NUCLEO-WB55RG. It was due to a few things related to my un-orthodox setup.
Setup:
1.) NUCLEO-WB55RG is setup as an I2C Slave connected to Master STM32F7 controller. Powering of the NUCLEO-WB is from the STM32F7 controller.
2.) NUCLEO-WB55RG project is loading the X-CUBE-TOUCHGFX, Note: Still awaiting delivery of my GFX01M2 card
First issue (Error: failed to erase memory) was related to the Power source of the NUCLEO-WB.
Resolution: The JP1 jumpers for the NUCLEO-WB need to be set too 5V EXT, thus supplying power for the St-Link and the Board itself.
Second Issue (Failed to initialize external memory!) Related to initializing QSPI when the address is not addressable.
STMicroelectronics ST-LINK GDB server. Version 7.5.0
Copyright (c) 2023, 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
InitWhile : Enabled
Failed to initialize external memory!
Resolution: Temporarily disable the External Loader in the Debug configuration.
Hope this saves someone's time.
2024-02-09 02:51 PM
Thanks, that is good to know! Surely, the error can be caused by different problems.
But the thing discussed here is about the problem with the STM32CubeIDE.
The debugging of STM32G4xx just wouldn't work with IDE 1.13 and 1.14 - which was clearly a bug.
Accessing the CPU with the STM32CubeProgrammer always worked so I could rule out hardware issues.
But now - good news: They finally fixed it. Version 1.14.1 works again (for me).
2024-02-21 04:26 AM
Hey!
i faced same error when i was trying to write flash memory for stm32
i changed debug configurations for that project.
need to change Reset Behaviour to None which comes under debugger tab of debug configurations.
i hope this resolves the error
2024-03-13 10:26 AM - edited 2024-03-13 10:27 AM
I have a similar problem, my whole team doesnt want to update STMcubeIDE , they are afraid random *** stops working.
I am using a STLINK-V3SET, with firmware
It works only with IDE v1.10, shich is very sad, I tried with stmCubeIDE v1.12 1.13 1.14 and same error:
My guts are telling me ST changed something in the way linker scripts or the makefile is generated (AGAIN) so older projects generated with older IDE versions (older than 1.10) are not linking correctly anymore
2024-03-13 10:29 AM
this didnt work for me
2024-04-04 04:06 AM
hey @RhSilicon pleaze dont give silly solutions like this. :face_with_tears_of_joy: im also getting same issue with cubeIDE and IAR work bench. according to you it was IDE version issue so it should have to work with other tool chains IDE like MDKARM or EWARM.
I tried to flash the code with CubeIDE, IAR work bench and also with Cube Programmer in all of these software it showing only one error that is failed to erase memory.
2024-04-25 09:28 AM - edited 2024-04-25 09:29 AM
We found how to go around the problem :
The issue is with cubeProgrammer versions newer than 2.13.
If using a standalone cubeProgrammer newer than 2.13 and trying to flash an specific .elf file will result in Erasing memory segment 0 error.
When using cubeProgrammer version 2.13 the thing flashes , no complaining.
So the problem here is cubeIDE version 1.12.1 comes with a cubeProgrammer v2.13 CLI plugin, this means flashing or debugging our project with cubeIDE 1.12.1 works, but the same thing with newer cubeIDE versions doesnt.
How to fix this, folder swapping plugins from two IDE versions, (disclaimer its ugly):
2024-05-28 01:42 AM
Hello @Javier1,
Thank you for solution, oh yes, now my IDE 1.15.1 (it was 1.14.1 till yesterday) with my STM32G473 board finally works!!
I enjoyed so too much while I found your solution..
B.R.
mxo