From b70f8307855c51a8a1e31c90ab724fd31a8238b4 Mon Sep 17 00:00:00 2001 From: WestfW Date: Sun, 8 Jul 2018 00:55:10 -0700 Subject: [PATCH] Update comments in test_reset sketch --- optiboot/examples/test_reset/test_reset.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/optiboot/examples/test_reset/test_reset.ino b/optiboot/examples/test_reset/test_reset.ino index 69f002b..1a008fa 100644 --- a/optiboot/examples/test_reset/test_reset.ino +++ b/optiboot/examples/test_reset/test_reset.ino @@ -21,6 +21,9 @@ uint8_t resetFlags __attribute__ ((section(".noinit"))); /* * Next, we need to put some code to save reset cause from the bootload (in r2) * to the variable. Again, avr-gcc provides special code sections for this. + * If compiled with link time optimization (-flto), as done by the Arduno + * IDE version 1.6 and higher, we need the "used" attribute to prevent this + * from being omitted. */ void resetFlagsInit(void) __attribute__ ((naked)) __attribute__ ((used))