arduino / ArduinoCore-avr

The Official Arduino AVR core
https://www.arduino.cc
1.24k stars 1.05k forks source link

elf files for bootloaders #521

Open zemanj opened 1 year ago

zemanj commented 1 year ago

It's helpful to have the production bootloader *.hex files in the repo, however, what I am missing right now are the corresponding *.elf files.

Knowing the addresses of the symbols defined in a bootloader from its elf file would allow accessing SPM functionality directly from within a sketch (e.g., for writing flash memory pages etc.).

Would it be possible to include those files in the repo?

MCUdude commented 1 year ago

The Optiboot bootloader that Arduino boards are shipped with doesn't have any "write-to-flash-from-user-application" functionality, so providing elf files wouldn't help you here. However, 3rd party Arduino cores usually use newer bootloaders that have this kind of functionality, for instance, MiniCore.