(because keeping the wiki pages in the source tree should allow other people to edit them and make pull requests, more easily that modifying the "protected" wiki pages (without making them fully publicly editable.)
This is not quite the same as MCUdude's code, but it has the same
calling conventions. This version doesn't use do_spm from the bootloading
code itself, since that recently went to some effort to use more of
the standardized boot.h calls. That means that this code is a bit
bigger than it really needs to be. (Still small enough to fit within
the 512byte limit, given recent compilers.)
Sadly, the compiler options that barely fit SUPPORT_EEPROM in 512bytes
are incompatible with DO_SPM, so you have to choose. Since do_spm was
supported by the MCUDude platforms, and not 512byte version of optiboot
has ever supported EEPROM, the do_spm code wins, for backward compatibility!
Also standardize the "makeall" shell script names, and update the release script.
Baud rate is calculated using the hardcoded formula:
( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 )
While this is correct for double speed mode, this value is wrong
for single speed mode and leads to corrupted communications.
The issue is fixed by reusing the BAUD_SETTING value.
about moderate baud errors, if PRODUCTION is set. (this reduces
clutter in the output and should make things a bit quicker.
developers are supposed to check all the warnings prior to setting
PRODUCTION)
Make things reasonably self-documenting.
Group related options together (LED, COMM, extra features.)
Group similar targets together. Or less randomly, anyway.
boot_opt.h includes the standard boot.h, defining only the few _short
versions that optiboot needs. It also makes these compile-time compatible
with targets that do NOT have SPMCSR accessible with the OUT instruction
(this edit causes no binary changes to any of the makeall targets)
(Finally) commit the MarkG55/majekw mcusr patches.
Optimize a bit by implementing a union for the
various 16bit address values used (based on
observation by "aweatherguy", but different.)
Slightly optimize math in VIRTUAL_BOOT code
Add some virboot targets, fix some fuses.
Implement LED_START_ON; less code than flashes
"atmega328 SUPPORT_EEPROM=1 LED_START_FLASHES=0 LED_START_ON=1"
now fits (barely) in 512 bytes.
has been unncessary for quite a long time. It turns out that if
we don't call and stdlib functions, then no stdlib bloat gets
added (duh.) Thanks to matthijskooijman for finally noticing this.
It fixes bugs related to using the EEPROM functions (from stdlib)
in spite of library name changes between compiler versions.
(Now compiles with gcc 3.4.x though gcc 5.2.x, AFAICT.)
https://github.com/Optiboot/optiboot/issues/233https://github.com/Optiboot/optiboot/issues/177