Use a local pointer in eraseApplicatoin() - saves 18 Bytes
A single write is sufficient to invalidate magic word - saves 4 bytes
Use delay routines without NOP padding. this saves 16 bytes
Do modulo only on lower byte - saves 24 bytes

GCC generated some quite weird code from the module operations. Although
highly optimized, most of the instructions are redundant. Is this a bug?
The current solution is a bit hacky, but should also work when the pages
size is changed in future devices.

uchar isLast = (((currentAddress&0xff) % SPM_PAGESIZE) == 0);
1e02: 80 91 69 00  lds r24, 0x0069
1e06: 90 91 6a 00  lds r25, 0x006A
1e0a: 8f 73        andi r24, 0x3F ; 63
1e0c: 99 27        eor r25, r25
// definitely need this if! seems usbFunctionWrite gets called again in
future usbPoll's in the runloop!
if (isLast) fireEvent(EVENT_WRITE_PAGE); // ask runloop to write our
page
1e0e: 89 2b        or r24, r25
1e10: 39 f0        breq .+14      ; 0x1e20 <main+0x1ee>
1e12: 0d c0        rjmp .+26      ; 0x1e2e <main+0x1fc>
Reduce accesses to global variable idlePolls

saves 8 bytes
Enabled garbage collection and better disassembly

Should have no impact on code
moved vector functions to writeFlashPage(), fixed RESTORE_OSCCAL
tiny85FlashInit(); only checks on byte now

20 bytes less
Revert changes to writeFlashPage()

Revert changes to writeFlashPage() - the changes introduced some
inconsistency and only saved 4 bytes anyways. This version is verified
and works.
Bugfixes to make micronucleus reentrant
Updated USB Driver, nanite, oscal
remove
Freebie: Removed unused code for 6 byte gain
further size optimization in calibrateoscillator.

1976 bytes
assembler version of calibrateoscillator - 1952 bytes

still needs cleaning up
source code clean up
Merge branch 'testing' of github.com:Bluebie/micronucleus-t85 into cpldcpu-testing
Fix: re-introduce testing for magic byte
Dont wait for writes - CPU is halted anyways.
minor