Bare with me, I’m a complete newbie to these tools.
I have an EP9301 board, and an Olimax ARM-USB-OCD debugger.
I installed all of the drivers and when I run the openocd-fge2xx with the supplied script: lpc2xxx_armusbocd.cfg I can then telnet to port 4444 and run some commands. The ‘reg’ command shows all registers as being 0. when I try mdw I get a message saying the target is not halted.
So my questions:
-
Is there some documentation for the configuration file. I was having trouble getting the main web page to load, I will try again as that seems the best place to find docs.
-
Does anyone else use the EP9301 board with openocd and already have a working config file?
And if it matters at all I will tell you what I want to do. I’m writing some code that I want to run in supervisor mode with my own custom irq handlers for this part. I don’t need anything fancy like Linux, but I do need to override all of the installed vectors with my own.
Basically I just want to connect to the board with gdb, load my program, and start debugging. 
Thanks,
-john
Hello John,
you can find the documentation for OpenOCD configuration scripts and user accessible commands in the Wiki at http://openfacts.berlios.de/index-en.ph … p_Debugger.
The reg command also tells you if the register content is valid (i.e. reflects the current target state). If you use the “halt” command the target should enter debug state, and the “reg” command shows the current value of registers that have already been read. The “armv4_5 reg” command displays the core registers of all modes in table form.
There’s also a page with example configuration scripts in the Wiki, to which I’ve just added the config I’m using with the CS-E9301 board.
Before you’re able to load code you have to setup the memory you want to use, i.e. the SDRAM or the Flash.
Regards,
Dominic
Great thanks Dominic. I’m using the same Olimex board that was listed on the web page, it comes with redboot and some flavor or Linux burned into the flash. When I connect with gdb I think Linux is already booted and running. I’ll have to get a serial cable to stop redboot from auto-booting Linux.
A couple of more questions if you don’t mind:
-
Is there a way to debug right from the first instruction out of reset, or does the internal bootrom have to enable jtag at some point?
-
You said I would need to enable sram or flash, is there a script I can use to enable the sram. I think just leaving redboot on the flash and having that init the sram and stuff is fine for what I want to do. Although at some point I’d like to replace the redboot with my own program, but that is further off.
Thanks a lot for your help,
-John
Hello John,
it’s possible to debug an EP9301 out of reset. Just enter “reset halt” at the telnet interface. This should reset the target and halt it right at address 0x0.
I have a script that I used to initialize the flash and SDRAM iirc, but I haven’t used it for some time, and I don’t remember everything it does. I’ll have to check that first to make sure it doesn’t anything unwanted. I’ll give you a link once I have it ready.
Regards,
Dominic