U8glib on nano every

hi, i have a problem with my sketch , work perfectly in arduino nano r3 but in nano every error in compilation, the library u8glib is not compatible whith nano every.
Any solution?
Thanks

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.

Ok, thanks for your help

Arduino:1.8.10 (Windows 10), Tarjeta:“Arduino Nano Every, ATMEGA328”

ATENCIÓN: la librería U8glib pretende ejecutarse sobre arquitectura(s) avr, sam y puede ser incompatible con tu actual tarjeta la cual corre sobre arquitectura(s) megaavr.
C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c: In function ‘u8g_spi_out’:

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:184:3: error: ‘SPDR’ undeclared (first use in this function); did you mean ‘SDA’?

SPDR = data;

^~~~

SDA

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:184:3: note: each undeclared identifier is reported only once for each function it appears in

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:186:12: error: ‘SPSR’ undeclared (first use in this function); did you mean ‘SPDR’?

while (!(SPSR & (1<<SPIF)))

^~~~

SPDR

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:186:23: error: ‘SPIF’ undeclared (first use in this function); did you mean ‘SPI0’?

while (!(SPSR & (1<<SPIF)))

^~~~

SPI0

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c: In function ‘u8g_com_arduino_hw_spi_fn’:

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:220:7: error: ‘SPCR’ undeclared (first use in this function); did you mean ‘SCL’?

SPCR = 0;

^~~~

SCL

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:221:19: error: ‘SPE’ undeclared (first use in this function); did you mean ‘PE’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(0<<CPOL)|(0<<CPHA);

^~~

PE

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:221:30: error: ‘MSTR’ undeclared (first use in this function); did you mean ‘PSTR’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(0<<CPOL)|(0<<CPHA);

^~~~

PSTR

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:221:40: error: ‘SPR1’ undeclared (first use in this function); did you mean ‘SPE’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(0<<CPOL)|(0<<CPHA);

^~~~

SPE

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:221:50: error: ‘SPR0’ undeclared (first use in this function); did you mean ‘SPR1’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(0<<CPOL)|(0<<CPHA);

^~~~

SPR1

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:221:60: error: ‘CPOL’ undeclared (first use in this function); did you mean ‘CCL’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(0<<CPOL)|(0<<CPHA);

^~~~

CCL

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_port_d_wr.c: In function ‘u8g_com_arduino_port_d_8bit_wr’:

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_port_d_wr.c:72:9: error: incompatible types when assigning to type ‘PORT_t {aka struct PORT_struct}’ from type ‘uint8_t {aka unsigned char}’

PORTD = val;

^

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:221:70: error: ‘CPHA’ undeclared (first use in this function); did you mean ‘CPOL’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(0<<CPOL)|(0<<CPHA);

^~~~

CPOL

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:227:2: error: ‘SPSR’ undeclared (first use in this function); did you mean ‘SPCR’?

SPSR = (1 << SPI2X); /* double speed, issue 89 */

^~~~

SPCR

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_port_d_wr.c: In function ‘u8g_com_arduino_port_d_wr_fn’:

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_port_d_wr.c:91:7: error: ‘DDRD’ undeclared (first use in this function); did you mean ‘DD7’?

DDRD = 0x0ff;

^~~~

DD7

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_port_d_wr.c:91:7: note: each undeclared identifier is reported only once for each function it appears in

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_port_d_wr.c:92:13: error: incompatible types when assigning to type ‘PORT_t {aka struct PORT_struct}’ from type ‘int’

PORTD = 0x0ff;

^

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_hw_spi.c:227:15: error: ‘SPI2X’ undeclared (first use in this function); did you mean ‘SPI_t’?

SPSR = (1 << SPI2X); /* double speed, issue 89 */

^~~~~

SPI_t

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c: In function ‘u8g_arduino_st7920_hw_spi_shift_out’:

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:102:3: error: ‘SPDR’ undeclared (first use in this function); did you mean ‘SDA’?

SPDR = val;

^~~~

SDA

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:102:3: note: each undeclared identifier is reported only once for each function it appears in

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:104:12: error: ‘SPSR’ undeclared (first use in this function); did you mean ‘SPDR’?

while (!(SPSR & (1<<SPIF)))

^~~~

SPDR

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:104:23: error: ‘SPIF’ undeclared (first use in this function); did you mean ‘SPI0’?

while (!(SPSR & (1<<SPIF)))

^~~~

SPI0

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c: In function ‘u8g_com_arduino_st7920_hw_spi_fn’:

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:204:7: error: ‘SPCR’ undeclared (first use in this function); did you mean ‘SCL’?

SPCR = 0;

^~~~

SCL

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:207:19: error: ‘SPE’ undeclared (first use in this function); did you mean ‘PE’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(1<<CPOL)|(1<<CPHA);

^~~

PE

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:207:30: error: ‘MSTR’ undeclared (first use in this function); did you mean ‘PSTR’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(1<<CPOL)|(1<<CPHA);

^~~~

PSTR

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:207:40: error: ‘SPR1’ undeclared (first use in this function); did you mean ‘SPE’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(1<<CPOL)|(1<<CPHA);

^~~~

SPE

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:207:50: error: ‘SPR0’ undeclared (first use in this function); did you mean ‘SPR1’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(1<<CPOL)|(1<<CPHA);

^~~~

SPR1

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:207:60: error: ‘CPOL’ undeclared (first use in this function); did you mean ‘CCL’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(1<<CPOL)|(1<<CPHA);

^~~~

CCL

C:\Users\Alex\Documents\Arduino\libraries\U8glib\src\clib\u8g_com_arduino_st7920_hw_spi.c:207:70: error: ‘CPHA’ undeclared (first use in this function); did you mean ‘CPOL’?

SPCR = (1<<SPE) | (1<<MSTR)|(0<<SPR1)|(0<<SPR0)|(1<<CPOL)|(1<<CPHA);

^~~~

CPOL