Hello everybody,
I am trying to upload and debug my code on a LPC2146 chip in an asctec board.
I have Olymex ARM-USB-TINY-H jtag interface (for OpenOCD and GDB).
I have installed OpenOCD 0.4.0, Eclipse CDT and yagarto and I am trying to debug using zylin native.
I followed the tutorial in yagarto (http://www.yagarto.de/howto/yagarto2/index.html) which is very useful, and the tutorial in olymex but the first is for sigger jtag interface and the second one does not explain everything.
When I run openOCD I got the same message showed in the olymex tutorial (this should mean that I got the communication with the jtag intarface) but I can not debug.
I run OpenOCD with the following config files (both provided by olymex):
-f /../olimex-arm-usb-tiny-h.cfg
-f ../target/lpc2148.cfg
(my target is LPC2146 but I guess the config does not change since the only difference is the flash memory)
so far should be ok (at least according olymex tutorial)
When I debug I get these msgs:
target remote localhost:3333
0x00000000 in ?? ()
monitor sleep 500
monitor poll
background polling: on
TAP: lpc2148.cpu (enabled)
target state: running
monitor flash probe 0
flash 'lpc2000' found at 0x00000000
monitor flash erase 0 0 13
flash erase 0 0 13: command requires more arguments
in procedure 'flash' called at file "command.c", line 650
called at file "command.c", line 361
monitor flash write 0 main.bin 0x0
flash write 0 main.bin 0x0: command requires more arguments
in procedure 'flash' called at file "command.c", line 650
called at file "command.c", line 361
monitor reset run
JTAG tap: lpc2148.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part: 0xf1f0, ver: 0x4)
NOTE! DCC downloads have not been enabled, defaulting to slow memory writes. Type 'help dcc'.
NOTE! Severe performance degradation without fast memory access enabled. Type 'help fast'.
monitor sleep 500
monitor soft_reset_halt
requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
symbol-file test_ram.elf
thbreak main
Hardware assisted breakpoint 1 at 0x40000320: file src/main.c, line 73.
continue
it does not look complety wrong but probably I miss some commands.
My Init commands are:
target remote localhost:3333
monitor sleep 500
monitor poll
monitor flash probe 0
monitor flash erase 0 0 13
monitor flash write 0 main.bin 0x0
monitor reset run
monitor sleep 500
monitor soft_reset_halt
monitor arm7_9 force_hw_bkpts enable
symbol-file main.elf
thbreak main
continue
I am not using any run command.
Which exact GDB initialization commands should I use in my debug configuration?Should I use Run commands?
Any advice would be very appreciated!!
Thanks in advance.