Hello,
I am using olimex arm-usb-ocd jtag inreface + openocd version 0.5.0 on
windows 7 x64 + eclipse-helios and YAGARTO last version All drivers was loaded properly to my PC. And i am using
uni-ds3 board (mikroelektronika- LPC2148 (12MHz) cpu).Config files that
i am using like below;
Olimex ARM-USB-OCD
http://www.olimex.com/dev/arm-usb-ocd.html
interface ft2232
ft2232_device_desc “Olimex OpenOCD JTAG”
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0003
#daemon configuration
telnet_port 4444
gdb_port 3333
jtag speed
jtag_khz 500
Use RCLK. If RCLK is not available fall back to 500kHz.
Depending on cabling you might be able to eek this up to 2000kHz.
#jtag_rclk 500
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc2148
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
#jtag scan chain
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4f1f0f0f
}
#*************************************************************************************
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
#flash config
flash bank lpc2000 0 0 <target#> [calc_checksum]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x0007d000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum
#*************************************************************************************
################################################################################
#delays on reset lines
################################################################################ jtag_nsrst_delay 200
jtag_ntrst_delay 200
NOTE!!! LPCs need reset pulled while RTCK is low. 0 to activate
JTAG, power-on reset is not enough, i.e. you need to perform a
reset before being able to talk to the LPC2148, attach is not possible.
reset_config trst_and_srst srst_pulls_trst
#----------------------------------------------------------------------------------------------
debug_level 2
jtag init
init
jtag_khz 500
reset run
sleep 100
reset halt
wait_halt 2
PLL disconnect PLLCON
mww 0xE01FC080 0x01
mww 0xE01FC08C 0xAA
mww 0xE01FC08C 0x55
PLL disable PLLCON
mww 0xE01FC080 0x00
mww 0xE01FC08C 0xAA
mww 0xE01FC08C 0x55
no prescaler CCLKCFG
mww 0xE01FC104 0x00
internal RC CLKSRCSEL
mww 0xE01FC10C 0x00
main oscil. CLKSRCSEL
mww 0xE01FC10C 0x01
remap to internal flash
mww 0xE01FC040 0x01
sleep 100
jtag_khz 500
flash probe 0
#----------------------------------------------------------------------------------------------
#init_reset halt
#jtag_khz 500
#init
#halt
sleep 50
#wait_halt
#flash probe 0
arm7_9 dcc_downloads enable
#start execution of the program just downladed
#reset run
#sleep 10
reset init
sleep 100
reset halt
wait_halt 2
flash protect 0 0 0 off
flash erase_sector 0 0 0
#flash erase_check 0
#flash protect_check 0
#flash protect 0 0 7 off
#flash write_image
write file to flash memory
#flash write_image erase unlock main.hex 0x0 ihex
flash write_image EXPKIT.hex 0x0 ihex
sleep 10
#flash protect 0 0 7 on
#reset run
#resume
#exit OpenOCD
shutdown
First off all ,if I program the flash memory of LPC2148, everythings OK! —step1
If i program the flash next step, no possible ! and i am getting following error;
Open On-Chip Debugger 0.5.0-dev (2011-06-07-18:11)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect ‘jtag’
500 kHz
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
debug_level: 2
Info : clock speed 500 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: lpc2148.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Polling target failed, GDB will be halted. Polling again in 100ms
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: lpc2148.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 15
Error: unknown EmbeddedICE version (comms ctrl: 0xffffffff)
Info : lpc2148.cpu: hardware has 2 breakpoint/watchpoint units
Warn : ThumbEE – incomplete support
Polling succeeded again
500 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: lpc2148.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : ThumbEE – incomplete support
target state: halted
target halted in ThumbEE state due to watchpoint, current mode: System
cpsr: 0xffffffff pc: 0xfffffff9
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type ‘help dcc’.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type ‘help fast’.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: lpc2148.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : ThumbEE – incomplete support
target state: halted
target halted in ThumbEE state due to watchpoint, current mode: System
cpsr: 0xffffffff pc: 0xfffffff9
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset.
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type ‘help dcc’.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type ‘help fast’.
500 kHz
flash ‘lpc2000’ found at 0x00000000
dcc downloads are enabled
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: lpc2148.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : ThumbEE – incomplete support
target state: halted
target halted in ThumbEE state due to watchpoint, current mode: System
cpsr: 0xffffffff pc: 0xfffffff9
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset.
core state: ARM
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type ‘help fast’.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: lpc2148.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : ThumbEE – incomplete support
target state: halted
target halted in ThumbEE state due to watchpoint, current mode: System
cpsr: 0xffffffff pc: 0xfffffff9
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset.
Warn : NOTE! Severe performance degradation without fast memory access enabled. Type ‘help fast’.
cleared protection for sectors 0 through 0 on flash bank 0
Warn : ThumbEE – incomplete support
Warn : target reentered debug state, but not at the desired exit point: 0xfffffff9
Warn : lpc2000 prepare sectors returned 12188432
Error: failed erasing sectors 0 to 0
Warn : Verification will fail since checksum in image (0xe1a00000) to be written to flash is different from calculated vector checksum (0xb9205f80).
Warn : To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.
Warn : ThumbEE – incomplete support
Warn : target reentered debug state, but not at the desired exit point: 0xfffffff9
Warn : lpc2000 prepare sectors returned 12188432
Error: error writing to flash at address 0x00000000 at offset 0x00000000
Runtime Error: C:\arm\ECLIPS_UNIDS3\UNIDS3\olimex-arm-usb-ocd-kamil2.cfg:194:
in procedure ‘script’
at file “embedded:startup.tcl”, line 58
in procedure ‘flash’ called at file “C:\arm\ECLIPS_UNIDS3\UNIDS3\olimex-arm-usb-ocd-kamil2.cfg”, line 194
where is the problem? Please help me!
Regards
kamil