Open source version of the STMicroelectronics STLINK Tools
 
 
 
 
 
Go to file
nightwalker-87 ad06dace83 Removed old tested-boards list. 2020-04-08 14:10:01 +02:00
.github/ISSUE_TEMPLATE General project update: 2020-02-19 21:20:10 +01:00
cmake fix intendation in Version.cmake 2020-03-21 21:31:12 +02:00
debian Merge branch 'pr-847/zx81a/master' into develop. 2020-02-21 01:07:52 +01:00
doc Removed old tested-boards list. 2020-04-08 14:10:01 +02:00
etc Support for "STM32+Audio" v2-1 firmware (#790) 2019-04-13 12:07:58 +02:00
flashloaders Fixing low-voltage flashing on STM32F7 parts. (#567) 2017-03-14 18:54:02 +01:00
include Removed duplicated chip IDs. 2020-03-16 13:34:17 +01:00
scripts Prepare for win64 static executable builds 2017-01-28 11:30:30 +01:00
src Merge pull request #886 from rewolff/silence_unnecessary_messages 2020-03-21 21:21:49 +01:00
stlinkv1_macosx_driver Resolved conflicts with develop branch. 2020-02-24 23:11:51 +01:00
tests check if app's need for libssp. 2020-03-21 14:48:40 +02:00
usr/lib/pkgconfig Debian packaging, CMake and README.md fixes (#683) 2018-03-16 16:41:07 +01:00
.appveyor.yml appveyor: Cache libusb-1.0.20.7z instead of non-allowed wildcard 2016-09-15 15:25:28 +02:00
.gitignore Fix mingw build (#610) 2017-06-29 21:33:31 +02:00
.travis-lin-mingw.sh Add win32 travis build (#2) 2020-02-29 16:23:22 +02:00
.travis.sh Resolved conflicts with develop branch. 2020-02-24 23:11:51 +01:00
.travis.yml Add win32 travis build (#2) 2020-02-29 16:23:22 +02:00
.version compare git version with .version 2020-03-01 22:39:43 +02:00
CHANGELOG.md Update for CHANGELOG.md 2020-04-08 01:58:59 +02:00
CMakeLists.txt check if app's need for libssp. 2020-03-21 14:48:40 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2020-02-20 00:24:18 +01:00
LICENSE.md Archived page from github project wiki. 2020-02-20 00:37:04 +01:00
Makefile Initial work to fix cygwin builds 2016-10-22 09:44:37 +02:00
README.md General Project Update 2020-03-21 01:59:05 +01:00

README.md

Open source version of the STMicroelectronics Stlink Tools

BSD licensed GitHub release GitHub commits Downloads Linux Status macOS Status

Recent new features and bugfixes can be found in the Changelog of this software project.

Introduction

This stlink toolset supports several so called stlink programmer boards (and clones thereof) which use a microcontroller chip to translate commands from USB to JTAG.

These programmer boards are available in four versions:

  • STLINKv1:
    • transport layer: SCSI passthru commands over USB
    • present on STM32VL discovery kits
  • STLINKv2:
    • transport layer: raw USB commands
    • present on STM32L discovery and nucleo and later kits
  • STLINKv2-1:
    • transport layer: raw USB commands
    • present on some STM32 nucleo boards
  • STLINKv3:
    • not yet supported by this toolset (but planned)

Supported hardware combinations

Currently known working combinations of programmers and targets are listed in doc/tested-boards.md.

Installation

Windows: download v1.6.0 from the releases page.

macOS: install from homebrew or download v1.6.0 from the releases page.

Linux:

We recommend to install stlink-tools from the package repository of the used distribution:

Other Operating Systems:

Installation from source (advanced users)

When there is no executable available for your platform or you need the latest (possible unstable) version you need to compile the toolset yourself. This procedure is explained in the compiling manual.

Contributing and versioning

  • The semantic versioning scheme is used. Read more at semver.org
  • Before creating a pull request, please ALWAYS open a new issue for the discussion of the intended new features. Bugfixes don't require a discussion via a ticket-issue. However they should always be described in a few words as soon as they appear to help others as well.
  • Contributors and/or maintainers may submit comments or request changes to patch-proposals and/or pull-requests.
  • ATTENTION: NEVER EVER use the '#' character to count-up single points within a listing as '#' is exclusively reserved for referencing github issues and pull-requests. Otherwise you accidentally introduce false cross references within the project.
  • Please start new forks from the develop branch if possible as pull requests will go into this branch as well.

License

The stlink library and tools are licensed under the BSD license.

The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are licensed under the GPLv2+.

Current state of the project

Known missing features

Some features are currently missing from the texane/stlink toolset. Here we would appreciate any help and would love to welcome new contributors who want to get involved:

  • Instrumentation Trace Macro (ITM) Cell (#136)
  • OTP area programming (#202)
  • EEPROM area programming (#318)
  • Protection bits area reading (#346)
  • Writing external memory connected to an STM32 controller (e.g Quad SPI NOR flash) (#412)
  • MCU hotplug (#449)
  • Writing options bytes (region) (#458)
  • Control programming speed (#462)
  • Support for STLINKv3 programmer (#820)

Known bugs

Sometimes flashing only works after a mass erase

There is seen a problem sometimes where a flash loader run error occurs and is resolved after mass-erase of the flash:

2015-12-09T22:01:57 INFO src/stlink-common.c: Successfully loaded flash loader in sram
2015-12-09T22:02:18 ERROR src/stlink-common.c: flash loader run error
2015-12-09T22:02:18 ERROR src/stlink-common.c: run_flash_loader(0x8000000) failed! == -1

Issue related to this bug: #356

Flash size is detected as zero bytes size

It is possible that the STM32 flash is write protected, the st-flash tool will show something like this:

st-flash write prog.bin 0x8000000
2017-01-24T18:44:14 INFO src/stlink-common.c: Loading device parameters....
2017-01-24T18:44:14 INFO src/stlink-common.c: Device connected is: F1 High-density device, id 0x10036414
2017-01-24T18:44:14 INFO src/stlink-common.c: SRAM size: 0x10000 bytes (64 KiB), Flash: 0 bytes (0 KiB) in pages of 2048 bytes

As you can see, it gives out something unexpected like

Flash: 0 bytes (0 KiB) in pages of 2048 bytes
st-info --probe
Found 1 stlink programmers
 serial: 303030303030303030303031
openocd: "\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x31"
  flash: 0 (pagesize: 2048)
   sram: 65536
 chipid: 0x0414
  descr: F1 High-density device

Try to remove the write protection (probably only possible with ST Link Utility from ST itself).

Issue related to this bug: #545