Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiangshan00001/pystm32flash
python bindings of stm32flash serial/i2c flash lib
https://github.com/jiangshan00001/pystm32flash
Last synced: about 16 hours ago
JSON representation
python bindings of stm32flash serial/i2c flash lib
- Host: GitHub
- URL: https://github.com/jiangshan00001/pystm32flash
- Owner: Jiangshan00001
- License: agpl-3.0
- Created: 2022-03-26T03:18:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-27T03:18:15.000Z (over 2 years ago)
- Last Synced: 2024-08-09T10:31:48.940Z (3 months ago)
- Language: C
- Size: 236 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pystm32flash
python bindings of stm32flash serial/i2c flash lib# it should work on windows, linux and macos.
# how to install it:
```
pip install pystm32flash
```# how to use it:
## get device information:
```
import pystm32flash as stm32f
stm32f.api.set_device(b'/dev/ttyS0')
stm32f.api.run_it()```
or:
```
import pystm32flash as stm32f
stm32f.api.set_device(b'/dev/i2c-0')
stm32f.api.run_it()
```## write and verify:
```
import pystm32flash as stm32f
#show help:
stm32f.api.show_help()
stm32f.api.set_arg(b'-w', b'test.hex')
stm32f.api.set_arg(b'-v', b'')
stm32f.api.set_device(b'/dev/ttyS0')
stm32f.api.run_it()
```## write and verify and start execution:
```
import pystm32flash as stm32f
#show help:
stm32f.api.show_help()
stm32f.api.set_arg(b'-w', b'test.hex')
stm32f.api.set_arg(b'-v', b'')
stm32f.api.set_arg(b'-g', b'0x0')
stm32f.api.set_device(b'/dev/ttyS0')
stm32f.api.run_it()
```## read flash to file:
```
import pystm32flash as stm32f
#show help:
stm32f.api.show_help()
stm32f.api.set_arg(b'-r', b'test.bin')
stm32f.api.set_device(b'/dev/ttyS0')
stm32f.api.run_it()
```# any problem?
make an issue:
https://github.com/Jiangshan00001/pystm32flash/issuesc code is mostly from:
https://github.com/ARMinARM/stm32flash