fix: "bootloader__do_spm is not located after interrupts" for ATmega2561 and ATmega1281
authorStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sun, 5 May 2013 18:47:19 +0000 (20:47 +0200)
committerStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sun, 5 May 2013 20:33:46 +0000 (20:33 +0000)
Since the datasheet is the same as for ATmega1284 and ATmega2560 the depicted
table of interrupt seems to be the same, too.
But on the second impression there are small "*" at some interrupts not
implemented in the affected devices.

So adapt the bootloader__do_spm addresses - thank you oh you dear fail safe.

Without following code added last time, I never would have found it before some
critical fail!

    #if defined(_VECTORS_SIZE)
      #if (funcaddr___bootloader__do_spm != (BOOTLOADER_ADDRESS+_VECTORS_SIZE))
#error "bootloader__do_spm is not located after interrupts - sth. is very wrong here!"
      #endif
    #endif

Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
firmware/spminterface.h

index dc08015..f61f216 100644 (file)
@@ -4,7 +4,7 @@
  * Creation Date: 2012-08-01
  * Copyright: (c) 2013 by Stephan Baerwolf
  * License: GNU GPL v2 (see License.txt)
- * Version: 0.96
+ * Version: 0.96.1
  */
 
 #ifndef SPMINTERFACE_H_f70ba6adf7624275947e859bdbff0599
@@ -135,13 +135,13 @@ ret
     #elif defined (__AVR_ATmega1280__)
       #define  funcaddr___bootloader__do_spm 0x1e0e4
     #elif defined (__AVR_ATmega1281__)
-      #define  funcaddr___bootloader__do_spm 0x1e0e4
+      #define  funcaddr___bootloader__do_spm 0x1e0cc
     #elif defined (__AVR_ATmega1284__) || defined (__AVR_ATmega1284P__)
       #define  funcaddr___bootloader__do_spm 0x1e08c
     #elif defined (__AVR_ATmega2560__)
       #define  funcaddr___bootloader__do_spm 0x3e0e4
     #elif defined (__AVR_ATmega2561__)
-      #define  funcaddr___bootloader__do_spm 0x3e0e4
+      #define  funcaddr___bootloader__do_spm 0x3e0cc
     #else
       #error "unknown MCU - where is bootloader__do_spm located?"
     #endif