Programming flash with multiple .elf files using GDB

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Programming flash with multiple .elf files using GDB

    Hi!

    I have two exec. files. part1.elf and part2.elf. They share the same flash memory area inside my LPC2366. Hence, part1.elf is a bootloader.

    Is it just as easy as running
    arm-elf-gdb.exe -x lpc2366_rom_jlink.gdb part1.elf
    arm-elf-gdb.exe -x lpc2366_rom_jlink.gdb part2.elf

    after eachother in the commando prompt?

    Does the GDB erase the flash area used by the corresponding .elf file before programming?

    My lpc2366_rom_jlink.gdb file contains the following:

    target remote localhost:2331
    monitor flash device = LPC2366
    monitor flash download = 1
    monitor flash breakpoints = 0
    monitor endian little
    monitor speed adaptive
    monitor reset
    monitor long 0xE01FC040 = 1
    load
    quit


    I have noticed that if the quit command is replaced by continue command, the arm-elf-gdb.exe does not quit. I.e. the second program call cannot be executed.

    Is there a better way of doing what I´m trying to do here? ?(

    Thank you.