I'm getting different results when compiling my TeensyMIDIPolySynth project source between the latest TD1.54beta5 & the previous TD1.54beta4. For each test, I uninstalled Arduino, installed Arduino 1.8.13, then installed TD1.54beta(4,5) under Windows10pro.
Arduino IDE Configuration:
Tools/Board: "Teensy 4.0"
Tools/USB Type: "Serial + MIDI"
Tools/CPU Speed: "600MHz"
Tools/Optimize: "Fastest"
Tools/Keyboard Layout: "US English"
Tools/Port: "COMx Serial (Teensy 4.0)"
Compilation results using TD1.54beta4:
Code:
Opening Teensy Loader...
Sketch uses 318972 bytes (15%) of program storage space. Maximum is 2031616 bytes.
Global variables use 500756 bytes (95%) of dynamic memory, leaving 23532 bytes for local variables. Maximum is 524288 bytes.
Failed compilation results using TD1.54beta5:
Code:
Opening Teensy Loader...
data section exceeds available space in board
Sketch uses 354968 bytes (17%) of program storage space. Maximum is 2031616 bytes.
Global variables use 533524 bytes (101%) of dynamic memory, leaving -9236 bytes for local variables. Maximum is 524288 bytes.
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
Error compiling for board Teensy 4.0.
Just for comparison, compilation results using previous TD1.53:
Code:
Opening Teensy Loader...
Sketch uses 315776 bytes (15%) of program storage space. Maximum is 2031616 bytes.
Global variables use 467988 bytes (89%) of dynamic memory, leaving 56300 bytes for local variables. Maximum is 524288 bytes.
I know that there are different memory regions/types, so I'm assuming that I need to assign one or more of my variable allocations to a different memory type, but I do not know specifically where to begin. Recommendations on where to look and/or start ??
Also getting some new compiler warnings, but these don't worry me nearly as much as being unable to compile successfully (exceeding RAM):
Code:
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MIDI\src/MIDI.h:307:0,
from C:\Users\mjculross\Documents\Arduino\MJCsource\TeensyMIDIPolySynth\TeensyMIDIPolySynth.ino:61:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MIDI\src/MIDI.hpp:285:6: note: declared here
void MidiInterface<Transport, Settings, Platform>::sendPolyPressure(DataByte inNoteNumber,
^
TeensyMIDIPolySynth: In function 'void usbhostMIDI_handleAfterTouchPoly(byte, byte, byte)':
TeensyMIDIPolySynth:17712: warning: 'void midi::MidiInterface<Transport, _Settings, _Platform>::sendPolyPressure(midi::DataByte, midi::DataByte, midi::Channel) [with Transport = midi::SerialMIDI<HardwareSerial>; _Settings = midi::DefaultSettings; _Platform = midi::DefaultPlatform; midi::DataByte = unsigned char; midi::Channel = unsigned char]' is deprecated
MIDI.sendPolyPressure(note, pressure, channel);
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MIDI\src/MIDI.h:307:0,
from C:\Users\mjculross\Documents\Arduino\MJCsource\TeensyMIDIPolySynth\TeensyMIDIPolySynth.ino:61:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\MIDI\src/MIDI.hpp:285:6: note: declared here
void MidiInterface<Transport, Settings, Platform>::sendPolyPressure(DataByte inNoteNumber,
^
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat-beta\src\ExFatLib\ExFatPartition.cpp: In member function 'bool ExFatPartition::freeChain(uint32_t)':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat-beta\src\ExFatLib\ExFatPartition.cpp:328:5: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized]
if ((cluster + 1) != next || status == 0) {
^
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat-beta\src\FatLib\FatPartition.cpp: In member function 'bool FatPartition::freeChain(uint32_t)':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat-beta\src\FatLib\FatPartition.cpp:368:36: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized]
m_allocSearchStart = cluster - 1;
^
Thanks,
Mark J Culross
KD5RXT