STM32 ST-Link CLI microcontroller operations: connect, program, and erase. Before use, STM32 ST-LINK Utility must be installed.
Project description
STM32_ST-link
STM32_ST-link 是基于 STM32 ST-LINK Utility 的一个命令行工具的封装,用于在命令行下对STM32芯片进行烧录、擦除、复位、验证等操作。
可用于无界面批量自动化烧录、测试
环境
win10、python3.8、STM32 ST-LINK Utility 4.6.0
安装
STM32 ST-LINK Utility =>4.6.0
pip install STM32_ST-link
使用
from STM32_ST_link import STLinkCLI
# 创建STLinkCLI实例
stlink = STLinkCLI()
# 连接到设备
if stlink.connect(): # ST-link 连接单片机
stlink.erase() # 擦除整个芯片(可选)
# 烧录程序
if stlink.program(
file_path=r"bin/at803v1r1_baseband.bin", # 烧录的固件文件
address="0x08020000", # 烧录地址
verify=True, # 烧录完验证
reset=True # 烧录完成复位
):
print("Programming successful!") # 烧录成功
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stm32_st_link-1.0.2.tar.gz.
File metadata
- Download URL: stm32_st_link-1.0.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8067d9fb8f0fd6d81064e2ca2bda327280768b0513ecc534b7223e0f3a027cd7
|
|
| MD5 |
1965b96de35b067403f1279a85c6d9a0
|
|
| BLAKE2b-256 |
a19f450284f42f9cc8100bd99ee5d4a4be6e616d4722576d9584da7d9b4bf3bb
|
File details
Details for the file STM32_ST_link-1.0.2-py3-none-any.whl.
File metadata
- Download URL: STM32_ST_link-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2bd702a400b2b1ffc943b9d8d91609256b9db3b3a74df197964107386713c7d
|
|
| MD5 |
0f037dfb9fe1ed9ba350c7a712a8c86d
|
|
| BLAKE2b-256 |
d608554da06bb8d8b4d0e8a8d389cf56e1f47d601981389f934c5ed18acfb90e
|