cancel
Showing results for 
Search instead for 
Did you mean: 

Simple STM32CubeIDE project with .ioc file for STM32MP2

fa31
Associate II

Hi, I am using STM32MP257F-DK microcontroller. I have never used a dual cortex before. All I want to do is to generate a simple STM32CubeIDE project which also has a .ioc file. I want to debug it via CubeIDE.

1) Do I need OpenAmp to successfully flash the code?

2) I have already set up the SDK, are there other settings I need to take care of?

When I try to flash my current project, It always stops at 78% like shown in the picture below.

image.png

4 REPLIES 4
mbarg.1
Senior II

I am a little confused - are you using STM32MP157F-DK or STM32MP257F-DK ? I could provide a sample code + all related setup, but first clear about correct hw. Thanks

Hi! Thank you for the reply and sorry for the delay, I was a bit busy with another project.

I am using STM32MP257F-DK, mentioned the wrong one in my post.

It will be really helpful to get the example code.

 

Houda
ST Employee

Hello fa31,

Could you please check the GDB debugger on the debug Configurations 

BTW : could you please share the log .

 

fa31
Associate II

My boot switch settings:

Boot 0 = ON

Boot 1 - 3 = OFF

Here are my debug settings:

fa31_0-1741010533474.png

fa31_1-1741010609232.png

fa31_2-1741010657526.png

Then clicking on the "Debug" button gives the following response:

fa31_4-1741011116032.png

 

 

And the following output log is printed to the console:

 

Open On-Chip Debugger 0.12.0+dev-00600-g090b431b1 (2024-09-13-19:12) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain connect_deassert_srst
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V3J15M6B5S1 (API v3) VID:PID 0483:3753
Info : Target voltage: 3.265782
Info : Unable to match requested speed 5000 kHz, using 3300 kHz
Info : Unable to match requested speed 5000 kHz, using 3300 kHz
Info : clock speed 3300 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : [STM32MP257FAKx.ap0] Examination succeed
Info : [STM32MP257FAKx.m33] Cortex-M33 r1p0 processor detected
Info : [STM32MP257FAKx.m33] target has 8 breakpoints, 4 watchpoints
Info : [STM32MP257FAKx.axi] Examination succeed
Info : gdb port disabled
Info : starting gdb server for STM32MP257FAKx.axi on 3334
Info : Listening on port 3334 for gdb connections
Info : gdb port disabled
Info : gdb port disabled
Info : gdb port disabled
Info : gdb port disabled
Info : starting gdb server for STM32MP257FAKx.m33 on 3333
Info : Listening on port 3333 for gdb connections
Info : gdb port disabled
Info : accepting 'gdb' connection on tcp/3333
Warn : [STM32MP257FAKx.m33] target was in unknown state when halt was requested
Info : [STM32MP257FAKx.m33] external reset detected
Error: timed out while waiting for target halted
Error executing event gdb-attach on target STM32MP257FAKx.m33:

Info : New GDB Connection: 1, Target STM32MP257FAKx.m33, state: reset
Warn : GDB connection 1 on target STM32MP257FAKx.m33 not halted
Info : accepting 'gdb' connection on tcp/3333
Error: timed out while waiting for target halted
Error executing event gdb-attach on target STM32MP257FAKx.m33:

Info : New GDB Connection: 2, Target STM32MP257FAKx.m33, state: reset
Warn : GDB connection 2 on target STM32MP257FAKx.m33 not halted
Error: [STM32MP257FAKx.m33] not halted (add breakpoint)
Error: [STM32MP257FAKx.m33] can't add breakpoint: target running
Error: [STM32MP257FAKx.m33] not halted (add breakpoint)
Error: [STM32MP257FAKx.m33] can't add breakpoint: target running
Info : Halt timed out, wake up GDB.