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.

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". Commented Mar 27, 2017 at 12:46

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.