Hi All,
Does anyone have the openocd commands to init the above processors (using GDB to send commands)…
i.e what I want to do is just program the flash, then enter debug mode at the start of the program.
I have searched high and low on the net for the commands for these micros to no avail …
Thanks,
Bernie
Have you looked in the openocd script directory?
target/lpc1768.cfg
Cheers
Spen
ntfreak:
Have you looked in the openocd script directory?
target/lpc1768.cfg
Cheers
Spen
Yes, I have the config file, but that is not what I am after. I am wanting the init script ( xxxx.gdb) that I can pass to GDB which executes monitor commands
to send OpenOCD commands and native GDB commands. This init script is necessary to put the device in reset/halt mode and to start debugging …
Thanks though …
Have not used that target but the gdb cmds are pretty much the same, eg.
target remote localhost:3333
load
mon reset init
thb main
c
The load above will program the flash, i generally have two configs, one with programming and one without.
Cheers
Spen
Thanks.
I am a bit confused. I thought the “load” instruction loaded to RAM. I thought you would have to use a special OpenOCD flash command to load to flash?
Also, does the above commands load the flash and break at main ready for debugging?
The load cmd can be used for both, as long as you have a gdb that supports xml:
http://sourceware.org/gdb/current/onlin … Map-Format
If your gdb does not support memory maps then it will soon complain.
Simply gdb will get the memory map from openocd and it will then know where the flash is located.
This will also help as it will then know when to use software/hardware breakpoints.
Cheers
Spen
How do I tell if gdb supports xml, I just have the latest version from the toolset provided by CodeSourcery.
(GNU gdb (Sourcery G++ Lite 2010q1-188) 7.0.50.20100218-cvs)
Do I have to do anything special in openocd config to support this or does it work out-of-the-box?
Many Thanks,
Bernie
Codesourcery have supported the xml memory map for quite a while.
All you have todo is make sure openocd has a valid flash config and the rest will be done automatically.
Cheers
Spen
Great, thanks for the help.