tyuTool
is a cross-platform serial port utility designed for Internet of Things (IoT) developers to flash and read firmware for various mainstream chips. It provides both a simple Graphical User Interface (GUI) and a powerful Command-Line Interface (CLI) to streamline development and debugging workflows.
- Dual-Mode Operation: Offers both an intuitive GUI and a flexible CLI to meet the needs of different scenarios.
- Core Serial Functions: Supports firmware flashing (writing to Flash) and firmware reading (reading from Flash).
- Cross-Platform Support: Fully compatible with Windows, Linux, and macOS (x86 & ARM64).
- Multi-Chip Support: Built-in flashing protocols for a variety of chips, easily handling different projects.
- User-Friendly: Clean user interface, with the CLI providing detailed progress bars and status feedback.
- Standalone Executables: Provides portable executables that run without needing a Python environment.
This tool currently supports (but is not limited to) the following chip platforms:
- BK7231N / BK7231T
- RTL8720CF
- ESP32 / ESP32-C3 / ESP32-S3
- LN882H
- T5
- ...
We offer two ways to use the tool. Please choose the one that suits your needs.
Follow these steps if you want to do secondary development or run directly from the source code.
-
Prerequisites:
- Ensure you have Python 3.8+ installed.
- Install Git.
-
Clone the Repository:
git clone https://github.com/your-repo/tyutool.git cd tyutool
-
Create a Virtual Environment and Install Dependencies: We provide automated scripts for this step.
- Linux / macOS:
. ./export.sh
- Windows:
.\export.bat
This script will automatically create a
venv
virtual environment and install all dependencies fromrequirements.txt
usingpip
. - Linux / macOS:
-
(Important) Linux Serial Port Permissions: On Linux systems, the default user may not have permission to access serial ports. Please execute the following command to add the current user to the
dialout
group:sudo usermod -aG dialout $USER
You must restart or log out and log back in for the permissions to take effect!
This is the simplest and fastest way, requiring no installation of Python or any dependencies.
-
Download: Choose the latest version for your operating system from the links below.
-
Extract: Unzip the downloaded archive to any directory.
-
Run:
- Linux/macOS: Run the extracted file directly from your terminal, e.g.,
./tyutool_gui
. - Windows: Double-click
tyutool_gui.exe
to run.
- Linux/macOS: Run the extracted file directly from your terminal, e.g.,
-
(Important) Install Drivers: Ensure you have the correct USB to UART driver (e.g., CP210x, CH340) for your target chip installed on your computer, otherwise the tool will not be able to find the serial port.
Start the GUI by running tyutool_gui.py
or the corresponding executable.
# Start from source
python tyutool_gui.py
Steps:
- Select Chip (Device): Choose your target chip model from the dropdown menu.
- Select Port: Click the refresh button, then select the serial port your device is connected to from the dropdown menu.
- Set Baud Rate: Enter the flashing baud rate according to your hardware requirements (default is
115200
). - Select File: Click the "..." button next to "File" to select the
.bin
firmware file to be flashed. - Execute Action: Click the "Write" or "Read" button to start the task. The progress bar will show the current status.
Run tyutool_cli.py
or the corresponding executable and control its behavior with arguments.
# Start from source
python tyutool_cli.py --help
Common Command Examples:
-
Flash Firmware (Write) Flash the
bk.bin
file to aBK7231N
chip on port/dev/ttyACM0
with a baud rate of2000000
.# Syntax: tyutool_cli.py write -d <chip> -p <port> -b <baudrate> -f <filepath> python tyutool_cli.py write -d BK7231N -p /dev/ttyACM0 -b 2000000 -f ./bk.bin
-
Read Firmware (Read) Read
0x200000
bytes of data starting from address0x11000
from aBK7231N
chip and save it asread.bin
.# Syntax: tyutool_cli.py read -d <chip> -p <port> -b <baudrate> -s <start_address> -l <length> -f <save_path> python tyutool_cli.py read -d BK7231N -p /dev/ttyACM0 -b 2000000 -s 0x11000 -l 0x200000 -f read.bin
For more details on the project's build process, packaging, and code structure, please refer to the Development Documentation.
This project is licensed under the Apache-2.0 License.
If your computer cannot recognize the serial port, it is usually because the USB to UART driver is missing.
Here are the download links for common CH34x series chip drivers:
- Windows: CH343SER_EXE
- macOS: CH34XSER_MAC_ZIP
Here are the download links for common CP210x series chip drivers:
- Windows: CP210x_Windows_Drivers
- macOS: CP210x_Mac_Drivers