Out of memory errors with latest PlatformIO & Teensy LC

Hi guys,

I’ve been using Platform IO with VSCode for awhile. I recently opened up an unchanged codebase and PIO auto-updated. Although this code base worked perfectly fine previously, it is now compiling with significantly higher DATA memory usage (to the point where it’s out of memory after upload). I changed nothing in the code and have the following build flags set.

build_flags = -D USB_MIDI_SERIAL -D TEENSY_OPT_SMALLEST_CODE

Did something change with the way PIO minifies code on the latest version? I’m using a Teensy LC board.

Could you provide memory usage stats with platform = teensy in the platformio.ini and then with platform = teensy@4.3.0 (this is the second last release)

Whoa! That did it, cut my memory usage from 86% to 54%. Something’s going on in the latest version…which also makes me beg the question, how do you turn auto-updates off?

Also, although the memory usage is cut down…I am still getting behavior indicative of OOM…for example,

if I increase the size of one of my arrays, I get this compilation info (with 4.3.0)
DATA: [====== ] 57.8% (used 4736 bytes from 8192 bytes)
PROGRAM: [==== ] 41.0% (used 26004 bytes from 63488 bytes),
but the program is unresponsive.

If I reduce the size of my array, I get this compilation info (with 4.3.0),
DATA: [===== ] 54.3% (used 4448 bytes from 8192 bytes)
PROGRAM: [==== ] 40.9% (used 25996 bytes from 63488 bytes)
but the program is responsive.

I’m not sure what’s up with that…maybe the 4.3.0 calculation is inaccurate?