Engineered by ROOTCASTLE ENGINEERING INNOVATION
Tron Shell is a next-generation command-line interface for flashing firmware to microcontrollers. Designed for professional embedded engineers and hobbyists alike, it provides unified access to multiple hardware platforms with advanced features like automatic USB detection, bootloader management, and comprehensive debugging capabilities.
- Multi-Platform Support: ATmega (AVR), ESP32/ESP8266, Tron series, and ARM Cortex-M devices
- Hex/Binary Flashing: Full support for
.hex,.bin, and.elffirmware formats - Bootloader Management: Automatic bootloader detection and recovery modes
- USB Auto-Detection: Smart port identification with vendor/product ID matching
- Debug Mode: Real-time protocol tracing and low-level communication logs
- Cross-Platform: Works on Windows, macOS, and Linux
- Hardware Verification: Post-flash memory verification and checksum validation
- Secure Operations: Firmware signature validation (optional)
The most widely used microcontroller family in embedded systems and education:
| Model | Flash | RAM | EEPROM | Bootloader | Common Use Cases |
|---|---|---|---|---|---|
| ATmega328P | 32KB | 2KB | 1KB | Optiboot, Arduino | Arduino Uno, IoT devices |
| ATmega2560 | 256KB | 8KB | 4KB | Optiboot | Arduino Mega, CNC machines |
| ATmega32U4 | 32KB | 2.5KB | 1KB | Caterina | Arduino Leonardo, Micro |
| ATmega168P | 16KB | 1KB | 512B | Optiboot | Mini boards, sensors |
| ATmega644P | 64KB | 4KB | 2KB | Custom | Industrial automation |
| ATmega1284P | 128KB | 16KB | 4KB | Custom | Advanced projects |
| ATmega8 | 8KB | 1KB | 512B | None | Legacy systems |
| ATmega16 | 16KB | 1KB | 512B | None | Legacy systems |
| ATmega32 | 32KB | 2KB | 1KB | None | Legacy systems |
| ATmega64 | 64KB | 4KB | 2KB | None | Legacy systems |
| ATmega128 | 128KB | 4KB | 4KB | None | Legacy industrial use |
| ATmega256 | 256KB | 8KB | 4KB | None | Legacy industrial use |
| ATmega1280 | 128KB | 8KB | 4KB | Optiboot | Industrial applications |
| ATmega1281 | 128KB | 8KB | 4KB | Custom | Heavy-duty applications |
| ATmega640 | 64KB | 8KB | 4KB | Optiboot | Robotics, automation |
| ATmega88P | 8KB | 1KB | 512B | Custom | Embedded systems |
| ATmega88PA | 8KB | 1KB | 512B | Custom | Updated variant |
| ATmega48P | 4KB | 512B | 256B | Custom | Minimal systems |
| ATmega164P | 16KB | 1KB | 512B | Custom | Extended features |
| ATmega324P | 32KB | 2KB | 1KB | Custom | Enhanced capabilities |
| Platform | Models | Flash Types | Bootloader Support |
|---|---|---|---|
| ESP | ESP32, ESP8266, ESP32-C3 | .bin, .elf | esptool ROM |
| Tron Series | TR-100, TR-200, TRX | .hex, .bin | Custom UART Boot |
| ARM | STM32F1/F4, SAMD21, NRF52 | .hex, .bin, .uf2 | DFU, SWD |
sudo apt-get update
sudo apt-get install python3 python3-pip libusb-1.0-0-dev
pip install pyserial pyusbbrew install python libusb
pip install pyserial pyusb# Install Python from python.org or use:
winget install Python.Python.3.10
pip install pyserial pyusb# For AVR programming with avrdude
avrdude
# For ESP32/ESP8266
esptool.py
# For ARM devices with DFU
dfu-utilpip install tron-shellgit clone https://github.com/rootcastleco/Tron-Shell.git
cd Tron-Shell
pip install -e .tron listtron flash --port /dev/ttyUSB0 --file firmware.hex --platform atmega328ptron reset --port /dev/ttyUSB0 --platform atmega328ptron info --port /dev/ttyUSB0tron platformsEnable detailed logging for troubleshooting:
tron flash --port /dev/ttyUSB0 --file firmware.hex --debugPerform post-flash verification:
tron flash --port /dev/ttyUSB0 --file firmware.hex --verifytron flash --port /dev/ttyUSB0 --file firmware.hex --baud 115200Tron Shell can be configured via YAML configuration files. Default configuration is located at:
- Linux/macOS:
~/.config/tron/config.yaml - Windows:
%APPDATA%\tron\config.yaml
Example configuration:
serial:
default_baud: 115200
timeout: 2
devices:
atmega328p:
vid: "0x2341"
pid: "0x0043"
bootloader: "optiboot"
debug: false
verify_after_flash: true- Check USB cable connection
- Verify device drivers are installed
- Run
tron listto see all detected ports - Try different USB port on computer
# Add user to dialout group
sudo usermod -a -G dialout $USER
# Log out and back in, or:
newgrp dialout- Reduce baud rate with
--baud 9600 - Add delay with
--delay 500 - Check device bootloader compatibility
- Verify firmware file integrity
- Ensure no other application has the port open
- Restart the device
- Check device manager for unknown devices
- Update or reinstall device drivers
We welcome contributions from the community! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the Apache License 2.0. See LICENSE file for details.
For issues, feature requests, or questions:
- GitHub Issues: Tron-Shell Issues
- Documentation: Check the
/docsfolder - Community: Join our discussions
See CHANGELOG.md for version history and updates.
Created with dedication by ROOTCASTLE ENGINEERING INNOVATION