I’m trying to load (flash) my lpc2103 using the slick and cool gdb interface. It works awesomely through insight. I invoke arm-elf-insight (arm-elf-insight main.elf) and hit “run” and it somehow knows to load automatically, which it does, giving the output below:
software breakpoints enabled
Loading section .text, size 0x2e5c lma 0x0
Loading section .data, size 0x4 lma 0x2e5c
Start address 0x0, load size 11872
Transfer rate: 37027 bits/sec, 5936 bytes/write.
Doing what I believe to be the same thing from gdb directly causes a data abort that I can’t explain:
bash-3.1$ arm-elf-gdb build/main.elf
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
service_uart () at ./src/main.c:138
138 }
(gdb) monitor halt
(gdb) load
Loading section .text, size 0x2e5c lma 0x0
Memory access error while loading section .text.
(gdb)
What gives? Is insight doing something under the covers that I don’t understand? Here’s the output of openocd, in case that’s helpful:
Warning:memory write caused data abort (address: 0x00000000, size: 0x4, count: 0x51)
Warning:memory write caused data abort (address: 0x00000000, size: 0x4, count: 0x51)
I can of course provide the openocd file, or even source code if that helps. I can’t help but feel though that this is a n00b mistake, and I’m just forgetting to do something obvious here.
(For extra context, this is leading up to me moving to DDD instead of arm-elf-insight as my debugger, so if anyone has additional information on that, that would be great!)
Cheers!
-R