Hello everyone!
I’m currently doing some development as an intern and I’ve been asked to migrate from a proprietary Windows solution to an OpenOCD/Linux steup.
In this company they have one ARM-USB-TINY and several Wigglers, so I need to make them both work as they gradually migrate their development environments.
I’ve downloaded OpenOCD 0.3.0-rc0 and built it following the instructions on [1] (under Ubuntu 9.04) and also with the options --enable-parport AND --enable-parport-ppdev
As we’re using the STR7 microcontroller family, I’ve created a configuration file file with the following lines:
telnet_port 4444
gdb_port 3333
source [find interface/olimex-jtag-tiny.cfg]
source [find target/str710.cfg]
and, I could successfully program de uC flash through telnet.
The problem arises when I change the interface to “parport.cfg”. I get the following error:
OLD SYNTAX: DEPRECATED - use jtag_khz, not jtag_speed
jtag_speed: 0
10 kHz
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Warn : use 'str710.cpu' as target identifier, not '0'
Warn : use 'str710.cpu' as target identifier, not '0'
Error: cannot open device. check it exists and that user read and write rights are set. errno=2
Runtime error, file "command.c", line 473:
I then changed the file parport.cfg to:
interface parport
parport_port 0
parport_cable wiggler
jtag_speed 0
jtag_nsrst_delay 20
jtag_ntrst_delay 20
since I’m on linux using ppdev. And now I get the following error message:
parport port = 0
OLD SYNTAX: DEPRECATED - use jtag_khz, not jtag_speed
jtag_speed: 0
jtag_nsrst_delay: 20
jtag_ntrst_delay: 20
10 kHz
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Warn : use 'str710.cpu' as target identifier, not '0'
Warn : use 'str710.cpu' as target identifier, not '0'
Error: Translation from khz to jtag_speed not implemented
Finally, if I use the following config file an everything works out allright:
telnet_port 4444
gdb_port 3333
interface parport
parport_port 0
parport_cable wiggler
jtag_speed 0
jtag_nsrst_delay 20
jtag_ntrst_delay 20
# Boards may override chip names, perhaps based on role,
# but the default should match what the vendor uses.
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME str710
}
# ONLY use ENDIAN with targets that can change it.
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
# TAP identifiers may change as chips mature, for example with
# new revision fields (the "3" here). Pick a good default; you
# can pass several such identifiers to the "jtag newtap" command.
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x3f0f0f0f
}
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x2000C000 -work-area-size 0x4000 -work-area-backup 0
#flash bank str7x <base> <size> 0 0 <target#> <variant>
flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
flash bank str7x 0x400C0000 0x00004000 0 0 0 STR71x
Can anyone point out what I’m doing wrong? or, if I’m trying to use incorrect default files, I’d really appreciate it if someone can tell me which are the right ones.
Thanks in advance!
Martin