OpenOCD + GDB + Flash Programming LPC2368 Problem

Started by andy4onroad April 3, 2007
I'm having problems with flash programming and an LPC2368 using GDB.
Presently my major problem is that when I pass the command for flash
programming through GDB to the OpenOCD server I get an error from GDB
at the end of the flash programming process:

(gdb) monitor flash write 0 test.bin 0
Ignoring packet error, continuing...
Reply contains invalid hex digit 116

This error is not generated for "monitor flash erase 0 0 0"

Does anyone have an idea what's wrong or what a work-around is?


(Toolchain is latest YAGARTO)

Here are some relevant setup files:
# A .gdbinit to get the Olimex ARM-USB-OCD to run the LPC2368
# This connects to a GDB Server listening
# for commands on localhost at tcp port 3333 (this seems to be
# where it gets put for OpenOCD
target remote localhost:3333
# Reset the chip to get to a known state.
monitor halt

# Setup OpenOCD and get the chip under control
#-enable the debug communication channel to write to memory.
monitor arm7_9 dcc_downloads enable
#-turn on hardware breakpoints
monitor arm7_9 force_hw_bkpts enable
#-Wait for halt of the processor
monitor wait_halt
# We need this next one to do the halt for Eclipse's soft reset
monitor soft_reset_halt

***(.cfg for OpenOCD)***
#daemon configuration
telnet_port 4444
gdb_port 3333

interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
# JTAG speed needs to be slower otherwise there are strange timeouts
# when trying to configure the device to go.
jtag_speed 50
jtag_nsrst_delay 200
jtag_ntrst_delay 200

#use combined on interfaces or targets that can't set TRST/SRST
reset_config trst_and_srst srst_pulls_trst

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask,
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset

#target arm7tdmi
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

# flash-options LPC2138

An Engineer's Guide to the LPC2100 Series