Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 526 Bytes

NOTES.md

File metadata and controls

12 lines (9 loc) · 526 Bytes

Some notes

AVR and progmem

The AVR's Harvard architecture is the root cause of several headaches, but one in particular is hilarious: ATmega4809 is an AVR, but exposes the flash memory in the RAM address space. This means that it uses the same code as non-AVR platforms. Doing that check in CPP every time would be stupidly noisy, so instead we do it once, in the AVR header, and define the macro NEEDS_PROGMEM for all other AVRs.

The code that needs to use that macro seems like a prime target for refactoring.