I apologize for double posting this. I posted a week or so ago in the OpenOCD forum with no response. I think this is probably a better venue for this type of question:
I’ve been using arm-elf-gcc/insight for some time now with my LPC2103 olimex board, and I’d like to “graduate” to just using GDB at the console instead. I don’t feel like insight buys me a whole lot, and it’s just more clutter on my small screen than anything else. What I can’t figure out though is how to load and start my program I’m talking about RAM only. (I’ve got a handle on flash I think) Here’s my session:
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x7fffe278 in ?? ()
(gdb) load
Loading section .text, size 0xa80 lma 0x40000000
Start address 0x40000050, load size 2688
Transfer rate: 21504 bits/sec, 298 bytes/write.
(gdb) i p
Debugging a target over a serial line.
Program stopped at 0x7fffe278.
It stopped with signal SIGINT, Interrupt.
(gdb)
So what’s next? I can jump directly to 0x40000000 by setting the PC, but that doesn’t get me far before the program bombs. I guess I have to set up the stack pointer and stuff, but no… that’s set up by my startup code? I’m a little lost here. I know this can work, because arm-elf-insight does it under the covers. What the heck is it doing?! On a related note, is there an easy way to tell what arm-elf-insight is doing with gdb behind the scenes? I’ve been looking for a way to log/record that stuff, but with no luck.
Thanks for the help, you guys have all been great!