Skip to content
Flash firmware to STM32 microcontrollers using Python.
Python
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead, 13 commits behind florisla:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
stm32loader
tests
.bumpversion.cfg
.gitignore
.pylintrc
.travis.yml
CHANGELOG.md
LICENSE
MANIFEST.in
README.md
files.txt
noxfile.py
pyproject.toml
setup.cfg
setup.py

README.md

STM32Loader

florisa/stm32loader with added support for CORE2 board update using SBC gpios.

Most of this software is copyrighted by their respective owners:

Prerequisites

Read REQUIREMENTS document and follow the instructions for your SBC.

Installation

In repository's root directory run:

$ sudo python setup.py install

Usage

./stm32loader.py [-hqVewvrsRB] [-l length] [-p port] [-b baud] [-P parity] [-a address] [-g address] [-f family] [file.bin]
    -e          Erase (note: this is required on previously written memory)
    -u          Readout unprotect
    -w          Write file content to flash
    -v          Verify flash content versus local file (recommended)
    -r          Read from flash and store in local file
    -l length   Length of read
    -p port     Serial port (default: /dev/tty.usbserial-ftCYPMYJ)
    -b baud     Baud speed (default: 115200)
    -a address  Target address (default: 0x08000000)
    -g address  Start executing from address (0x08000000, usually)
    -f family   Device family to read out device UID and flash size; e.g F1 for STM32F1xx

    -h          Print this help text
    -q          Quiet mode
    -V          Verbose mode

    -s          Swap RTS and DTR: use RTS for reset and DTR for boot0
    -c          sbc used to update CORE2
    -W          write unprotect
    -R          Make reset active high
    -B          Make boot0 active low
    -u          Readout unprotect
    -n          No progress: don't show progress bar
    -P parity   Parity: "even" for STM32 (default), "none" for BlueNRG

To perform firmware update of CORE2 board run:

  • Raspberry Pi:
    $ stm32loader -c rpi -e -w -v firmware.bin
  • Asus Tinker Board:
    $ sudo stm32loader -c tinker -e -w -v firmware.bin
  • UpBoard:
    $ sudo stm32loader -c upboard -e -w -v firmware.bin
You can’t perform that action at this time.