0

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.

anandamu16
  • 103
  • 1
  • 2
  • 9
  • 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 Mar 27 '17 at 12:46

1 Answers1

0

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.

fractalwrench
  • 4,028
  • 7
  • 33
  • 49
duderino65
  • 13
  • 2
  • Thanks for reply, But whenever, I uses 'monitor reset halt' it gives me the error 'ocd_bouncer'. Do you have any idea, what could be the reason? – anandamu16 Aug 01 '17 at 04:01