Closed TLINDEN closed 4 years ago
This is a problem with the library - rather than using the supplied SPI library, it uses it's own api implementation, which is not compatible with USI devices. The comments indicate that it does not support attiny devices (I suspect they do not have enough SRAM)
Spence Konde Azzy’S Electronics
New products! Check them out at tindie.com/stores/DrAzzy GitHub: github.com/SpenceKonde ATTinyCore: Arduino support for almost every ATTiny microcontroller Contact: spencekonde@gmail.com
On Thu, Feb 20, 2020, 13:33 T.v.Dein notifications@github.com wrote:
I can compile a sample sketch withe SPI library (the one included with AttinyCore) included w/o problems, but when I add GFX, it goes nuts:
libraries/GFX/Adafruit_SPITFT.cpp:43:30: error: ‘SPDR’ was not declared in this scope
define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
^~~~
libraries/GFX/Adafruit_SPITFT.cpp:1303:7: note: in expansion of macro ‘AVR_WRITESPI’
AVR_WRITESPI(hi); ^~~~~~~~~~~~
libraries/GFX/Adafruit_SPITFT.cpp:43:30: note: suggested alternative: ‘SPI’
define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
^~~~
libraries/GFX/Adafruit_SPITFT.cpp:1303:7: note: in expansion of macro ‘AVR_WRITESPI’
AVR_WRITESPI(hi); ^~~~~~~~~~~~
libraries/GFX/Adafruit_SPITFT.cpp:43:45: error: ‘SPSR’ was not declared in this scope
define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
^~~~
libraries/GFX/Adafruit_SPITFT.cpp:1303:7: note: in expansion of macro ‘AVR_WRITESPI’
AVR_WRITESPI(hi); ^~~~~~~~~~~~
libraries/GFX/Adafruit_SPITFT.cpp:43:45: note: suggested alternative: ‘SPI’
define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
^~~~
libraries/GFX/Adafruit_SPITFT.cpp:1303:7: note: in expansion of macro ‘AVR_WRITESPI’
AVR_WRITESPI(hi); ^~~~~~~~~~~~
In file included from /usr/local/avr/avr/include/avr/io.h:99,
from /usr/local/avr/avr/include/avr/pgmspace.h:90, from ./hardware/ATTinyCore/avr/cores/tiny/Arduino.h:9, from libraries/GFX/Adafruit_GFX.h:5, from libraries/GFX/Adafruit_SPITFT.h:25, from libraries/GFX/Adafruit_SPITFT.cpp:36:
libraries/GFX/Adafruit_SPITFT.cpp:43:56: error: ‘SPIF’ was not declared in this scope
define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
^~~~
[..]
etc etc
Looks like GFX requires some hardware SPI stuff not available on 861, but the README says, SPI works via USI. I'm confused.
Code and Makefile: https://github.com/TLINDEN/attinycore-makefile-tests/tree/master/861-tinycore-test
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SpenceKonde/ATTinyCore/issues/390?email_source=notifications&email_token=ABTXEW2EVNZJAV2VOBKNBTDRD3EJBA5CNFSM4KYUPRLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPCPTZQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTXEW5PYGKIGFV3RRMIE6LRD3EJBANCNFSM4KYUPRLA .
I can compile a sample sketch withe SPI library (the one included with AttinyCore) included w/o problems, but when I add GFX, it goes nuts:
etc etc
Looks like GFX requires some hardware SPI stuff not available on 861, but the README says, SPI works via USI. I'm confused.
Code and Makefile: https://github.com/TLINDEN/attinycore-makefile-tests/tree/master/861-tinycore-test