From 25c88b2bb45c5e648135eb8a3d570a407dcd301b Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 20 Mar 2019 17:45:45 -0400 Subject: [PATCH 1/2] 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. --- tmk_core/common/avr/bootloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index c4b913280e..3cdcd2e426 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -70,7 +70,7 @@ * http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html */ #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 * From e0fe8edb2d2cfaeb800adb43579c383333333297 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Apr 2019 10:14:50 -0700 Subject: [PATCH 2/2] Add changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index c2645bb2aa..322378ddb0 100644 --- a/changelog.md +++ b/changelog.md @@ -5,3 +5,4 @@ 04-16-2019 - Fix info.json for Ergodox EZ 04-16-2019 - Add support for WS2812 based RGB Matrix 04-18-2019 - Fix Eager Per Row Debouncing bug +04-22-2019 - Make sure NOBITS is set on reset_key