Registry / devops / stm32loader

stm32loader

JSON →
library0.7.1pypypi✓ verified 85d ago

Flash firmware to STM32 microcontrollers using Python. Supports USART and DFU protocols. Current version: 0.7.1. Maintained, low release cadence.

pip install stm32loader
INSTALL
IMPORT
SIG · STM32LOADER
S
stm32loader
devopspythonv0.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

main
from stm32loader import main
import stm32loader
stm32loader exposes a CLI entry point, not a module with classes. Use the main function for programmatic access.

Flash firmware via USART using main() with CLI arguments as list.

from stm32loader import main # Example: flash firmware.bin to STM32 via USART at /dev/ttyUSB0, baud 115200 # Equivalent CLI: python -m stm32loader -p /dev/ttyUSB0 -b 115200 -e -w -v firmware.bin main(['-p', '/dev/ttyUSB0', '-b', '115200', '-e', '-w', '-v', 'firmware.bin'])
Debug
Known issues
breakingVersion 0.6.x and earlier used different argument parsing. The '-p' flag for port changed behavior.
fix
Use version >=0.7.0. Check CHANGELOG for API changes.
affects: <0.7.0
gotchaThe library is designed for CLI use; programmatic usage via main() replicates the CLI. Do not attempt to import internal modules.
fix
Use from stm32loader import main and pass sys.argv or a list of arguments.
affects: all
gotchaDFU mode requires additional system tools (e.g., dfu-util) and is not fully implemented in this library.
fix
For DFU, use dfu-util directly. This library focuses on USART bootloader.
affects: all
Errors
Common errors & fixes
ImportError: No module named stm32loader
stm32loader is not installed, or you are using a Python environment without it.
fix
Run: pip install stm32loader
Error: Unable to open serial port /dev/ttyUSB0
Port not found or permission denied (Linux).
fix
Check port exists (ls /dev/ttyUSB*). Add user to dialout group or use sudo.
Upgrade
Version history
0.7.1latest on PyPI · released Oct 18, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

stm32loader — pip install stm32loader · libregistry