Skip to main content

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 details)

Uploaded Source

Built Distribution

pystm32flash-0.0.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file pystm32flash-0.0.3.tar.gz.

File metadata

  • Download URL: pystm32flash-0.0.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for pystm32flash-0.0.3.tar.gz
Algorithm Hash digest
SHA256 13221b1523bdc9a30d3e9153fde46db7c45e3a7a43e27f75f71f5c731a46489b
MD5 9fbafdea5d5550f001cd550365592f4d
BLAKE2b-256 cf6d6c15c2ddf9a4b83abe2927b199dd6fde30505b39e4871cd89cc81b4d36c0

See more details on using hashes here.

File details

Details for the file pystm32flash-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pystm32flash-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for pystm32flash-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a898fc97b43e76de213098dec49e16e3199244139707d9c8ad4a1b03a39ed4f
MD5 68b717409f7092f1e08ac1e69e4b5717
BLAKE2b-256 9aa9c39d034be46dc583fdbc7736e7eac65b4374b10c175318d9daf4e36700f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page