Arduino Nano Every SDI Error

I have this error when uploading sample code to my Arduino Nano Every. Any suggestions welcomed. Thanks.

C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:126:5: error: 'SPDR' was not declared in this scope
     SPDR = c;
     ^~~~
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:126:5: note: suggested alternative: 'SPI'
     SPDR = c;
     ^~~~
     SPI
In file included from c:\users\lshaw\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
                 from c:\users\lshaw\documents\arduinodata\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,
                 from C:\Users\lshaw\Documents\ArduinoData\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/api/String.h:31,
                 from C:\Users\lshaw\Documents\ArduinoData\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/api/IPAddress.h:24,
                 from C:\Users\lshaw\Documents\ArduinoData\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/api/ArduinoAPI.h:30,
                 from C:\Users\lshaw\Documents\ArduinoData\packages\arduino\hardware\megaavr\1.8.7\cores\arduino/Arduino.h:23,
                 from C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.h:16,
                 from C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:4:
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp: In member function 'void Arduino_ST7789::writeMulti(uint16_t, uint16_t)':
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:176:32: error: 'SPDR' was not declared in this scope
     : [spdr] "I" (_SFR_IO_ADDR(SPDR)), [lo] "r" ((uint8_t)color), [hi] "r" ((uint8_t)(color>>8))
                                ^
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:176:32: note: suggested alternative: 'SPI'
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp: In member function 'void Arduino_ST7789::copyMulti(uint8_t*, uint16_t)':
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:212:32: error: 'SPDR' was not declared in this scope
     : [spdr] "I" (_SFR_IO_ADDR(SPDR)), [img] "e" (img), [lo] "r" (lo), [hi] "r" (hi)
                                ^
C:\Users\lshaw\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:212:32: note: suggested alternative: 'SPI'
exit status 1
Error compiling for board Arduino Nano Every.
avrdude: ser_open(): can't set com-state for "\\.\COM4"
An error occurred while uploading the sketch 

You don't have an upload problem :wink: It's a programming issue (most likely specific to the Nano Every) and hence your topic is moved.

Please provide your code (and please use the </> button to apply code tags). Also please indicate where you got the library from.

Note that not all libraries are compatible with the Nano Every.

This library is not compatible with your Nano, most probably was designed for an Uno (ATmega328 controller).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.