Skip to content

1.9.0 beta SET_OUTPUT(SPI_SCK_PIN); #7747

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
dmtulsa opened this issue Jul 1, 2018 · 2 comments
Closed

1.9.0 beta SET_OUTPUT(SPI_SCK_PIN); #7747

dmtulsa opened this issue Jul 1, 2018 · 2 comments
Labels
IDE 1.9.x Beta Related to the Arduino IDE Beta Build

Comments

@dmtulsa
Copy link

dmtulsa commented Jul 1, 2018

1.8.5 does not produce this error

Error:

Arduino: 1.9.0-beta (Windows 10), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

In file included from sketch\MarlinConfig.h:26:0,

                 from sketch\Sd2Card.cpp:29:

Sd2Card.h:100:38: error: pasting "/* SPI Master In Slave Out pin*/" and "_DDR" does not give a valid preprocessing token

  #define SPI_MISO_PIN MISO_PIN       // SPI Master In Slave Out pin

                                      ^

sketch\fastio.h:94:35: note: in definition of macro '_SET_INPUT'

 #define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0)

                                   ^

sketch\Sd2Card.cpp:316:3: note: in expansion of macro 'SET_INPUT'

   SET_INPUT(SPI_MISO_PIN);

   ^

sketch\Sd2Card.cpp:316:13: note: in expansion of macro 'SPI_MISO_PIN'

   SET_INPUT(SPI_MISO_PIN);

             ^

Sd2Card.h:100:38: error: pasting "/* SPI Master In Slave Out pin*/" and "_PIN" does not give a valid preprocessing token

  #define SPI_MISO_PIN MISO_PIN       // SPI Master In Slave Out pin

                                      ^

sketch\fastio.h:94:61: note: in definition of macro '_SET_INPUT'

 #define _SET_INPUT(IO) do {DIO ## IO ## _DDR &= ~_BV(DIO ## IO ## _PIN); } while (0)

                                                             ^

sketch\Sd2Card.cpp:316:3: note: in expansion of macro 'SET_INPUT'

   SET_INPUT(SPI_MISO_PIN);

   ^

sketch\Sd2Card.cpp:316:13: note: in expansion of macro 'SPI_MISO_PIN'

   SET_INPUT(SPI_MISO_PIN);

             ^

Sd2Card.h:99:39: error: pasting "/* SPI Master Out Slave In pin*/" and "_DDR" does not give a valid preprocessing token

   #define SPI_MOSI_PIN MOSI_PIN       // SPI Master Out Slave In pin

                                       ^

sketch\fastio.h:95:36: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                    ^

sketch\Sd2Card.cpp:317:3: note: in expansion of macro 'SET_OUTPUT'

   SET_OUTPUT(SPI_MOSI_PIN);

   ^

sketch\Sd2Card.cpp:317:14: note: in expansion of macro 'SPI_MOSI_PIN'

   SET_OUTPUT(SPI_MOSI_PIN);

              ^

Sd2Card.h:99:39: error: pasting "/* SPI Master Out Slave In pin*/" and "_PIN" does not give a valid preprocessing token

   #define SPI_MOSI_PIN MOSI_PIN       // SPI Master Out Slave In pin

                                       ^

sketch\fastio.h:95:61: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                                             ^

sketch\Sd2Card.cpp:317:3: note: in expansion of macro 'SET_OUTPUT'

   SET_OUTPUT(SPI_MOSI_PIN);

   ^

sketch\Sd2Card.cpp:317:14: note: in expansion of macro 'SPI_MOSI_PIN'

   SET_OUTPUT(SPI_MOSI_PIN);

              ^

Sd2Card.h:104:39: error: pasting "/* SPI Clock pin*/" and "_DDR" does not give a valid preprocessing token

   #define SPI_SCK_PIN SCK_PIN         // SPI Clock pin

                                       ^

sketch\fastio.h:95:36: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                    ^

sketch\Sd2Card.cpp:318:3: note: in expansion of macro 'SET_OUTPUT'

   SET_OUTPUT(SPI_SCK_PIN);

   ^

sketch\Sd2Card.cpp:318:14: note: in expansion of macro 'SPI_SCK_PIN'

   SET_OUTPUT(SPI_SCK_PIN);

              ^

Sd2Card.h:104:39: error: pasting "/* SPI Clock pin*/" and "_PIN" does not give a valid preprocessing token

   #define SPI_SCK_PIN SCK_PIN         // SPI Clock pin

                                       ^

sketch\fastio.h:95:61: note: in definition of macro '_SET_OUTPUT'

 #define _SET_OUTPUT(IO) do {DIO ## IO ## _DDR |= _BV(DIO ## IO ## _PIN); } while (0)

                                                             ^

sketch\Sd2Card.cpp:318:3: note: in expansion of macro 'SET_OUTPUT'

   SET_OUTPUT(SPI_SCK_PIN);

   ^

sketch\Sd2Card.cpp:318:14: note: in expansion of macro 'SPI_SCK_PIN'

   SET_OUTPUT(SPI_SCK_PIN);

              ^

exit status 1
pasting "/* SPI Master In Slave Out pin*/" and "_DDR" does not give a valid preprocessing token

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
@per1234
Copy link
Collaborator

per1234 commented Jul 1, 2018

I believe this is arduino/arduino-preprocessor#6

Also related: #5079 (comment)

@facchinm facchinm added the IDE 1.9.x Beta Related to the Arduino IDE Beta Build label Jul 16, 2018
@facchinm
Copy link
Member

It is, indeed. Closing as duplicate, please continue the discussion on #5079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE 1.9.x Beta Related to the Arduino IDE Beta Build
Projects
None yet
Development

No branches or pull requests

3 participants