Romdebug using openocd [solved]

Hai,

I have problem with rom debugging.

I burn appl.bin file, which is just simple led blink code. When i reboot the target, my application is running. When i tried to do romdebug, the insight windows shows the following

“Select function name to disassemble”

“Program stoped at 0x7fffd2b8”

My flash script file is as follows

arm7_9 dcc_downloads enable

wait_halt

sleep 10

poll

flash probe 0

flash erase 0 0 0

flash write 0 appl.bin 0x0

reset run

sleep 10

my gdb commands are as follows

target remote localhost:3333

monitor reset

monitor sleep 500

monitor poll

monitor soft_reset_halt

monitor arm7_9 hw_bkpts enable

break main

When i do single step, the openocd show following waring msg

"Info: arm7_9_common.c:277 arm7_9_add_breakpoint(): sw breakpoint requested, but software breakpoints not enabled

Info: breakpoints.c:73 breakpoint_add(): can’t add software breakpoint, resource not available"

Any help is highly appreciated

Karuna

Hi,

monitor arm7_9 hw_bkpts enable

That should be “monitor arm7_9 force_hw_bkpts enable”. This command instructs the OpenOCD to replace all software breakpoint requests from GDB with hardware breakpoints.

The 0x7fff… address is part of the LPC2000 on-chip bootloader. Are you sure your program was running at that point?

Regards,

Dominic

Thanks domnic, it works