2020-08-18 09:08 PM
Hi All,
I am trying to program a STM32L152R8 MCU with stm32cubeIDE v1.4. The MCU is not brand-new and is soldered on a board. I want to change its firmware.
While debugging with ST-Link Debugger I encounter the following error:
-------
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a07132.srec
File : ST-LINK_GDB_server_a07132.srec
Size : 9052 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Error: Flash loader cannot be loaded
Error: failed to erase memory
Encountered Error when opening E:\ST\STM32CubeIDE_1.4.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202002181050\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
------
Notes:
Any ideas?
2020-08-18 09:31 PM
You say that you are working with STM32CubeIDE 1.4 but the error messages says that the programming (flash) tool cannot be found in E:\ST\STM32CubeIDE_1.3.0.
It could help if you uninstall all old versions and make a clean install of 1.4 version to solve the issue.
2020-08-18 10:07 PM
Thanks. I copied the error message wrongly. I used both 1.3 and 1.4 versions after clean reinstall. None of them worked.
2020-08-18 11:37 PM
Please try to use STM32CubeProgrammer GUI and erase STM32L152R8 flash with it. Does it work? (The complete STM32CubeProgrammer with GUI needs to be downloaded from ST site if you do not have it installed earlier. STM32CubeIDE only installs the client version without GUI)
Another question. Did it work to erase flash using st-link utility?
2020-08-18 11:39 PM
com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202002181050 (form your above path) is not shipped with the latest STM32CubeIDE (1.4.2. after in-eclipse update). Uninstall & delete all files of 1.3 and 1.4. Then, try re-installing 1.4 from scratch and check again.
hth
KnarfB
2020-08-18 11:47 PM
Yes I erased it completely.
I will check Programmer. Thanks.
2020-08-18 11:48 PM
Thanks. I will try this.