Library using stm32flash in python.
Project description
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()
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()
c code is mostly from: https://github.com/ARMinARM/stm32flash
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pystm32flash-0.0.3.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for pystm32flash-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a898fc97b43e76de213098dec49e16e3199244139707d9c8ad4a1b03a39ed4f |
|
MD5 | 68b717409f7092f1e08ac1e69e4b5717 |
|
BLAKE2b-256 | 9aa9c39d034be46dc583fdbc7736e7eac65b4374b10c175318d9daf4e36700f9 |