_PROTECTED_WRITE_SPM Marco in xmega.h?


I would like to know since when the _PROTECTED_WRITE_SPM macro is included in xmega.h? Was this added by Arduino.cc? In an avr-gcc toolchain away from Arduino this is not included in the xmega.h.

It's in <avr/xmega.h> so I think that makes it part of the C library for avr-gcc.


please do not confuse with the _PROTECTED_WRITE macro. I am just wondering why in my self-built avr-gcc toolchains in the xmega.h file the _PROTECTED_WRITE_SPM macro is missing. The only toolchain I know where this is included is the one from Zakkemble. Now I don't know where he got that. Maybe Arduino.cc added this?

Because as soon as I use a newer toolchain than the default 7.3.0 with the Arduino IDE and work with the controller EEprom, I am missing the _PROTECTED_WRITE_SPM macro to compile. I currently have it added manuall.

I would still like to know where the _PROTECTED_WRITE_SPM macro comes from or by whom?

Found a comment at Zakkemble. Link
If it's not from Arduino, it's from Atmel. Can it be?

Translated with www.DeepL.com/Translator (free version)