2023-05-28 02:11 PM
Recurring Error Message in STM32CubeIDE When Running or Debugging a Project. It shows-
'Launching pain Debug' Has encountered a problem.
Error in final launch sequence:
Failed to execute MI command: load
C:\\Users\\USER\\STM32CubelDE\\workspace_1.12.1\\pain\\ Debug\\pain.elf
Error message from debugger back end:
Error finishing flash operation.
and also it showing
"Error in final launch sequence:
Failed to execute MI command:
load C:\\Users\\USER\\STM32CubeIDE\\workspace_1.12.1\\try\\Debug\\try.elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load C:\\Users\\USER\\STM32CubeIDE\\workspace_1.12.1\\try\\Debug\\try.elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load C:\\Users\\USER\\STM32CubeIDE\\workspace_1.12.1\\try\\Debug\\try.elf
Error message from debugger back end:
Error finishing flash operation
Error finishing flash operation"
How to solve this problem? We are using STM32 NUCLEO-F446RE Board
2024-06-04 08:40 PM
I also encountered a similar issue like you, and I resolved it by connecting the NRST pin of the MCU with the NRST pin of the ST LINK V2.
2024-10-02 12:05 PM
Same (similar) story (STM32IDE v1.15.1, NUCLEO-U5A5ZJ-Q e.g.: STM32U5A5ZJTQ, Cortex-M33).
Different solution:
just rebooted Windows ... :)
2024-10-17 12:33 AM - edited 2024-10-17 12:35 AM
Hi Guys,
I had this same problem and I tried all your solution but none of all worked.
There is one problem about STM32CubeIDE and STM32CubeProgrammer.. they don't tell us if the flash memory is in Read Out Protection.
Solution:
I went on the Option Bytes and I found out that my STM32 had a Read Out Protection level 1, so I changed it to 0.
It worked!
I hope this may help someone
2024-10-18 09:08 AM
Can you show me where is the Option Bytes? How to do find it, and how to change it to 0? Please
2024-10-18 09:19 AM
Hi @Daiyujiuhao ,
You have to open the "STM32CubeProgrammer", or the "STM32 ST_Link Utility", and you have to go on the OptionByte voice (step 1), then search for the voice ReadOutProtection (step 2) and change the value to 0 (step 3).
I attached a screenshot with the steps.
I hope this will help
2024-10-18 03:13 PM
Thank you for your great help,I"ll give it a try.
2024-10-19 09:23 AM
Hi buddy, I tried your method, but it didn't work...
Fortunately, the final solution has been found and I will share it with you.
My computer is running on WIN11 system, The toolbar icons of STM32CUBEIDE is too small,like screenshot...
so I privately checked the high DPI scaling option in compatibility,and selected the system (enhanced),just disable the high DPI scaling option in compatibility,it work normally. Thank you again!
2024-10-22 04:27 AM
Hello @Daiyujiuhao ,
I would never have thought (and I still don't think) that this could be the problem, but the world is so strange that it makes me accept your answer.
Best regards,
Francesco
2024-11-11 01:06 AM
Hi,
Had a the same issue today and it turns out that I was trying to debug with the project text size that was too big for the micro.
Turned on optimization and it fixed the issue.