cancel
Showing results for 
Search instead for 
Did you mean: 

GDB-server openocd

Kai_Satone
Associate III

Could not verify ST device! Please verify that the latest version of the GDB-server is used for the connection.

Kai_Satone_0-1715061177011.png

Open On-Chip Debugger 0.12.0-00024-gc3ff39f8b (2023-06-26-16:51) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J43S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.308456
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0bb11477
Info : [STM32F030F4Px.cpu] Cortex-M0 r0p0 processor detected
Info : [STM32F030F4Px.cpu] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for STM32F030F4Px.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: [STM32F030F4Px.cpu] clearing lockup after double fault
Polling target STM32F030F4Px.cpu failed, trying to reexamine
Info : [STM32F030F4Px.cpu] Cortex-M0 r0p0 processor detected
Info : [STM32F030F4Px.cpu] target has 4 breakpoints, 2 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10006444
Info : flash size = 32 KiB
shutdown command invoked
Info : dropped 'gdb' connection

 

Error message above have given is there any solution  

1 ACCEPTED SOLUTION

Accepted Solutions

So works - but :

TARGET: STM32F030F4Px.cpu - Not halted
Error: Target not halted

 

set:

AScha3_0-1721031035619.png

AScha3_1-1721031162646.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

10 REPLIES 10
Amel NASRI
ST Employee

Hi @Kai_Satone ,

Are you able to connect properly to your device using STM32CubeProgrammer? Try to ensure an STLink firmware upgrade first.

Do you still have same issue?

-Amel

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.

Yes I am still not able to connect. Every time I tried to connect I get this response "every time I tried to connect I get this response"

Hi @Kai_Satone ,

It is possible that you are using a cloned STM32 device. Is it possible for you to check with other devices?

-Amel

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.

AScha.3
Chief III

Show , whats STM32CubeProgrammer telling :

AScha3_0-1720797009837.png

 

If you feel a post has answered your question, please click "Accept as Solution".

 Afte connect to  STM32CubeProgrammer  this is what i able to gat

kk.png

No I have chack the device it is the oragnal demo board

Good !

so we see:

AScha3_0-1721028521825.png

...connected to F03xx  , ID 0x444 , rev 1.0 .

Flash 16KB  -> but you have in IDE flash size 32KB !  So someone wrong here...sure, you set it to the version of chip, you really have here (16KB) ?

AScha3_1-1721028843012.png

 

+

or - if you set in IDE correct F030F4 for your project, set connect "software reset" -- but debug still not working:

try using the open ocd debugger, just set it in debug settings:

AScha3_2-1721029243612.png

 

If you feel a post has answered your question, please click "Accept as Solution".
Open On-Chip Debugger 0.12.0-00024-gc3ff39f8b (2023-06-26-16:51) [https://github.com/STMicroelectronics/OpenOCD]
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J45S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.299799
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0bb11477
Info : [STM32F030F4Px.cpu] Cortex-M0 r0p0 processor detected
Info : [STM32F030F4Px.cpu] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for STM32F030F4Px.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: timed out while waiting for target halted
Error executing event gdb-attach on target STM32F030F4Px.cpu:
C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.1.0.202306221132/resources/openocd/st_scripts/gdb_helper.tcl:18: Error: TARGET: STM32F030F4Px.cpu - Not halted
in procedure 'gdb_attach_hook' called at file "C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.1.0.202306221132/resources/openocd/st_scripts/target/stm32f0x.cfg", line 164
in procedure 'first_gdb_attach_hook' called at file "C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.1.0.202306221132/resources/openocd/st_scripts/gdb_helper.tcl", line 18
Info : device id = 0x10006444
Info : flash size = 16 KiB
Warn : GDB connection 1 on target STM32F030F4Px.cpu not halted
Info : accepting 'gdb' connection on tcp/3333
Warn : GDB connection 2 on target STM32F030F4Px.cpu not halted
Error: timed out while waiting for target halted
Error executing event gdb-flash-erase-start on target STM32F030F4Px.cpu:
TARGET: STM32F030F4Px.cpu - Not halted
Error: Target not halted
Error: failed erasing sectors 0 to 11
Error: flash_erase returned -304
Info : dropped 'gdb' connection
shutdown command invoked
Info : dropped 'gdb' connection

kk.png

 

So works - but :

TARGET: STM32F030F4Px.cpu - Not halted
Error: Target not halted

 

set:

AScha3_0-1721031035619.png

AScha3_1-1721031162646.png

 

If you feel a post has answered your question, please click "Accept as Solution".