0
votes

I have recently started working on Gdb with openOCD for ARM Development on Codeblocks IDE. There are two commands in gdb like "load ./bin/Debug/ledtest.elf", "file ./bin/Debug/ledtest.elf" which will result in writing the program to flash and debugging.

My problem is whenever I am using these commands, its not writing into flash. I don't know how to make my ecosystem to do that? Whether I have to make relevent changes in gdb or openocd? However when I try to flash_write from openocd, it works fine. Any idea? Any relevant document will be helpful.

1
If anyone knows, tell me what are the sequence of commands took into the backend on flash when someone wrote "load ./bin/Debug/ledtest.elf". - anandamu16

1 Answers

0
votes

I don't know if you still have this problem, but anyway for completness:

I use this in my gdb debugger startup in codeblocks:


monitor reset halt

file Output/firmware.elf

mon flash write_image erase Output/firmware.elf

monitor halt

the flash command erases only the segments which are necessary for the firmware.