Hello all,
I am using openOCD 0.4.0. The things that I have is below;
Eclipse IDE,(helios)
A lpc2148 cpu board(uni-ds3 board from mikroelektronika),
ARM-USB-OCD (Olimex) JTAG dongle
all the steps like this;
1- First of all the board can be programmed by using openOCD4.0 with the eclipse.
2- And everythins are ok.
3- When the Hex code transferred to the board again, im getting following error from the console in eclipse.
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
500 kHz
RCLK - adaptive
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Info : RCLK (adaptive clock speed) not supported - fallback to 500 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
error: -100
And the board can not be programmed again…
If i use openOCD + Telnet ,i am getting error again below;
Open On-Chip Debugger
init
reset
JTAG scan chain interrogation failed: all ones
Check JTAG interface, timings, target power, etc.
error: -100
Command handler execution failed
in procedure ‘reset’ called at file “command.c”, line 650
called at file “command.c”, line 361
flash protect 0 0 0 off
cleared protection for sectors 0 through 0 on flash bank 0
flash banks
#0: lpc2000 at 0x00000000, size 0x0007d000, buswidth 0, chipwidth 0
flash erase_sector 0 0 0
Target not halted
failed erasing sectors 0 to 0 (-304)
flash write_image main.hex 0 ihex
Target not halted
error writing to flash at address 0x00000000 at offset 0x00000000 (-304)
Command handler execution failed
in procedure ‘flash’ called at file “command.c”, line 650
called at file “command.c”, line 361
The config file is 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
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4f1f0f0f
}
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
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
$_TARGETNAME configure -event reset-init {
Force target into ARM state
arm core_state arm
Do not remap 0x0000-0x0020 to anything but the flash (i.e. select
“User Flash Mode” where interrupt vectors are not remapped,
and reside in flash instead).
See section 7.1 on page 32 (“Memory Mapping control register”) in
“UM10139: Volume 1: LPC214x User Manual”, Rev. 02 – 25 July 2006.
http://www.standardics.nxp.com/support/ … pc2148.pdf
mwb 0xE01FC040 0x01
disable watchdog
mww 0xfffffd44 0x00008000
enable user reset
mww 0xfffffd08 0xa5000001
CKGR_MOR : enable the main oscillator
mww 0xfffffc20 0x00000601
sleep 10
CKGR_PLLR: 96.1097 MHz
mww 0xfffffc2c 0x00481c0e
sleep 10
PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
mww 0xfffffc30 0x00000007
sleep 10
MC_FMR: flash mode (FWS=1,FMCN=60)
mww 0xffffff60 0x003c0100
sleep 100
}
#flash config komutu
flash bank lpc2000 0 0 <target#> [calc_checksum]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x7d000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum
init_reset halt
write file to flash memory
arm7_9 dcc_downloads enable
sleep 10
#start execution of the program just downladed
#reset run
#sleep 10
init
reset halt
#flash write_image
flash write_image erase unlock main.hex 0x0 ihex
sleep 10
#exit OpenOCD
shutdown
Where is the mistake??
Best Regards
kamil