KurtE
Senior Member+
Where, is this? I did not see it in my build. Which Board? But maybe not calling function you are...Can I talk you into 1 more? Compiler is warning these 2 are used uninitialized.
Code:int16_t _originx, _originy;
Where, is this? I did not see it in my build. Which Board? But maybe not calling function you are...Can I talk you into 1 more? Compiler is warning these 2 are used uninitialized.
Code:int16_t _originx, _originy;
Where, is this? I did not see it in my build. Which Board? But maybe not calling function you are...
pushed up.It's in ILI9488_t3.h at line 561
Which sketch, which board?Still some small warnings in ILI9341_t3n.
Kurt, could I talk you into one more look at ILI9341_t3n doubleBuffer.ino example? Compiling for Teensy 4.1 with default settings gives a couple compiler warnings about addresses never NULL.
D:\temp\.arduinoIDE-unsaved202653-12208-3mqc01.sa1k4\doubleBuffer\doubleBuffer.ino:48:22: warning: the address of 'fb1' will never be NULL [-Waddress]
48 | tft.useFrameBuffer(fb1);
| ^~~
D:\temp\.arduinoIDE-unsaved202653-12208-3mqc01.sa1k4\doubleBuffer\doubleBuffer.ino:11:17: note: 'fb1' declared here
11 | DMAMEM uint16_t fb1[320 * 240];
void setFrameBuffer(uint16_t *frame_buffer);
uint8_t useFrameBuffer(boolean b); // use the frame buffer? First call will allocate
void setFrameBuffer(uint16_t *frame_buffer);
bool, and you've handed it a pointer, moreover a pointer which the compiler knows is never nullptr; it can therefore tell you've made an error...Line 48 looks as if it's expecting abool, and you've handed it a pointer, moreover a pointer which the compiler knows is nevernullptr; it can therefore tell you've made an error...
Anyway pushed up changes
Libraries shipped with Teensyduino
----------------------------------
ssd1351 Fastest LTO -Wnarrowing
XBee Series1_Tx.ino -Wuninitialized
Adafruit_nRF8001 echoDemo.ino Smallest LTO -Wsign-compare
NativeEthernet -Wint-in-bool-context -Warray-parameter -Wstringop-overflow
SdFat TeensyDmaAdcLogger.ino T4.0 Smallest
Libraries primarily used with Teensy
------------------------------------
QNEthernet T4.1 Fastest SNTPClient.ino -Wstringop-truncation
External libraries not focused on Teensy
----------------------------------------
Adafruit_NeoPixel T4.0 Smallest LTO RGBWstrandtest.ino -Wsign-compare
Adafruit_BusIO T4.1 Fastest LTO genericdevice_uarttest.ino -Wsign-compare
Adafruit_VS1053 -Wsign-compare
Adafruit_ILI9341 -Wmaybe-uninitialized
Adafruit_STMPE610 T3.6 -Wmaybe-uninitialized
Madgwick -Wstrict-aliasing
ArduinoUnit -Wsign-compare advanced.ino
Libraries to add to testing (maybe??)
---------------------------
SmartMatrix
Luni's TeensyStep for Teensy 4?
Frank's MP3 ?
Audio with floats?
others???
The only library I can think of to add to the non-Teensyduino pool is TeensyTimerTool
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -Wno-psabi -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=160 -DARDUINO=10819 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_45789/pch" "-IT:\\T_Drive\\arduino-1.8.19\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\T_Drive\\tCode\\libraries\\TeensyTimerTool\\src" "T:\\TEMP\\arduino_build_45789\\sketch\\DoubleExposure.ino.cpp" -o "T:\\TEMP\\arduino_build_45789\\sketch\\DoubleExposure.ino.cpp.o"
In file included from T:\T_Drive\tCode\libraries\TeensyTimerTool\examples\03_Applications\DoubleExposure\LaserController.h:2,
from T:\T_Drive\tCode\libraries\TeensyTimerTool\examples\03_Applications\DoubleExposure\SystemController.h:2,
from T:\T_Drive\tCode\libraries\TeensyTimerTool\examples\03_Applications\DoubleExposure\DoubleExposure.ino:1:
T:\T_Drive\tCode\libraries\TeensyTimerTool\examples\03_Applications\DoubleExposure\PulseGenerator.h: In constructor 'PulseGenerator::PulseGenerator()':
PulseGenerator.h:60: error: 'FTM0' is not a member of 'TeensyTimerTool'
60 | : pulseTimer(TeensyTimerTool::FTM0) // use one of the 8 FTM0 channels
| ^~~~
Using library TeensyTimerTool at version 1.4.0 in folder: T:\T_Drive\tCode\libraries\TeensyTimerTool
'FTM0' is not a member of 'TeensyTimerTool'
Found and fixed and will be in v0.36.0. (I changed std::strncpy->std::snprintf)@shawn - Can I talk you into a quick look at QNEthernet example SNTPClient.ino on Teensy 4.1 with Tools > Optimize set to "Fastest"?
@PaulStoffregen: E-mail sent. Glad to help !!
Let me look around and get back to you likely tomorrow.@shawn - did you have a suggestion some time ago about overriding some C++ standard library stuff that needlessly takes up code space? I seem to remember seeing it, but can't find on my list of stuff to investigate.
@PaulStoffregen: thanks for your investigation & for the detailed follow-up description. I'll have to take a look to see if there's a candidate function to join the others in FLASHMEM, but in the meantime, using Smallest Code is no problem at all. I already use that optimization selection for the T4.0 managing the Audio portion of the TMPS, and it serves its purpose very well.I looked at this today. The unfortunate news is the new gcc 15.2 compiler produces slightly larger code than gcc 11.3.
Previously your code in RAM1 was 324104 bytes, which fit nicely into 10 blocks of 32K. But with gcc 15.2, the code in RAM1 grew to 328712.
That's a 1.4% increase in compiled code size.
The main problem is 328712 pushes slight beyond 327680 bytes of 10 blocks, meaning an 11th RAM1 block of 32K needs to be taken from the memory available for variables. That leaves not enough RAM1 for all your variables, so compiling fails due to not enough memory.
The easy answer is to compile with Tools > Optimize set to Smallest Code.
The not so easy answer is to convert more functions to FLASHMEM. I see you already have many of them. If you can convert more to trim just 1023 bytes, you'll get back to the 10 block threshold that makes gives you 192K RAM for your variables.
This thread, maybe? Or possibly this one?@shawn - did you have a suggestion some time ago about overriding some C++ standard library stuff that needlessly takes up code space? I seem to remember seeing it, but can't find on my list of stuff to investigate.
2nd link may be helpful; the first link is the one by @jmarsh I recall wanting to remember.This thread, maybe? Or possibly this one?