TeensyESP32C3Programmer - Flash ESP32-C3 via Teensy USB Host (Beta)

godzivan

New member
Hi everyone,
I wanted to share a project I've been working on: TeensyESP32C3Programmer.
👉 GitHub Repository: TeensyESP32C3Programmer
What it does:
This sketch allows a Teensy 4.1 to program and flash an ESP32-C3 board directly.
How it works:
  • It does not use standard GPIO pins for serial communication.
  • It leverages the Teensy USB Host port to connect directly to the ESP32-C3 USB interface.
  • It handles the automatic bootloader reset sequence programmatically.
Important Setup Note:
To make this work, you need to manually copy the modified files included in the repository's USBHost_t36 folder directly into your Teensy core framework directory.
Current Status:
Please note that this project is still in the testing phase (WIP). It works, but it needs more real-world validation.
Any feedback, suggestions, or pull requests are highly appreciated!
Thanks!
 
Hi Paul,


first of all, I would like to thank you for the amazing work you have done, and continue to do, with Teensy and its libraries. Your contribution is truly valuable to the whole community.


I am writing also to share a small update I made to the USBHost_t36 library. During some tests with a Teensy 4.1 in USB host mode, I noticed a few issues with some USB serial devices, especially CDC/ACM and CH340 based adapters, used for example with ESP32 modules.


The issue was mainly related to the handling of the DTR and RTS signals, which in some cases did not work correctly or were not handled as expected. I made a few changes to improve compatibility and make the USB host serial behavior more reliable with these devices.


I am happy to send you these changes. If you find them useful, please feel free to use them or integrate them into the library. No credit or special attribution is needed, also because I used AI tools to help fix and verify the code. Still, I thought it could be useful to share these improvements in case they may help other Teensy users too.


Thanks again for all your work.


Best regards,
Ivan
 

Attachments

  • serial.cpp
    46.3 KB · Views: 18
  • USBHost_t36.h
    117.5 KB · Views: 14
Back
Top