Also, it's a bad sign if your own code lokos confusing after only a month, so use better names for the PMUX-related values (MYPMUX_REG instead of MYPMUX, and MYUART_PMUX_VAL instead of MYUART_PMUX) Also, use the enums for 4809/etc.
Dynamically read chip signature, which should permit quie a bit of sharing of single binaries between multiple chips (as long as LED and UARTTX are the same.)
Now that we have a slower clockrate, the LED delay only needs 16bits.
Update Makefile help text, and the options saved in flash with BIGBOOT.
Document fuse requirements/issues.
For example "make -f Makefile.mega0 drazzy3217"
Add LED_INVERT option to makefile option parser.
Clean up RSTPIN for chips with only two values.
Shave off a few bytes by writing PMUX instead of ORing, and using the default clock speed (20MHz/6) instead of turning off the divider. (not that we need to save space yet.)
Implement something for the "do_spm" function. This just writes "cmd" to NVMCTREL.CTRLA; I'm not sure whether an application can write to the page buffer to make that sufficient. Needs testing.
ATtiny412 working.
add RSTPIN option to control the (internal) FUSE values.
More source code "prettyfication"
Observation: in MPLABX, if you set the project linker memory options
for ".postapp=0x200", MPLAB will happily double those values before
actually passing them to the linker, because you must have meant WORDS, right?
Observation 2: The ATmega4809 definition in avrdude.conf is diffrent in the Arduino distribution than in the latest avrdude, specifically WRT whether the flash is word-addressed or byte-addressed :-(
1) Changing the watchdog period (inc turning it on) requires paying
attention to synchonization between the WDT clock and system clock.
2) "jmp 512" doesn't work. I'm not sure exactly what happens, but it doesn't go where I expected.
For now, do away with the fancy reset-cause logic and revert to old-style bootloader behavior. Don't even do the no-wait mod; at least this permits you to enter the bootloader by power-cycle.
Implement LED_INVERT for boards that have the blink LED between +5V and pin.
Now working on ATtiny416 Xplained Mini!
Try to add a dummy "application" for freshly programmed parts, that will keep running the bootloader instead of keep running the empty app. (Doesn't work, though. MPLAB won't program it!)
Clean up some obsolete comments.
Eliminate RTC-based LED flashing code in favor of busy loop, which is significantly shorter now that peripherals are not in range of quick IO instructions.
Minor formatting changes while the code is young (notably spaces after the function name at the spot where they're actually defined, which makes them easier to search for. Ancient corporate coding style guideline...)
These are preprocesing and commenting changes, and do not cause any changes in the binaries (tested for all of the bootloaders generated by the makeall.* scripts.)
- use avr-gcc 5.4.0 shipped with Arduino 1.8.7 as it's the only one
that supports PB chips
- added new targets (mostly ATtiny chips)
- generate comparison with emoji by default
- update allow_failures
get our own copy of https://github.com/WestfW/Arduino-avr-tools-install
and used that to set up the tool paths. You still need to make "make"
installed in the path (or in the arduino tools bin directory.)