I am currently trying to make a canbus gauge for my car and used lvgl with squareline studio to create a UI. I am pushing that UI from my teensy 4.0 to a small round lcd display with TFT_eSPI. I continue to get this warning...
In file included from C:\Users\elias\OneDrive\Desktop\CANGauge\ui\ui.ino:2:
c:\Users\elias\OneDrive\Desktop\CANGauge\ui\libraries\TFT_eSPI/TFT_eSPI.h:64: warning: "PROGMEM" redefined
64 | #define PROGMEM
|
In file included from C:\Users\elias\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/WProgram.h:42,
from C:\Users\elias\AppData\Local\Temp\arduino\sketches\4764E34AF4BFE0814E69E258FE3A0AC8\pch\Arduino.h:6:
C:\Users\elias\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/avr/pgmspace.h:30: note: this is the location of the previous definition
30 | #define PROGMEM __attribute__((section(".progmem")))
|
In file included from C:\Users\elias\OneDrive\Desktop\CANGauge\ui\ui.ino:2:
c:\Users\elias\OneDrive\Desktop\CANGauge\ui\libraries\TFT_eSPI/TFT_eSPI.h:883:8: warning: #warning >>>>------>> TOUCH_CS pin not defined, TFT_eSPI touch functions will not be available! [-Wcpp]
883 | #warning >>>>------>> TOUCH_CS pin not defined, TFT_eSPI touch functions will not be available!
| ^~~~~~~
Opening Teensy Loader...
Memory Usage on Teensy 4.0:
FLASH: code:205280, data:102344, headers:8788 free for files:1715204
RAM1: variables:165344, code:203496, padding:25880 free for local variables:129568
RAM2: variables:12416 free for malloc/new:511872
I am not worried about the touch pin warning as my display is not touch screen. (Hopefully I can rightfully ignore this) But I am unsure if the redefinition of PROGMEM will cause an issue, as my hardware is not fully set up yet. I already tried to go into the pgmspace.h and mess with the define in there and the compiler got angry. I took a peek into the TFT_eSPI.h and found the define in an elseif but can't figure out what's going on.
// Handle FLASH based storage e.g. PROGMEM
#if defined(ARDUINO_ARCH_RP2040)
#undef pgm_read_byte
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#undef pgm_read_word
#define pgm_read_word(addr) ({ \
typeof(addr) _addr = (addr); \
*(const unsigned short *)(_addr); \
})
#undef pgm_read_dword
#define pgm_read_dword(addr) ({ \
typeof(addr) _addr = (addr); \
*(const unsigned long *)(_addr); \
})
#elif defined(__AVR__)
#include <avr/pgmspace.h>
#elif defined(ESP8266) || defined(ESP32)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
Any help would be appreciated. Would be awesome if this is ignorable as well. Hopefully I have my hardware set up in the coming days and can test my display.