I’ve used successfully Openocd with stm32f4 discovery board using integrated stlink with swd transport (default scripts works well). Now I need to configure Openocd to talk with 2 stm32f4 connected in Jtag using daisy chain (as far as I know SWD can’t do chaining); I’m using an external stlink-v2 dongle with a 20-pin connector.
— OpenOcd Config file
STLINK configuration
puts [format " ********** Interface configuration …"]
interface stlink
stlink_layout usb
stlink_api 1
stlink_device_desc “ST-LINK/V2”
stlink_vid_pid 0x0483 0x3748
adapter_khz 1000
JTAG SCAN CHAIN configuration
puts [format " ********** Jtag scan chain…"]
set CHIPNAME stm32f4x
set CPUTAPID 0x4ba00477
set BSTAPID 0x06413041
set WORKAREASIZE 0x10000
transport select stlink_jtag
#jtag newtap $CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $CPUTAPID
#jtag newtap $CHIPNAME bs -irlen 5 -expected-id $BSTAPID
stlink newtap $CHIPNAME cpu -expected-id $CPUTAPID
stlink newtap $CHIPNAME bs -expected-id $BSTAPID
here newtap for second processor??
set TARGETNAME $CHIPNAME.cpu
target create $TARGETNAME stm32_stlink -chain-position $TARGETNAME
creation of second target??
How can I tell to OpenOCD the irlen/ircapture/irmask? The “stlink newtap” doesn’t seems to accept jtag chain configuration parameters.
Regards,
Elker