ATSAME54P20A how convert a .elf to srec

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm working with an ATSAME54P20A and  the compiler built a .elf file, but my programming house is needing an SREC file.  I need to know to convert an elf to srec file, is there a tool for doing that?

Last Edited: Wed. Sep 11, 2019 - 02:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

srec_cat or objdump -O srec should do the trick... 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use objcopy with "-O srec". You will need to use -R's or -j's to say which load sections you want in the binary. (Probably .text and .rodata)

 

BTW moving this from AVR to ARM forum.