I am developing for a ATMega32 target, but don't have any of them at the moment, so am using ATMega16.
I'd like the code to be invariant of the target at this stage (ie when flash, ram and eeprom are within the bounds of the ATMega16 limits), but I've noticed at least one potential gotcha - the interrupt vector table, whilst having the same interrupts and the same size, is arranged differently!
So, two questions:
- are there any other potential gotchas?
- what's the ASM trick to have invariant code that runs all the interrupts properly no matter whether it's deployed to ATmega16 or ATMega32?