2023-01-31 01:02 AM
Hello,
I am trying to start a debug session with STM32CubeIDE v1.11.2 on my board locked on RDP 0.5.
I loaded a valid secure firmware which jumps into the non-secure firmware before setting RDP 0.5.
I could connect STM32CubeProgrammmer and flash the non-secure flash memory with the non-secure firmware, that works fine.
Now I am trying to start to debug the non-secure application with STM32CubeIDE, but I got the following error when I start the debug:
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load /home/ooueslati/STM32CubeIDE/workspace_1.11.2/som_u5_user_br/sample_app/Debug/sample_app.elf
Could you help me?
FWI, I set my ".gdbinit" file as follows:
-set remotetimeout 50
-set tcp connect-timeout 50
In my debug configuration>Debugger tab, I set "Reset type" = "None"
I joined here the .srec file of the non-secure application.
Thank you.
2023-01-31 06:35 AM
Hi @OOUES.1,
it looks like the IDE is trying to download the binary to the MCU at the start of the session. Which it's unable to do. Change the debug configuration in the startup tab to download=false.
Use the secure code to load new non-secure binary.
BR,
J
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-02-01 12:50 AM
Hi @JHOUD
Thank you for your reply,
that means that I should develop a specific mechanism in the secure fw that allows to load the non-secure firmware.
BR,
O.
2023-02-01 01:16 AM
Sure, this is the typical use of the secure and non-secure separation. Look up TF-M or SBSFU for STM32 for examples of practical implementations. I believe the U5 Cube Package even includes these examples, under /B-U585I-IOT02A/Applications
BR,
J
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.