Skip to content

DirectIO does not compile under Arduino 1.6.6 AVR 1.6.9 #7

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

Closed
arkhipenko opened this issue Nov 7, 2015 · 6 comments
Closed

DirectIO does not compile under Arduino 1.6.6 AVR 1.6.9 #7

arkhipenko opened this issue Nov 7, 2015 · 6 comments

Comments

@arkhipenko
Copy link

Hi,
DirectIO no longer compiles under the new avr board definitions v1.6.9 released with IDE 1.6.6
Could you please have a look?
Here is the output for the first example:

`Arduino: 1.6.6 (Windows 8.1), Board: "Arduino/Genuino Uno"

In file included from C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/DirectIO.h:23:0,

                 from C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO\examples\direct_io\direct_io.ino:1:

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:56:22: error: field initializer is not constant

 _define_port(PORT_B, PINB, PORTB, DDRB);

                      ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:46:31: note: in definition of macro '_define_port'

         static const u16 in = IN_REG; \

                               ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:56:28: error: field initializer is not constant

 _define_port(PORT_B, PINB, PORTB, DDRB);

                            ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:47:32: note: in definition of macro '_define_port'

         static const u16 out = OUT_REG; \

                                ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:56:35: error: field initializer is not constant

 _define_port(PORT_B, PINB, PORTB, DDRB);

                                   ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:48:32: note: in definition of macro '_define_port'

         static const u16 dir = DIR_REG; \

                                ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:60:22: error: field initializer is not constant

 _define_port(PORT_C, PINC, PORTC, DDRC);

                      ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:46:31: note: in definition of macro '_define_port'

         static const u16 in = IN_REG; \

                               ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:60:28: error: field initializer is not constant

 _define_port(PORT_C, PINC, PORTC, DDRC);

                            ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:47:32: note: in definition of macro '_define_port'

         static const u16 out = OUT_REG; \

                                ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:60:35: error: field initializer is not constant

 _define_port(PORT_C, PINC, PORTC, DDRC);

                                   ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:48:32: note: in definition of macro '_define_port'

         static const u16 dir = DIR_REG; \

                                ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:64:22: error: field initializer is not constant

 _define_port(PORT_D, PIND, PORTD, DDRD);

                      ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:46:31: note: in definition of macro '_define_port'

         static const u16 in = IN_REG; \

                               ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:64:28: error: field initializer is not constant

 _define_port(PORT_D, PIND, PORTD, DDRD);

                            ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:47:32: note: in definition of macro '_define_port'

         static const u16 out = OUT_REG; \

                                ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:64:35: error: field initializer is not constant

 _define_port(PORT_D, PIND, PORTD, DDRD);

                                   ^

C:\Users\arkhi_000\Documents\Arduino\libraries\DirectIO/ports.h:48:32: note: in definition of macro '_define_port'

         static const u16 dir = DIR_REG; \

                                ^

exit status 1
Error compiling.`
@arkhipenko
Copy link
Author

Actually I think it does not work with 1.6.6 regardless of the board definitions - same issue with avr 1.6.8 and 1.6.7... Had to downgrade back to IDE 1.6.5 to continue working with DirectIO... not ready to give up this library :)

@arkhipenko
Copy link
Author

Arduino team suggested a patch for ports.h:

arduino/arduino-builder#59

could you please review?
It worked for me for Uno and Nano sketches.

@mmarchetti
Copy link
Owner

Yes, I'm OK with the patch. Can you please open a PR here?

@arkhipenko
Copy link
Author

I didn't fork the code, just updated ports.h locally...
The link above has the diff. Would you be able to apply it?

@mmarchetti
Copy link
Owner

Yes. Thanks for the patch.

@arkhipenko
Copy link
Author

No thanks to me - just a messenger. The Arduino team found the solution.

I love DirectIO and use it in many of my projects (for instance: http://www.instructables.com/id/Wave-your-hand-to-control-OWI-Robotic-Arm-no-strin/)

Thank you for creating it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants