Open allyourcode opened 7 years ago
I'm having the same issue. Arduino 1.8.2, windows 10. Same warning.
The avr libraries (sfr_defs.h) first set _SFR_OFFSET to 0x20. Later on usbdrvasm165.inc and asmcommon.inc need _SFR_OFFSET to be 0x00. usbdrvasm.S sets it to 0x00, but this generates a warning because defined macros are supposed to be constant.
In usbdrvasm.S, please add
#undef __SFR_OFFSET
before the
#define __SFR_OFFSET 0 /* used by avr-libc's register definitions */
line to suppress the message completely.
I'm not sure if this is applicable here, but I had a similar issue, and solved it by using the __ASSEMBLER__
flag:
#ifndef __ASSEMBLER__
#include <avr/io.h>
#endif
I'm able to use TrinketMouse successfully, but when I compile I get an annoying warning:
I tried to solve this by commenting out line 18 in usbdrvasm.S, but that just broke everything. I also tried replacing that #define with #include <avr/sfr_defs.h> but that didn't do the trick either.
Obviously, this isn't the end of the world, but it would be nice to have clean builds.