# OpenOCD supports STM32F103ZC debugging?

**URL:** <https://community.sparkfun.com/t/openocd-supports-stm32f103zc-debugging/9914>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [February 4, 2009, 5:31am UTC](https://community.sparkfun.com/t/openocd-supports-stm32f103zc-debugging/9914 "2009-02-04T05:31:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemant.mscs](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hemant.mscs](https://community.sparkfun.com/u/hemant.mscs)\
**Post date:** [February 4, 2009, 5:31am UTC](https://community.sparkfun.com/t/openocd-supports-stm32f103zc-debugging/9914/1 "2009-02-04T05:31:36Z")

</div>

Hello,

I have STM32F103ZC based system, and i have OpenOCD-SVN:717.

It is programming the STM32F103ZC…

> Open On-Chip Debugger (2008-06-19 19:00) svn: 717
> 
> URL: [http://svn.berlios.de/svnroot/repos/openocd/trunk](http://svn.berlios.de/svnroot/repos/openocd/trunk)
> 
> Info: options.c:50 configuration\_output\_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717
> 
> Info: options.c:50 configuration\_output\_handler(): jtag\_speed: 10, 10
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x06414041 (Manufacturer: 0x020, Part: 0x6414, Version: 0x0)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x06414041 (Manufacturer: 0x020, Part: 0x6414, Version: 0x0)
> 
> Info: target.c:237 target\_init\_handler(): executing reset script ‘program.script’
> 
> Info: stm32x.c:631 stm32x\_probe(): device id = 0x10016414
> 
> Info: stm32x.c:670 stm32x\_probe(): flash size = 256kbytes
> 
> Info: options.c:50 configuration\_output\_handler(): stm32x mass erase complete
> 
> Info: options.c:50 configuration\_output\_handler(): wrote 8492 byte from file ./main.bin in 0.953125s (8.700820 kb/s)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x06414041 (Manufacturer: 0x020, Part: 0x6414, Version: 0x0)

But when i tried to debug the program, in the "RUN" menu, the single stepping functions are inactive (Gray).

And it displayed the following…

> Open On-Chip Debugger (2008-06-19 19:00) svn: 717
> 
> URL: [http://svn.berlios.de/svnroot/repos/openocd/trunk](http://svn.berlios.de/svnroot/repos/openocd/trunk)
> 
> Info: options.c:50 configuration\_output\_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717
> 
> Info: options.c:50 configuration\_output\_handler(): jtag\_speed: 10, 10
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x06414041 (Manufacturer: 0x020, Part: 0x6414, Version: 0x0)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
> 
> Info: jtag.c:1389 jtag\_examine\_chain(): JTAG device found: 0x06414041 (Manufacturer: 0x020, Part: 0x6414, Version: 0x0)
> 
> User: target.c:436 target\_process\_reset(): Timed out waiting for halt after reset
> 
> Info: server.c:78 add\_connection(): accepting ‘gdb’ connection from 0
> 
> Warning: gdb\_server.c:416 gdb\_get\_packet\_inner(): acknowledgment received, but no packet pending
> 
> Error: flash.c:219 get\_flash\_bank\_by\_num(): auto\_probe failed -304
> 
> User: target.c:1838 handle\_soft\_reset\_halt\_command(): requesting target halt and executing a soft reset

OPenOCD-svn:717 does not have debug support for STM32F103ZC ??????

or

What is incorrect with the settings in Eclipse?

**Can someone provide win32 binaries of latest OpenPCD release svn:1xxx ???**

---

<div class="post-metadata">

**Author:** ![gotty](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@gotty](https://community.sparkfun.com/u/gotty)\
**Post date:** [February 4, 2009, 7:22am UTC](https://community.sparkfun.com/t/openocd-supports-stm32f103zc-debugging/9914/2 "2009-02-04T07:22:37Z")

</div>

I’ve successfully debugged blinking led project in RAM with openocd-1362 and wiggler on stm3210e board under eclipse. Toolchain 2008q3-66 from CodeSourcery.

My GDB Initialize command set

```auto
target remote localhost:2001
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
load
tbreak main

```

I can send You openocd binary (native) by e-mail.

---

<div class="post-metadata">

**Author:** ![hemant.mscs](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hemant.mscs](https://community.sparkfun.com/u/hemant.mscs)\
**Post date:** [February 4, 2009, 10:39am UTC](https://community.sparkfun.com/t/openocd-supports-stm32f103zc-debugging/9914/3 "2009-02-04T10:39:54Z")

</div>

Hello,

Thank you for helping again.

It may sound stupid, but i do not know where to put the “GDB Initialization command set”, (i 've just started using these tools) .

(Further, the blinky example also has been supplied with "GDB Initialization commands " in the form of file. Again, how to use?)

1.0 Please let me know how to use these “GDB Initialization commands”.

2.0 Can’t we debug from FLASH, rather than RAM?

3.0 Can you provide win32 binaries of latest OpenPCD release svn:1xxx ???

---

<div class="post-metadata">

**Author:** ![gotty](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@gotty](https://community.sparkfun.com/u/gotty)\
**Post date:** [February 9, 2009, 10:17am UTC](https://community.sparkfun.com/t/openocd-supports-stm32f103zc-debugging/9914/4 "2009-02-09T10:17:44Z")

</div>

Hello,

I’ve tested debugging in flash, it’s ok with following commands

```auto
target remote localhost:2001 
set remote memory-write-packet-size 1024 
set remote memory-write-packet-size fixed 
set remote memory-read-packet-size 1024 
set remote memory-read-packet-size fixed 
monitor halt
load 
thbreak main
monitor reset

```

It work for me with one issue, if I unplug wiggler and reset device (with reset button), program doesn’t start, even if both reset pins (nSRST and nTRST) are connected together. But if I turn device’s power off and then on - program starts. Such behaviour doesn’t trouble me very much, but it’d be nice te get some response from developers.
