November 22, 2024, 08:58:18 PM

ARM-USB-OCD + OpenOCD + IAR troubles

Started by masverter, February 28, 2013, 08:24:12 AM

Previous topic - Next topic

masverter

Hello, Guys!
I use Olimex ARM-USB-OCD device + OpenOCD + IAR to debug my project based NXP LPC1759. I performed all instructions of "Manual_IAR.pdf" document, but debug is not work. When I press "Download and debug" GDB server show a lot of errors and warnings as showed below.
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000edf0
...
Block write error
the target is not running when halt was requested stopping gdb

This leads to bad code downloading and not starting from "main".
When I use Eclipse, I run program with follow commands for debugger ("Run commands"):
target remote localhost:3333
symbol-file xxx_flash.elf
monitor reset
monitor sleep 500
monitor soft_reset_halt
monitor flash erase_sector 0 0 29
monitor flash write_image .\\xxx_flash.hex 0x00
thbreak main
cont

and it work fine.
I know that OpenOCD 0.4.0 has first debug session bug, but running OpenOCD 0.6.1 not fix this problem.
Please tell me how I must configure my IAR project to debug perform fine.

maria_olimex

Hello masverter,

Here's what you can try - run openocd from eclipse (the configuration that works for you) without uploading or running anything, just connect successfully. Then in IAR, go to Project Options -> Debugger, choose GDB server and in the tab "Extra options" use the command line options which work for you in Eclipse. It's the same openOCD server, maybe just a different GDB version, but I believe It should work.

Best regards,
Maria/OLIMEX
Software developer at Olimex