impcc
Active member
I have a Teensy 4.1. I normally use PlatformIO, but often fall back to Arduino IDE when things don't work, especially for the examples. If it matters, I have both the 1.8.19 version of the Arduino IDE installed and 2.3.0 (I changed the name of the app. I need this because I also develop for the ESP boards, and the one I have only supports Arduino IDE 1.x.y).
I've been in the Arduino IDE trying to get the TFTDisplayText example working, and frankly, I'm having a heck of a time. The only edits I've made to the stock example has been to change the pins, since it appears it was made for an UNO.
I appear to be in some embedded version of DLL-hell. Here's what I'm getting:
What I'm seeing here is:
Thanks!
- Ian
I've been in the Arduino IDE trying to get the TFTDisplayText example working, and frankly, I'm having a heck of a time. The only edits I've made to the stock example has been to change the pins, since it appears it was made for an UNO.
I appear to be in some embedded version of DLL-hell. Here's what I'm getting:
Code:
In file included from /Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_GFX.h:58,
from /Users/ipm/Documents/Arduino/libraries/TFT/src/TFT.h:36,
from /Users/ipm/Documents/Arduino/TFTDisplayText/TFTDisplayText.ino:19:
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/PImage.h: In constructor 'PImage::PImage()':
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/PImage.h:43:12: warning: 'PImage::_valid' will be initialized after [-Wreorder]
43 | bool _valid;
| ^~~~~~
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/PImage.h:37:8: warning: 'int PImage::_bmpWidth' [-Wreorder]
37 | int _bmpWidth, _bmpHeight; // W+H in pixels
| ^~~~~~~~~
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/PImage.h:17:3: warning: when initialized here [-Wreorder]
17 | PImage() :
| ^~~~~~
In file included from /Users/ipm/Documents/Arduino/libraries/TFT/src/TFT.h:36,
from /Users/ipm/Documents/Arduino/TFTDisplayText/TFTDisplayText.ino:19:
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_GFX.h: In static member function 'static PImage PImage::loadImage(const char*)':
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_GFX.h:318:40: warning: NULL used in arithmetic [-Wpointer-arith]
318 | if ((bmpFile = SD.open(fileName)) == NULL) {
| ^~~~
In file included from /Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.h:28,
from /Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp:19:
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_GFX.h:60:3: warning: #warning "The SD library was not found. loadImage() and image() won't be supported." [-Wcpp]
60 | #warning "The SD library was not found. loadImage() and image() won't be supported."
| ^~~~~~~
In file included from /Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/core_pins.h:33,
from /Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/wiring.h:39,
from /Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/WProgram.h:46,
from /private/var/folders/03/1grbyxdj5q5cspbhcp3cwffm0000gn/T/arduino/sketches/2E8FDD83F841A95CF96D39096A55AC6A/pch/Arduino.h:6,
from /Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.h:23,
from /Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp:19:
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp: In member function 'void Adafruit_ST7735::commonInit(const uint8_t*)':
/Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/pins_arduino.h:142:71: error: cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'volatile uint8_t*' {aka 'volatile unsigned char*'} in assignment
142 | #define portOutputRegister(pin) ((digital_pin_to_info_PGM[(pin)].reg + (uint8_t)0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| volatile uint32_t* {aka volatile long unsigned int*}
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp:349:15: note: in expansion of macro 'portOutputRegister'
349 | csport = portOutputRegister(digitalPinToPort(_cs));
| ^~~~~~~~~~~~~~~~~~
/Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/pins_arduino.h:142:71: error: cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'volatile uint8_t*' {aka 'volatile unsigned char*'} in assignment
142 | #define portOutputRegister(pin) ((digital_pin_to_info_PGM[(pin)].reg + (uint8_t)0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| volatile uint32_t* {aka volatile long unsigned int*}
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp:351:15: note: in expansion of macro 'portOutputRegister'
351 | rsport = portOutputRegister(digitalPinToPort(_rs));
| ^~~~~~~~~~~~~~~~~~
/Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/pins_arduino.h:142:71: error: cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'volatile uint8_t*' {aka 'volatile unsigned char*'} in assignment
142 | #define portOutputRegister(pin) ((digital_pin_to_info_PGM[(pin)].reg + (uint8_t)0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| volatile uint32_t* {aka volatile long unsigned int*}
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp:370:19: note: in expansion of macro 'portOutputRegister'
370 | clkport = portOutputRegister(digitalPinToPort(_sclk));
| ^~~~~~~~~~~~~~~~~~
/Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/cores/teensy4/pins_arduino.h:142:71: error: cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'volatile uint8_t*' {aka 'volatile unsigned char*'} in assignment
142 | #define portOutputRegister(pin) ((digital_pin_to_info_PGM[(pin)].reg + (uint8_t)0))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| volatile uint32_t* {aka volatile long unsigned int*}
/Users/ipm/Documents/Arduino/libraries/TFT/src/utility/Adafruit_ST7735.cpp:372:19: note: in expansion of macro 'portOutputRegister'
372 | dataport = portOutputRegister(digitalPinToPort(_sid));
| ^~~~~~~~~~~~~~~~~~
Multiple libraries were found for "SD.h"
Used: /Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/libraries/SD
Not used: /Users/ipm/Documents/Arduino/libraries/SD
exit status 1
Compilation error: exit status 1
What I'm seeing here is:
- Warning: Some initialization issues with reorder. I understand what this error means, but not why I have to fix it as a consumer of this library.
- Warning: A pointer arithmetic warning when comparing a pointer to `NULL`. I guess they want us to use it in a boolean context? Or maybe use `nullptr`? (Also note that this appears to be a warning in the SD library. This may be important later.)
- Warning: An `unused-const-variable` issue that I don't care about (but which the library authors should suppress. Yes, I suspect that's probably not Teensy specific.)
- Warning: A warning that `The SD library was not found.` in Adafruit GFX. I have installed it, removed it, reinstalled it, etc. `#including` it from my main sketch doesn't seem to be a problem, but we'll see this warning a bunch of times. (Always in libraries, never in my code, which `#includes` it, seemingly without issue.)
- Error: `Cannot convert 'volatile uint32_t*' {aka 'volatile long unsigned int*'} to 'volatile uint8_t*' {aka 'volatile unsigned char*'} in assignment.` So, I know conceptually what this error means, and I tried to dig into the library code and fix it with a bunch of casts, but I kinda got three layers down and thought, "The authors of this library couldn't mean for us to need to do ALL this work to get a stock example working, could they?"
- A bunch more of those...
- Then this:
Code:
Multiple libraries were found for "SD.h" Used: /Users/ipm/Library/Arduino15/packages/teensy/hardware/avr/1.59.0/libraries/SD Not used: /Users/ipm/Documents/Arduino/libraries/SD
Thanks!
- Ian
Last edited: