Getting issue while flashing code on Teensy4.0 board


Active member
Hi all,

I am trying to flash code on Teensy4.0 every time it is stuck after Rebooting..... it is waiting to push reboot button and then it is flashing the code.
But after that when i am opening serial monitor to see output nothing is printing

Processing teensy40 (platform:; board: teensy40; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
PlatformIO running on windows_amd64
PLATFORM: Teensy (4.18.0+sha.f2a89fa) > Teensy 4.0
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 1.94MB Flash
DEBUG: Current (jlink) External (jlink)
- framework-arduinoteensy @ 1.159.0 (1.59)
- framework-arduinoteensy-ts @ 1.159.0+sha.7e53c09
- tool-teensy @ 1.159.0 (1.59)
- toolchain-arm-cortexm-win64 @ 13.2.0-5+sha.2af7627
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 96 compatible libraries
Scanning dependencies...
Dependency Graph
|-- freertos-teensy @ 11.0.1-1+sha.94fb21f
|-- FlexCAN_T4 @ 0.0.0+20240404124122.sha.b928bcb
|-- EEPROM @ 2.0.0+sha.6309212
|-- ACAN_T4 @ 1.1.8+sha.666278e
Building in release mode
Checking size .pio\build\teensy40\firmware.elf

RAM 1: [= ] 8.0% (used 41888 bytes from 524288 bytes)
RAM 2: [ ] 2.5% (used 13084 bytes from 524288 bytes)
Flash: [ ] 2.5% (used 50808 bytes from 2031616 bytes)
Configuring upload protocol...
AVAILABLE: jlink, teensy-cli, teensy-gui
CURRENT: upload_protocol = teensy-cli
But after that when i am opening serial monitor to see output nothing is printing

Programs which crash too early do this.

Please try loading a simple "Hello World" program, without FreeRTOS and CAN libraries, just to confirm the upload process and serial monitor are still working. If not, please try testing with Arduino IDE.
To troubleshoot, try adding delay at startup to give enough time for the USB enumeration to complete. Usually 1.5 seconds is enough for Linux. You might need 2.5 seconds or more for Windows.

If the problem is happening inside a C++ constructor, you can use a startup hook to add your delay before they run.