avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] SPMCR poisoning workaround for ATmega128


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] SPMCR poisoning workaround for ATmega128
Date: Sat, 8 Jun 2013 10:55:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

As John Beard wrote:

> I'm still curious, though: what would a patch for avr-libc look
> like?  Just doing something like just removing the check for
> "defined (SPMCR)" in boot.h when compiling for mega128?

That would be the last resort.

This one appears to work:

Index: include/avr/boot.h
===================================================================
--- include/avr/boot.h  (revision 2402)
+++ include/avr/boot.h  (working copy)
@@ -109,10 +109,12 @@
 /* Check for SPM Control Register in processor. */
 #if defined (SPMCSR)
 #  define __SPM_REG    SPMCSR
-#elif defined (SPMCR)
-#  define __SPM_REG    SPMCR
 #else
-#  error AVR processor does not provide bootloader support!
+#  if defined (SPMCR)
+#    define __SPM_REG    SPMCR
+#  else
+#    error AVR processor does not provide bootloader support!
+#  endif
 #endif
 

I'm going to commit it that way.
-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]