Can I build SAM-BA and my application code into a single elf?

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

Hi all,

I am using a SAML21 chip that doesn't have the built in SAM-BA Rom.  After quite a bit of work I have modified the example SAM-BA project to work with my design.  I'm now wondering if there is a way to build the boot loader code and my application code into a single elf so I only have to program the device once during production.  I hoped that importing both projects into a single solution (Atmel Studio 7) might do the trick but it just builds each one individually.  I'm stumped and haven't found much info regarding what I am trying to achieve.  Any help or suggestions would be appreciated.

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

Maybe a linker incantation to locte the bootloader object or maybe objcopy can do something for you.

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

After looking around the forum a bit I found a solution to my problem, which was to ultimately only need to load one .hex file during production programming.  In the atmel studio device programmer I first loaded the boot loader.  I then unchecked the erase before flashing box and programmed the application code.  Finally, I read that all back into a single hex file.  I'm sure there is a better way but this seems to work.