I think you need to look at the linker map files provided with the examples. These files will have a .ld
extension and often you will see the letters RAM
or ROM
or Flash
in the file name. The linker file is just a text file so you can examine it in the Eclipse editor. The important part is that the .text
section is located in the ROM.
The launcher for the GDB will also have a startup script associated with it. You can edit this using the Configure...
choice under the same Eclipse menu item that starts GDB. The script needs to end with lines like
monitor flash device = LPC1343
monitor flash download = 1
The monitor
command in GDB sends the rest of the line to the GDB server. The flash
commands are explained in the JLink GDB server manual.
EDIT: The .text
section is the default section used by the linker for executable code. In my gcc_arm.ld
file I have this:
SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
*(.text*)
} > FLASH
I put the reset and interrupt vectors in their own section and force the linker to put those at the very beginning of the executable code.