Optiboot / optiboot

Small and Fast Bootloader for Arduino and other Atmel AVR chips
Other
1.08k stars 396 forks source link

Makefile should support PACKS, to get new device support #298

Closed WestfW closed 2 years ago

WestfW commented 3 years ago

Microchip/Atmel has been distributing "new device" support in the form of "packs", rather than an updated "toolchain" or "avr-libc" This can result in errors of the form "/usr/avr/include/avr/io.h:623:6: warning: #warning "device type not defined" [-Wcpp]" (followed by a cascade of additional related errors) if you try to compile for a "new" chip that isn't implemented in your installed avr-libc dirs.

Most "new" chips are of the xmega/mega-0/xtiny sort and handled by Makefile.mega0, which already contains support for packs, but there are some "regular" chips that also need it (atmega328pb and other pb-series chips), so pack support should be added to the default Makefile as well.

WestfW commented 3 years ago

as a workaround, there exist instructions for merging "pack" info into a regular distribution: https://www.avrfreaks.net/comment/2526416#comment-2526416

WestfW commented 2 years ago

optiboot-x (makefile.mega0) supports packs, via "PACKS=xxxx" on make command line, or via environment variable.