https://github.com/tito/stk500
Tools implemented in Python for STK500v1
https://github.com/tito/stk500
Last synced: over 1 year ago
JSON representation
Tools implemented in Python for STK500v1
- Host: GitHub
- URL: https://github.com/tito/stk500
- Owner: tito
- Created: 2019-01-27T15:58:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T17:12:39.000Z (over 7 years ago)
- Last Synced: 2025-03-30T00:11:09.698Z (over 1 year ago)
- Language: Python
- Size: 19.5 KB
- Stars: 4
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# STK500 client in Python
I needed to understand the STK500v1 protocol used by avrdude to flash Arduino
in order to reimplement it as a embedded one in C for the ESP32.
This is the end result. Works only for flashing a binary in the FLASH memory.
You can also dump the FLASH memory.
## Requirements
```
pip install pyserial progressbar2
```
## Usage
In the arduino, export your firmware as a binary (Sketch > Export as Compiled
Binary). Then:
```
python hex2bin.py PATH_TO_YOUR_FIRMWARE.hex firmware.bin
```
Then you can upload it:
```
python binuploader.py upload /dev/ttyUSB0 firmware.bin
```
You can also dump the memory:
```
python binuploader.py dump /dev/ttyUSB0
```