0
\$\begingroup\$

I am using a MCU with ARM Cortex M4 processor. I Have written a bootloader on it. Using USB CDC ACM class, i am writting the application code in memory address 0x002000. I have generated both .elf and .bin files of the application code which i want to run through this bootloader. Which file is required to be write in memory from bootloader?.elf or .bin? I have generated both .elf and .bin.

\$\endgroup\$
3
  • 4
    \$\begingroup\$ Depends on the bootloader implementation. If you wrote it, you should know what it wants to be fed! But, most typically, the .bin. \$\endgroup\$ Sep 26, 2016 at 4:46
  • \$\begingroup\$ @pericynthion : Thank you for effort. Currently, in my bootloader, jumping to application code from boot code part is not implemented. For the same reason i want to know that which file is required to write in memory. If .elf is written in memory then how to run the application code from boot code? Similarly, if .bin file is written then how to run the application code? What steps should be required to follow in boot code? \$\endgroup\$
    – Nama
    Sep 27, 2016 at 4:30
  • \$\begingroup\$ Did you ever get an answer? I'm working on a similar problem \$\endgroup\$ Dec 23, 2016 at 0:14

1 Answer 1

0
\$\begingroup\$

My bootloader is working fine. I have used .bin file for downloading in flash. to convert .elf to .bin file use the post building options for GNU gcc compiler as follow : arm-none-eabi-objcopy -O binary My_project.elf My_project.bin

It converts My_project.elf file to My_project.bin file.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.