new version OPENOCD config file for stm3210 board issue

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.

  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!!

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.

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

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!!