cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8T6 Debugging

JLall.2
Associate II

Hello I am trying to move a small io project to smaller chip. I am trying no code project just confirm enter debugger works.

STM32F103C8T6 

STM32Cube IDE 1.9

I Get ST-Link Error When attempting to debug. Reason(18) Could not verify ST device! Abort connection.

Error halting cpu. See attached. Any suggestions?

Open On-Chip Debugger 0.11.0+dev-00443-gcf12591 (2022-02-09-13:33) [ST Internal]

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 V2J39S7 (API v2) VID:PID 0483:3748

Info : Target voltage: 3.280321

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 0x2ba01477

Info : STM32F103C8Tx.cpu: Cortex-M3 r2p0 processor detected

Info : STM32F103C8Tx.cpu: target has 6 breakpoints, 4 watchpoints

Info : starting gdb server for STM32F103C8Tx.cpu on 3333

Info : Listening on port 3333 for gdb connections

Info : STM32F103C8Tx.cpu: external reset detected

Info : accepting 'gdb' connection on tcp/3333

target halted due to debug-request, current mode: Thread 

xPSR: 0x01000000 pc: 0x080000f0 msp: 0x20002800

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : device id = 0x10010414

Info : flash size = 256kbytes

O.K.

O.K.:0xE00FFFD0

Info : dropped 'gdb' connection

shutdown command invoked

11 REPLIES 11
JVovk.1
Associate

This might be out of topic since I'm using PlatformIO and Arduino but I managed to upload and debug a clone. Maybe the configuration bellow can help someone:

[env:STM32F103C8_CLONE]

platform = ststm32

board = genericSTM32F103C8

framework = arduino # arduino, mbed, cmsis, ...

debug_tool = stlink

upload_protocol = stlink # stlink , dfu

build_flags = -Wl,--undefined,_printf_float

upload_flags = -c set CPUTAPID 0x2ba01477 # Working upload for clone

debug_server =

  ~/.platformio/packages/tool-openocd/bin/openocd

  -s ~/.platformio/packages/tool-openocd/scripts

  -f interface/stlink.cfg

  -c "transport select hla_swd"

  -c "set CPUTAPID 0x2ba01477" # Working debug for clone

  -f target/stm32f1x.cfg

  -c "reset_config none"

Sir,

If my STM32F103C8T6 has 128KB flash and reports ID 0x410, is it the original one?