-
-
Notifications
You must be signed in to change notification settings - Fork 114
DirectIO does not compile under Arduino 1.6.6 AVR 1.6.x #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Discovered a second ago: Under IDE 1.6.5 avr 1.6.8 the first DirectIO example will compile OK
But as soon as I place Arduino.h before DirectIO.h it does not (which what it is now with v1.6.6):
same error as reported before. |
Yes, the inclusion on the first line of "Arduino.h" breaks the compilation. I believe there is a reason for putting it there but I must ask @ffissore first before restoring the old behaviour. |
The issue can be worked around by patching diff --git a/DirectIO/ports.h b/DirectIO/ports.h
index 42aec20..6666f5e 100644
--- a/DirectIO/ports.h
+++ b/DirectIO/ports.h
@@ -22,10 +22,13 @@
#undef _AVR_COMMON_H
#undef _AVR_IO_H_
+#undef _AVR_IOXXX_H_
#undef _AVR_SFR_DEFS_H_
+#undef _SFR_ASM_COMPAT
// _SFR_ASM_COMPAT enables the port numbers (e.g. PORTA) to be plain integers so they can be used as template parameters.
#define _SFR_ASM_COMPAT 1
+#include <avr/io.h>
#ifndef _AVR_EEPROM_H_
// avr/eeprom.h isn't compatible with _SFR_ASM_COMPAT, so prevent its inclusion Only tested with a UNO but it should work with every board. |
@mmarchetti, since you're the author of the library, what do you think? is this an acceptable patch for DirectIO? |
Confirmed. Patch works for Uno and Nano. I just recompiled and retested a bunch of sketches and all is well. Thank you for your help! Updated related mmarchetti/DirectIO#7 |
Hi,
DirectIO no longer compiles under the new build process with Arduino 1.6.6. I tried with several board definitions (v1.6.9, 1.6.8 and 1.6.7)
This works with IDE 1.6.5 avr 1.6.7 and 1.6.8
https://github.com/mmarchetti/DirectIO.git
Below is the output form compiling the first DirectIO example:
The text was updated successfully, but these errors were encountered: