Skip to content

Commit 9301620

Browse files
Create README.md
1 parent 23eff88 commit 9301620

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# ESP32 Ultra Flasher
2+
3+
**ESP32 Ultra Flasher** is a terminal-based tool to easily flash ESP32 devices. It supports project validation, COM port detection, configuration auto-generation, and flashing of firmware using `esptool`. This project is designed to streamline flashing ESP32 devices, ensuring that configuration files and memory addresses are correctly set up before flashing.
4+
5+
## Features
6+
7+
- **Menu-based interface** for selecting and flashing ESP32 projects.
8+
- **Semi-Automatic generation of `config.ini`** based on `.bin` files in the project folder.
9+
- **Memory address validation** to prevent conflicts when flashing multiple `.bin` files.
10+
- **COM port detection** to list available serial devices and auto-select the correct port for flashing.
11+
- **Error handling** with detailed messages, highlighting issues such as missing files or incorrect settings.
12+
- **Interactive flashing process**, allowing the user to choose whether to erase the flash before writing.
13+
14+
## Requirements
15+
16+
- Tested on Python 3.11.
17+
- The following Python packages:
18+
- `esptool`: for flashing the ESP32.
19+
- `serial`: for serial communication with the ESP32.
20+
- `tprint`: for colorful terminal outputs and logging.
21+
22+
### Installation
23+
24+
1. Clone the repository or download the script.
25+
2. Install required dependencies:
26+
```bash
27+
pip install esptool pyserial tprint
28+
```
29+
30+
## Usage
31+
32+
1. **Folder Setup:**
33+
- Place your ESP32 project in the `esp32/` folder, make sure the project is in a folder as well, example `esp32/marauder/`.
34+
- Each project folder should contain:
35+
- `.bin` files (firmware binaries).
36+
- `config.ini` (it will be auto-generated if missing with your help).
37+
38+
2. **Run the Tool:**
39+
- Navigate to the folder containing the script.
40+
- Execute the script:
41+
```bash
42+
python esp32_flasher.py
43+
```
44+
45+
3. **Select a Project:**
46+
- The tool will display a list of projects found in the `esp32/` folder. You can select a project to flash or choose options to fix issues with the project.
47+
- If a project is missing a `config.ini`, you can choose to autogenerate it.
48+
49+
4. **Flashing the ESP32:**
50+
- After selecting a project, the tool will prompt you to select a COM port and whether you want to erase the flash before flashing the new firmware.
51+
- Once the correct settings are chosen, the flashing process will begin.
52+
53+
5. **Handle Issues:**
54+
- If any project has missing or misconfigured files, the tool will display a warning and allow you to fix issues before proceeding.
55+
56+
## Menu Breakdown
57+
58+
- **1. Open folder to fix manually:** Opens the project folder to allow the user to manually edit the files.
59+
- **2. Autogenerate config.ini:** Automatically generates a new `config.ini` based on the `.bin` files found in the project.
60+
- **3. Recheck this project:** Re-checks the project for errors after making manual changes or generating a new config file.
61+
- **4. Return to menu:** Returns to the main project menu.
62+
63+
## Configuration
64+
65+
If you need to generate or edit the `config.ini` manually, it should be placed in the project folder with the following format:
66+
67+
```ini
68+
[Settings]
69+
Baud_Rate = 115200
70+
firmware.bin = 0x1000
71+
...
72+
```
73+
74+
- `Baud_Rate`: The baud rate used for flashing (e.g., `115200`).
75+
- Each `.bin` file listed in the `config.ini` must have an associated memory address (in hexadecimal, e.g., `0x1000`).
76+
77+
## Troubleshooting
78+
79+
- **Missing `config.ini`:**
80+
If a project doesn't have a `config.ini`, the tool will offer to generate it semi-automatically.
81+
82+
- **Memory Address Conflicts:**
83+
The tool will check for conflicting memory addresses and warn you if two `.bin` files are configured to use the same address.
84+
85+
- **COM Port Detection Issues:**
86+
If the tool cannot detect any available COM ports, ensure your ESP32 device is properly connected and try again.
87+
88+
- **Flashing Fails:**
89+
If flashing fails, ensure the ESP32 is in bootloader mode and retry.
90+
91+
## Future Ideas
92+
93+
- [ ] Add communication to the tool for already flashed files
94+
95+
## License
96+
97+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
98+
99+
---
100+
101+
If you have any suggestions or issues, feel free to contribute or open an issue on the GitHub repository.

0 commit comments

Comments
 (0)