Make sure NOBITS is set on reset_key

Patch from https://github.com/qmk/qmk_firmware/issues/3657#issuecomment-415147411

Long story short, in avr-gcc pre-8.2, reset_key was assigned to a memory area that was in a normal range, but when 8.2 came out, that memory got moved to an out of range area, causing errors like 0x800293 out of range. Apparently, this was fixed up in avr-gcc, but we haven't seen a release with the fix yet (we expected it in 8.3, but that didn't happen for some reason).

What this commit does is move the reset_key back to the original memory location it was in before.
This commit is contained in:
Danny Nguyen 2019-03-20 17:45:45 -04:00 committed by skullydazed
parent 50fce7f255
commit 746058306b

View File

@ -70,7 +70,7 @@
* http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html * http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
*/ */
#define BOOTLOADER_RESET_KEY 0xB007B007 #define BOOTLOADER_RESET_KEY 0xB007B007
uint32_t reset_key __attribute__ ((section (".noinit"))); uint32_t reset_key __attribute__ ((section (".noinit,\"aw\",@nobits;")));
/** \brief initialize MCU status by watchdog reset /** \brief initialize MCU status by watchdog reset
* *