# new version OPENOCD config file for stm3210 board issue

**URL:** <https://community.sparkfun.com/t/new-version-openocd-config-file-for-stm3210-board-issue/14243>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [January 27, 2010, 5:45pm UTC](https://community.sparkfun.com/t/new-version-openocd-config-file-for-stm3210-board-issue/14243 "2010-01-27T17:45:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mytzeng](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mytzeng](https://community.sparkfun.com/u/mytzeng)\
**Post date:** [January 27, 2010, 5:45pm UTC](https://community.sparkfun.com/t/new-version-openocd-config-file-for-stm3210-board-issue/14243/1 "2010-01-27T17:45:24Z")

</div>

Hi All,

1. Do you know what is the \_CHIPNAME and \_CPUTAPID for the stm3210c-eval in the openocd config file?

2. Do you have sample config file for the new version of openocd?

3. I have got the following error:

Error: Invalid command argument

-chain-position required when creating target

for the “target create $\_TARGETNAME cortex\_m3 -endian $\_ENDIAN -chain-position $\_TARGETNAME -variant lm3s”.

Any idea what is wrong?

1. what is the number for jtag\_khz? Is 10 o.k.?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Freddie\_Chopin](https://avatars.discourse-cdn.com/v4/letter/f/5e9695/32.png) [@Freddie\_Chopin](https://community.sparkfun.com/u/Freddie_Chopin)\
**Post date:** [January 31, 2010, 10:44am UTC](https://community.sparkfun.com/t/new-version-openocd-config-file-for-stm3210-board-issue/14243/2 "2010-01-31T10:44:49Z")

</div>

1. The standard files that come with OpenOCD work fine, so what is your problem?

2. jtag\_khz is the speed of interface in khz. If you want it really sloooooooooooooooooooow you can leave it as 10kHz, but for STM32 you can use 1MHz (1000kHz) without any additional steps.

4/3!!

---

<div class="post-metadata">

**Author:** ![mytzeng](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mytzeng](https://community.sparkfun.com/u/mytzeng)\
**Post date:** [January 31, 2010, 7:33pm UTC](https://community.sparkfun.com/t/new-version-openocd-config-file-for-stm3210-board-issue/14243/3 "2010-01-31T19:33:30Z")

</div>

Hi Freddie,

I am excited to receive your response to my question.

But I don’t understand what you mentioned about the standard files provided by OpenOCD is o.k.

I am trying to run sample like stm\_p103\_blink\_flash project and it comes with the configure file for lm3s6918 (and I need to modify it to run for the Stm3210c evaluation board). And I don’t know what is the proper names for the \_CHIPNAME and CPUTAPID as follows:

set \_CHIPNAME $CHIPNAME

} else {

#set \_CHIPNAME lm3s6918

#set \_CHIPNAME STM32F107VCT (?)

set \_CHIPNAME F107VCT (?)

}

if { [info exists ENDIAN] } {

set \_ENDIAN $ENDIAN

} else {

# this defaults to a little endian

set \_ENDIAN little

}

if { [info exists CPUTAPID] } {

set \_CPUTAPID $CPUTAPID

} else {

# force an error till we get a good number

#set \_CPUTAPID 0x3ba00477

set \_CPUTAPID 0x1f0f0f0f (?)

}

If you have the working configure file for stm3210c eval board, please help to send me one. Thank you for your help.

---

<div class="post-metadata">

**Author:** ![Freddie\_Chopin](https://avatars.discourse-cdn.com/v4/letter/f/5e9695/32.png) [@Freddie\_Chopin](https://community.sparkfun.com/u/Freddie_Chopin)\
**Post date:** [February 1, 2010, 8:57pm UTC](https://community.sparkfun.com/t/new-version-openocd-config-file-for-stm3210-board-issue/14243/4 "2010-02-01T20:57:02Z")

</div>

Well, by “standard” cfg files I mean the one that come with OpenOCD… Depending on your system you should have them installed somewhere around. In Windows thats usually Program Files/OpenOCD//target (for target scripts).

Just try running OpenOCD like this:

openocd -f interface/\<your\_jtag\>.cfg -f target/stm32.cfg -c “jtag\_khz 1000”

and it should work. For \<your\_jtag\>.cfg try the /interface/ folder of OpenOCD scripts which holds configs for most of existing JTAG adapters.

You can also browse OpenOCD source code repository directly to see those files:

[http://openocd.git.sourceforge.net/git/ … 7bed894bc7](http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=tree;f=tcl;h=d9dbc03b550310c4a454d20cfe65deb11f760976;hb=bef37ceba2bde6a34d003762bced007bed894bc7)

To answer your question precisely:

CHIPNAME is just a name which will be displayed in messages and that can be used in various commands - for your situation this can be anything

CPUTAPID of STM32 is 0x3ba00477 - BTW it is the value from standard stm32.cfg file

4/3!!
