Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
#else
#if defined (__AVR_ATmega8__) || defined (__AVR_ATmega8A__) || defined (__AVR_ATmega8HVA__)
#define funcaddr___bootloader__do_spm 0x1826
#else
#if defined (__AVR_ATmega8__) || defined (__AVR_ATmega8A__) || defined (__AVR_ATmega8HVA__)
#define funcaddr___bootloader__do_spm 0x1826
+ #elif defined (__AVR_ATmega32__)
+ #define funcaddr___bootloader__do_spm 0x7054
#else
#error "unknown MCU - where is bootloader__do_spm located?"
#endif
#else
#error "unknown MCU - where is bootloader__do_spm located?"
#endif
* try to make this array as big as possible
* (so bootloader always uses 2kbytes flash)
*/
* try to make this array as big as possible
* (so bootloader always uses 2kbytes flash)
*/
-#if defined (__AVR_ATmega8__) || defined (__AVR_ATmega8A__) || defined (__AVR_ATmega8HVA__)
+#if defined (__AVR_ATmega8__) || defined (__AVR_ATmega8A__) || defined (__AVR_ATmega8HVA__) || defined (__AVR_ATmega32__)
-#if (BOOTLOADER_ADDRESS != 0x1800)
- #error BOOTLOADER_ADDRESS!=0x1800, on current MCU "funcaddr___bootloader__do_spm" might be currupted - please edit spminterface.h for nonstandard use
+#if defined (__AVR_ATmega8__) || defined (__AVR_ATmega8A__) || defined (__AVR_ATmega8HVA__)
+ #if (BOOTLOADER_ADDRESS != 0x1800)
+ #error BOOTLOADER_ADDRESS!=0x1800, on current MCU "funcaddr___bootloader__do_spm" might be currupted - please edit spminterface.h for nonstandard use
+ #endif
+#elif defined (__AVR_ATmega32__)
+ #if (BOOTLOADER_ADDRESS != 0x7000)
+ #error BOOTLOADER_ADDRESS!=0x7000, on current MCU "funcaddr___bootloader__do_spm" might be currupted - please edit spminterface.h for nonstandard use
+ #endif
+#else
+ #error undefined device selection - this should not happen!
#endif
//assume SPMCR==0x37, SPMEN==0x0, RWWSRE=0x4, RWWSB=0x6
const uint16_t bootloader__do_spm[17] BOOTLIBLINK = {0x0000, 0x2dec, 0x2dfd, 0xb6b7, 0xfcb0, 0xcffd, 0xbf27, 0x95e8, 0xb6b7,
#endif
//assume SPMCR==0x37, SPMEN==0x0, RWWSRE=0x4, RWWSB=0x6
const uint16_t bootloader__do_spm[17] BOOTLIBLINK = {0x0000, 0x2dec, 0x2dfd, 0xb6b7, 0xfcb0, 0xcffd, 0xbf27, 0x95e8, 0xb6b7,
- 0xfcb0, 0xcffd, 0xe121, 0xb6b7, 0xfcb6, 0xcff4, 0x9508, 0xFFFF};
+ 0xfcb0, 0xcffd, 0xe121, 0xb6b7, 0xfcb6, 0xcff4, 0x9508, 0xFFFF};
/*
00001826 <bootloader__do_spm>:
1826: 00 00 nop
/*
00001826 <bootloader__do_spm>:
1826: 00 00 nop