I have some questions concerning programming the flash (for the purposes of debugging) for ARM microcontrollers. First, I am completely new, so please be gentle. I’ve spend quite a bit of time researching, but in many cases, more questions arise than answers.
My setup is as follows:
Eclipse Helios edition
Olimex ARM-USB-TINY debugger
Olimex LPC2103 eval board
Yagarto (GCC Build 4.5.1) I think
OpenOCD R204
GDB 7.1
The Olimex install CD was used to get a basic setup, but a new Yagarto install was performed to get the latest GCC build. Likewise an update of Eclipse was performed. Test software compiles fine.
Now comes debugging. Generally, I would like to debug in flash, so I need to upload the program into flash and execute. I’ve looked at the configuration files (*.cfg) that came on the Olimex CD, and many, many others from lots of sources. Problem is, there seems to be lots of ways to accomplish this (too many in fact).
First, there doesn’t seem to be any commands in the config files from Olimex that programs flash. Looking through various websites and forums, there seems to be methods for letting GDB perform the flash programming, or OpenOCD.
For GDB, some commands in the config file for allowing GDB flash programming appear to be (partial):
#daemon configuration
telnet_port 4444
gdb_port 3333
#==============================
#setup gdb to program flash
gdb_memory_map enable
gdb_flash_program enable
gdb_breakpoint_override hard
#==============================
But there also seems be be a “source” GDB command that needs to be added somewhere in here as well. It looks like the “source” command calls another script file. Are the actual flash programming commands in this seperate script file ? Are these just OpenOCD “flash write_image” commands or what ? I’ve never seen the contents of this second script file.
There also appears to be a way to add the flash programming commands within the configuration file. If the “init” command is added after the configuration, then the flash programming commands (OpenOCD type commands like “flash write_image”) could follow the init command to program flash. I say “appears” because I’ve never actually seen a complete config file like this.
Could someone please describe some of the flash programming/debugging options. I’m not interested in 1000 different ways of doing the same task - just a few good ones.
Thanks