When building for Teensy 4.x, the Arduino IDE 2.1.1 or 2.2.0 set to "smallest code" optimization produces crashing binaries.
If flashed to the device, the Teensy bricks and does not provide an USB device anymore.
The bootloader button is still working and can be used to reflash the device.
When flashed with "fast", "faster" or "fastest" code afterwards, the device is working as usual again.
However, there is some need as there are projects that won't fit Teensy 4.x on "fast" optimized code.
This seems really hard to reproduce or address without a (small) code example. I am running Arduino IDE 2.3.2 and never had a binary crash on me. Does your problem persist for newer Arduino IDE versions?
When building for Teensy 4.x, the Arduino IDE 2.1.1 or 2.2.0 set to "smallest code" optimization produces crashing binaries.
If flashed to the device, the Teensy bricks and does not provide an USB device anymore.
The bootloader button is still working and can be used to reflash the device. When flashed with "fast", "faster" or "fastest" code afterwards, the device is working as usual again.
However, there is some need as there are projects that won't fit Teensy 4.x on "fast" optimized code.