Merge remote-tracking branch 'origin/develop'

master v1.8.0
nightwalker-87 2024-02-01 00:01:58 +01:00
commit 40948aa3de
207 zmienionych plików z 10542 dodań i 11125 usunięć

Wyświetl plik

@ -5,17 +5,22 @@ title: "[STM32 device name]: $YourTitle"
labels: ""
---
Thank you for giving feedback to the stlink project.
**Thank you for giving feedback to the stlink project.**
**NOTICE: Please read and follow instructions in #906 before submitting a ticket.
This bug report will be deleted without notice when not enough information is provided! So please ensure that all fields are filled out.**
---
**NOTE: In order to offer sufficient and the best possible support, please read /CONTRIBUTING.md and follow the given instructions _before_ submitting a ticket.**
**Bug reports and/or feature requests will be deleted, if they violate our contribution guidelines and if no issue-template is used!** Thank you for your support.
---
- [ ] I made serious effort to avoid creating duplicate or nearly similar issue
In order to allow developers and other contributors to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific problem.
In order to allow developers to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific problem.
- [ ] Programmer/board type: [enter here] (e.g STLINK /V1, /V2, /V2-onboard, /V2-clone, /V3)
- [ ] Operating system an version: [enter here] (e.g Linux, macOS, Windows)
- [ ] Operating system an version: [enter here] (e.g Linux, Windows)
- [ ] **stlink tools version** and/or git commit hash: [enter here] (e.g v1.6.1/git-d0416149)
- [ ] stlink commandline tool name: [enter here] (e.g `st-info`, `st-flash`, `st-trace`, `st-util`)
- [ ] Target chip (and board, if applicable): [enter here] (e.g STM32F103C8T6 (NUCLEO-F103RB))
@ -31,7 +36,3 @@ OUTPUT/ERROR of the commandline tool(s)
Expected/description:
`short description of the expected value`
Thank you for your support.
The stlink project maintainers

Wyświetl plik

@ -5,17 +5,22 @@ title: "[feature] $YourTitle"
labels: code/feature-request
---
Thank you for giving feedback to the stlink project.
**Thank you for giving feedback to the stlink project.**
**NOTICE: Please read and follow instructions in #906 before submitting a ticket.
This feature request will be deleted without notice when not enough information is provided! So please ensure that all fields are filled out.**
---
**NOTE: In order to offer sufficient and the best possible support, please read /CONTRIBUTING.md and follow the given instructions _before_ submitting a ticket.**
**Bug reports and/or feature requests will be deleted, if they violate our contribution guidelines and if no issue-template is used!** Thank you for your support.
---
- [ ] I made serious effort to avoid creating duplicate or nearly similar issue
In order to allow developers and other contributors to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific request.
In order to allow developers to isolate and target your respective issue, please take some time to select the check boxes below and fill out each of the following items appropriate to your specific request.
- [ ] Programmer/board type: [enter here] (e.g STLINK /V1, /V2, /V2-onboard, /V2-clone, /V3)
- [ ] Operating system an version: [enter here] (e.g Linux, macOS, Windows)
- [ ] Operating system an version: [enter here] (e.g Linux, Windows)
- [ ] **stlink tools version** and/or git commit hash: [enter here] (e.g v1.6.1/git-d0416149)
- [ ] stlink commandline tool name: [enter here] (e.g `st-info`, `st-flash`, `st-trace`, `st-util`)
- [ ] Target chip (and board, if applicable): [enter here] (e.g STM32F103C8T6 (NUCLEO-F103RB))
@ -31,7 +36,3 @@ OUTPUT/ERROR of the commandline tool(s)
Expected/description:
`short description of the expected value`
Thank you for your support.
The stlink project maintainers

Wyświetl plik

@ -9,193 +9,13 @@ on:
jobs:
# Linux
# job_linux_16_04_64_gcc:
# name: ubuntu-16.04 gcc
# runs-on: ubuntu-16.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install gcc-5 libusb-1.0.0-dev libgtk-3-dev rpm
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_linux_16_04_32_gcc:
# name: ubuntu-16.04 gcc 32-bit
# runs-on: ubuntu-16.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install gcc-5 libusb-1.0.0-dev libgtk-3-dev rpm
# - name: Set compiler flags
# run: |
# CFLAGS="$CFLAGS -m32"
# CXXFLAGS="$CXXFLAGS -m32"
# LDFLAGS="$LDFLAGS -m32"
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_linux_16_04_64_clang:
# name: ubuntu-16.04 clang
# runs-on: ubuntu-16.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install clang-3.5 libusb-1.0.0-dev libgtk-3-dev rpm
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_linux_16_04_32_clang:
# name: ubuntu-16.04 clang 32-bit
# runs-on: ubuntu-16.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install clang-3.5 libusb-1.0.0-dev libgtk-3-dev rpm
# - name: Set compiler flags
# run: |
# CFLAGS="$CFLAGS -m32"
# CXXFLAGS="$CXXFLAGS -m32"
# LDFLAGS="$LDFLAGS -m32"
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
job_linux_18_04_64_gcc:
name: ubuntu-18.04 gcc
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: sudo apt-get install gcc-6 libusb-1.0.0-dev libgtk-3-dev rpm
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_linux_18_04_32_gcc:
name: ubuntu-18.04 gcc 32-bit
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: sudo apt-get install gcc-6 libusb-1.0.0-dev libgtk-3-dev rpm
- name: Set compiler flags
run: |
CFLAGS="$CFLAGS -m32"
CXXFLAGS="$CXXFLAGS -m32"
LDFLAGS="$LDFLAGS -m32"
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_linux_18_04_64_clang:
name: ubuntu-18.04 clang
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: sudo apt-get install clang-10 libusb-1.0.0-dev libgtk-3-dev rpm
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_linux_18_04_32_clang:
name: ubuntu-18.04 clang 32-bit
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install clang-10 libusb-1.0.0-dev libgtk-3-dev rpm
- name: Set compiler flags
run: |
CFLAGS="$CFLAGS -m32"
CXXFLAGS="$CXXFLAGS -m32"
LDFLAGS="$LDFLAGS -m32"
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_linux_20_04_64_gcc:
name: ubuntu-20.04 gcc
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm
run: sudo apt update && sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm
- name: make debug
run: sudo make clean && make debug
- name: make test
@ -215,7 +35,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm
run: sudo apt update && sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm
- name: Set compiler flags
run: |
CFLAGS="$CFLAGS -m32"
@ -240,7 +60,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install clang-10 libusb-1.0.0-dev libgtk-3-dev rpm
run: sudo apt update && sudo apt-get install clang-12 libusb-1.0.0-dev libgtk-3-dev rpm
- name: make debug
run: sudo make clean && make debug
- name: make test
@ -260,7 +80,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install clang-10 libusb-1.0.0-dev libgtk-3-dev rpm
run: sudo apt update && sudo apt-get install clang-12 libusb-1.0.0-dev libgtk-3-dev rpm
- name: Set compiler flags
run: |
CFLAGS="$CFLAGS -m32"
@ -279,105 +99,13 @@ jobs:
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
# macOS
# job_macos_10_14_64_gcc:
# name: macos-10.14 gcc
# runs-on: macos-10.14
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install gcc libusb gtk+3
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_macos_10_14_32_gcc:
# name: macos-10.14 gcc 32-bit
# runs-on: macos-10.14
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install gcc libusb gtk+3
# - name: Set compiler flags
# run: |
# CFLAGS="$CFLAGS -m32"
# CXXFLAGS="$CXXFLAGS -m32"
# LDFLAGS="$LDFLAGS -m32"
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_macos_10_14_64_clang:
# name: macos-10.14 clang
# runs-on: macos-10.14
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install llvm libusb gtk+3
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_macos_10_14_32_clang:
# name: macos-10.14 clang 32-bit
# runs-on: macos-10.14
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install llvm libusb gtk+3
# - name: Set compiler flags
# run: |
# CFLAGS="$CFLAGS -m32"
# CXXFLAGS="$CXXFLAGS -m32"
# LDFLAGS="$LDFLAGS -m32"
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
job_macos_10_15_gcc:
name: macos-10.15 gcc
runs-on: macos-10.15
job_linux_22_04_64_gcc:
name: ubuntu-22.04 gcc
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: brew install gcc libusb gtk+3
run: sudo apt update && sudo apt-get install gcc-12 libusb-1.0.0-dev libgtk-4-dev rpm
- name: make debug
run: sudo make clean && make debug
- name: make test
@ -391,13 +119,63 @@ jobs:
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_macos_10_15_clang:
name: macos-10.15 clang
runs-on: macos-10.15
job_linux_22_04_32_gcc:
name: ubuntu-22.04 gcc 32-bit
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: brew install llvm libusb gtk+3
run: sudo apt update && sudo apt-get install gcc-12 libusb-1.0.0-dev libgtk-4-dev rpm
- name: Set compiler flags
run: |
CFLAGS="$CFLAGS -m32"
CXXFLAGS="$CXXFLAGS -m32"
LDFLAGS="$LDFLAGS -m32"
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_linux_22_04_64_clang:
name: ubuntu-22.04 clang
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt update && sudo apt-get install clang-14 libusb-1.0.0-dev libgtk-4-dev rpm
- name: make debug
run: sudo make clean && make debug
- name: make test
run: sudo make clean && make test
- name: make release
run: sudo make clean && make release
- name: sudo make install
run: sudo make clean && sudo make install
- name: sudo make package
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
job_linux_22_04_32_clang:
name: ubuntu-22.04 clang 32-bit
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt update && sudo apt-get install clang-14 libusb-1.0.0-dev libgtk-4-dev rpm
- name: Set compiler flags
run: |
CFLAGS="$CFLAGS -m32"
CXXFLAGS="$CXXFLAGS -m32"
LDFLAGS="$LDFLAGS -m32"
- name: make debug
run: sudo make clean && make debug
- name: make test
@ -410,53 +188,15 @@ jobs:
run: sudo make package
- name: sudo make uninstall
run: sudo make uninstall && sudo make clean
# job_macos_11_gcc:
# name: macos-11.0 gcc
# runs-on: macos-11.0
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install gcc libusb gtk+3
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# job_macos_11_clang:
# name: macos-11.0 clang
# runs-on: macos-11.0
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install llvm libusb gtk+3
# - name: make debug
# run: sudo make clean && make debug
# - name: make test
# run: sudo make clean && make test
# - name: make release
# run: sudo make clean && make release
# - name: sudo make install
# run: sudo make clean && sudo make install
# - name: sudo make package
# run: sudo make package
# - name: sudo make uninstall
# run: sudo make uninstall && sudo make clean
# Linux MinGW cross compliation
# job_linux_20_04_cross:
# name: ubuntu-20.04 mingw64
# runs-on: ubuntu-20.04
# job_linux_22_04_cross:
# name: ubuntu-22.04 mingw64
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm mingw-w64
# run: sudo apt-get install gcc-12 libusb-1.0.0-dev libgtk-4-dev rpm mingw-w64
# - name: Building Release for Windows (x86-64) ...
# run: sudo mkdir -p build-mingw && cd build-mingw && sudo cmake \
# -DCMAKE_SYSTEM_NAME=Windows \

Wyświetl plik

@ -13,12 +13,12 @@ name: "CodeQL"
on:
push:
branches: [ testing, develop, master ]
branches: [testing, develop, master]
pull_request:
# The branches below must be a subset of the branches above
branches: [ testing, develop ]
branches: [testing, develop]
schedule:
- cron: '00 20 * * 1'
- cron: "00 20 * * 1"
jobs:
analyze:
@ -28,20 +28,20 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
language: ["cpp"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Install dependencies
run: sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm
run: sudo apt update && sudo apt-get install gcc-10 libusb-1.0.0-dev libgtk-3-dev rpm
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@ -52,7 +52,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -66,4 +66,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

Wyświetl plik

@ -1,48 +0,0 @@
#!/bin/bash
echo "-- C compilers available"
ls -1 /usr/bin/gcc*
ls -1 /usr/bin/clang*
ls -1 /usr/bin/scan-build*
echo "----"
echo "WORK DIR:$DIR"
DIR=$PWD
if [ "$TRAVIS_JOB_NAME" == "linux-mingw-64" ]; then
echo "--> Building for Windows (x86-64) ..."
mkdir -p build-mingw && cd build-mingw-64
cmake -DCMAKE_SYSTEM_NAME=Windows -DTOOLCHAIN_PREFIX=x86_64-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/modules/set_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && rm -rf build-mingw-64 && cd -
elif [ "$TRAVIS_JOB_NAME" == "linux-mingw-32" ]; then
echo "--> Building for Windows (i686) ..."
mkdir -p build-mingw && cd build-mingw-32
cmake -DCMAKE_SYSTEM_NAME=Windows -DTOOLCHAIN_PREFIX=i686-w64-mingw32 \
-DCMAKE_TOOLCHAIN_FILE=$PWD/../cmake/modules/set_toolchain.cmake -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && rm -rf build-mingw-32 && cd -
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get update -qq || true
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make && cd -
echo "--> Building Release with package..."
mkdir -p build/Release && cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install $DIR
make package && cd -
else # local test-build
echo "--> Building Debug..."
mkdir -p build/Debug && cd build/Debug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/install ../../
make && cd -
echo "--> Building Release with package..."
mkdir -p build/Release && cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ../../
make package && cd -
fi

Wyświetl plik

@ -1,33 +0,0 @@
language: c
jobs:
include:
### cross builds on AMD64 ###
- os: linux
dist: focal
env: BADGE=linux-mingw-64
name: linux-mingw
compiler: gcc-10
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
packages:
["gcc-10", "libusb-1.0.0-dev", "libgtk-3-dev", "rpm", "mingw-w64"]
- os: linux
dist: focal
env: BADGE=linux-mingw-32
name: linux-mingw
compiler: gcc-10
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
packages:
["gcc-10", "libusb-1.0.0-dev", "libgtk-3-dev", "rpm", "mingw-w64"]
script:
- git fetch --tags
- printenv
- cmake --version
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis.sh; fi

Wyświetl plik

@ -1 +1 @@
1.7.0
1.8.0

Wyświetl plik

@ -1,5 +1,111 @@
# stlink Changelog
# v1.8.0
Release date: 2024-02-01
This release drops support for macOS and some older operating systems. Check project README for details.
Removed Travis CI integration as it is no longer functional.
Updated system requirements:
- `cmake` >= 3.13.0
- `libusb` >= 1.0.22
- `libgtk-dev` >= 3.22.30
Features:
- Support for writing option bytes on STM32F0/F1/F3 ([#346](https://github.com/stlink-org/stlink/pull/346), [#458](https://github.com/stlink-org/stlink/pull/458), [#808](https://github.com/stlink-org/stlink/pull/808), [#1084](https://github.com/stlink-org/stlink/pull/1084), [#1112](https://github.com/stlink-org/stlink/pull/1112))
- Initial support for STM32 L5 & U5 devices and minor changes ([#1005](https://github.com/stlink-org/stlink/pull/1005), [#1096](https://github.com/stlink-org/stlink/pull/1096), [#1247](https://github.com/stlink-org/stlink/pull/1247), [#1300](https://github.com/stlink-org/stlink/pull/1300), [#1301](https://github.com/stlink-org/stlink/pull/1301))
- Added chip-IDs for STM32G0B0/G0B1/G0C1/G050/G051/G061 ([#1140](https://github.com/stlink-org/stlink/pull/1140), [#1359](https://github.com/stlink-org/stlink/pull/1359))
- Added option byte info for STM32F411XX ([#1141](https://github.com/stlink-org/stlink/pull/1141))
- Expanded and revised list of chips ([#1145](https://github.com/stlink-org/stlink/pull/1145), [#1164](https://github.com/stlink-org/stlink/pull/1164))
- STM32H72X/3X: Added full access to all device memory ([#1158](https://github.com/stlink-org/stlink/pull/1158), [#1159](https://github.com/stlink-org/stlink/pull/1159))
- Added support for STM32WLEx ([#1173](https://github.com/stlink-org/stlink/pull/1173), [#1273](https://github.com/stlink-org/stlink/pull/1273))
- Added support for STLINK-V3 devices with no MSD ([#1185](https://github.com/stlink-org/stlink/pull/1185))
- Updated gdb-server.c to allow external memory access on STM32H73xx ([#1196](https://github.com/stlink-org/stlink/pull/1196), [#1197](https://github.com/stlink-org/stlink/pull/1197))
- Erase addr size / section of the flash memory with st-flash ([#1213](https://github.com/stlink-org/stlink/pull/1213))
- Added support for STM32L4Q5 ([#1224](https://github.com/stlink-org/stlink/pull/1224), [#1295](https://github.com/stlink-org/stlink/pull/1295))
- Added writing and reading for STM32WL option bytes ([#1226](https://github.com/stlink-org/stlink/pull/1226), [#1227](https://github.com/stlink-org/stlink/pull/1227))
- Added parametres option_base, option_size for F401xD_xE ([#1235](https://github.com/stlink-org/stlink/pull/1235))
- Added support for option bytes to F1xx_XLD (GD32F30x) ([#1250](https://github.com/stlink-org/stlink/pull/1250))
- Added option byte address for L4Rx devices ([#1254](https://github.com/stlink-org/stlink/pull/1254))
- Added udev-rule rule for the STLink v3 MINIE programmer ([#1274](https://github.com/stlink-org/stlink/pull/1274), [#1281](https://github.com/stlink-org/stlink/pull/1281), [#1358](https://github.com/stlink-org/stlink/pull/1358))
- Added support for STM32C0x1 devices ([#1329](https://github.com/stlink-org/stlink/pull/1329), [#1354](https://github.com/stlink-org/stlink/pull/1354))
- First Implementation of the OTP Read/Write function ([#1352](https://github.com/stlink-org/stlink/pull/1352), [#1353](https://github.com/stlink-org/stlink/pull/1353))
Updates & changes:
- [refactoring] Moved chip-specific parameters into separate files ([#237](https://github.com/stlink-org/stlink/pull/237), [#1129](https://github.com/stlink-org/stlink/pull/1129))
- [refactoring] General maintenance for code structure ([#903](https://github.com/stlink-org/stlink/pull/903), [#1090](https://github.com/stlink-org/stlink/pull/1090), [#1199](https://github.com/stlink-org/stlink/pull/1199), [#1212](https://github.com/stlink-org/stlink/pull/1212), [#1216](https://github.com/stlink-org/stlink/pull/1216), [#1228](https://github.com/stlink-org/stlink/pull/1228))
- Added instructions for bug-reports and feature-requests to contribution guidelines ([#906](https://github.com/stlink-org/stlink/pull/906))
- Added travis CI configuration for macOS 10.14 to maintain capability for 32-bit compilation (commit [#f5ada94](https://github.com/stlink-org/stlink/commit/f5ada9474cdb87ff37de0d4eb9e75622b5870646))
- [refactoring] Clean code with unified variable type ([#909](https://github.com/stlink-org/stlink/pull/909), commit [#5e85fd0](https://github.com/stlink-org/stlink/commit/5e85fd063908f89499180c28fe5e9ba74868b272))
- Updated description of chip id 0x0457 to L01x/L02x ([#1143](https://github.com/stlink-org/stlink/pull/1143), [#1144](https://github.com/stlink-org/stlink/pull/1144))
- [doc] Human-readable flash_type in chip-id files ([#1155](https://github.com/stlink-org/stlink/pull/1155), commit [#1745bf5](https://github.com/stlink-org/stlink/commit/1745bf5193c4d3186d4f6fde59cc86e9bad6e61b))
- Dropped execute bits from source code files ([#1167](https://github.com/stlink-org/stlink/pull/1167))
- Use proper Markdown headers for supported MCUs ([#1168](https://github.com/stlink-org/stlink/pull/1168))
- Ability to flash F7 devices when in dual-bank mode ([#1174](https://github.com/stlink-org/stlink/pull/1174))
- Removed redundant array ([#1178](https://github.com/stlink-org/stlink/pull/1178))
- Updated chip config files from the library structs ([#1181](https://github.com/stlink-org/stlink/pull/1181))
- [doc] Corrected file path in tutorial ([#1186](https://github.com/stlink-org/stlink/pull/1186))
- Improved chipid checks and printouts ([#1188](https://github.com/stlink-org/stlink/pull/1188))
- [refactoring] Sourcefile 'common.c' ([#1218](https://github.com/stlink-org/stlink/pull/1218), [#1220](https://github.com/stlink-org/stlink/pull/1220))
- [STM32H735]: Set hardware breakpoints for external bus ([#1219](https://github.com/stlink-org/stlink/pull/1219))
- Set C standard through cmake variables ([#1221](https://github.com/stlink-org/stlink/pull/1221))
- [doc] Added make install to the macOS compiling instructions ([#1259](https://github.com/stlink-org/stlink/pull/1259))
- [doc] Linux Install from code Documentation improvement ([#1263](https://github.com/stlink-org/stlink/pull/1263), commit [#43498de](https://github.com/stlink-org/stlink/commit/43498dedf651260ef34197e512d35e3ad7142401))
- End of support for macOS ([#1269](https://github.com/stlink-org/stlink/pull/1269), [#1296](https://github.com/stlink-org/stlink/pull/1296), commit [#61ff09e](https://github.com/stlink-org/stlink/commit/61ff09e5274d46a46ae58bc4ffe44fe90a887ea6))
- [doc] Added device ID for GD32F303VET6 ([#1288](https://github.com/stlink-org/stlink/pull/1288))
- [doc] Fixed broken links ([#1312](https://github.com/stlink-org/stlink/pull/1312))
- [doc] Updated package source link for Arch Linux ([#1318](https://github.com/stlink-org/stlink/pull/1318))
- CMake: Avoid hard-wired /usr/local/share ([#1325](https://github.com/stlink-org/stlink/pull/1325))
- [doc] Provide access to the UART via virtual com port ([#1334](https://github.com/stlink-org/stlink/pull/1334), commit [#32e8dcc](https://github.com/stlink-org/stlink/commit/32e8dcc8b5dbed7b6412e7838ea1b2c41f0247fd))
Fixes:
- Fixed some flashing issues on STM32L0 ([#681](https://github.com/stlink-org/stlink/pull/681), [#1203](https://github.com/stlink-org/stlink/pull/1203), [#1225](https://github.com/stlink-org/stlink/pull/1225), [#1253](https://github.com/stlink-org/stlink/pull/1253), [#1289](https://github.com/stlink-org/stlink/pull/1289), [#1330](https://github.com/stlink-org/stlink/pull/1330))
- cmake: Install shared libraries in proper directories ([#1098](https://github.com/stlink-org/stlink/pull/1098), [#1138](https://github.com/stlink-org/stlink/pull/1138), [#1154](https://github.com/stlink-org/stlink/pull/1154))
- cmake: Install shared libraries in proper directories ([#1142](https://github.com/stlink-org/stlink/pull/1142))
- Fixed clearance of the H7 dual bank flag ([#1146](https://github.com/stlink-org/stlink/pull/1146), [#1147](https://github.com/stlink-org/stlink/pull/1147), [#1342](https://github.com/stlink-org/stlink/pull/1342))
- Fix for 'libusb_devices were leaked' when no ST-LINK programmer was found ([#1150](https://github.com/stlink-org/stlink/pull/1150))
- Set of fixes and improvements ([#1153](https://github.com/stlink-org/stlink/pull/1153), [#1154](https://github.com/stlink-org/stlink/pull/1154))
- Removed limit check for WRITEMEM_32BIT ([#1157](https://github.com/stlink-org/stlink/pull/1157))
- Fixed get_stm32l0_flash_base address for STM32L152RE ([#1161](https://github.com/stlink-org/stlink/pull/1161), [#1162](https://github.com/stlink-org/stlink/pull/1162))
- Fixed segfault if chip was not found in chip config files ([#1138](https://github.com/stlink-org/stlink/pull/1138), [#1163](https://github.com/stlink-org/stlink/pull/1163), [#1165](https://github.com/stlink-org/stlink/pull/1165), [#1166](https://github.com/stlink-org/stlink/pull/1166), [#1170](https://github.com/stlink-org/stlink/pull/1170))
- Fixed parsing hex numbers in chip config files ([#1156](https://github.com/stlink-org/stlink/pull/1156), commit [#1d301a5](https://github.com/stlink-org/stlink/commit/1d301a5498433900250fe2a8c0e10dfb7f44d7a4))
- Fixed parsing hex numbers in chip config files ([#1169](https://github.com/stlink-org/stlink/pull/1169))
- Corrected flash_pagesize to use hex format ([#1172](https://github.com/stlink-org/stlink/pull/1172))
- Fixed compilation for MSVC ([#1176](https://github.com/stlink-org/stlink/pull/1176))
- Fixed few warnings for msvc about type conversion with possible lost data ([#1179](https://github.com/stlink-org/stlink/pull/1179))
- st-flash and other utilities search for chip files in the wrong directory ([#1180](https://github.com/stlink-org/stlink/pull/1180), commit [#c8fc656](https://github.com/stlink-org/stlink/commit/c8fc6561fead79ad49c09d82bab864745086792c))
- Fixed broken build on 32 bit systems ([#985](https://github.com/stlink-org/stlink/pull/985), [#1175](https://github.com/stlink-org/stlink/pull/1175), commit [#c8fc656](https://github.com/stlink-org/stlink/commit/c8fc6561fead79ad49c09d82bab864745086792c))
- Define 'SSIZE_MAX' if not defined ([#1183](https://github.com/stlink-org/stlink/pull/1183))
- [STM32G031G8]: BOOT_LOCK is not possible to change on option bytes address 0x1FFF7870 ([#1194](https://github.com/stlink-org/stlink/pull/1194))
- Fixed compliation for OpenBSD 7.0 ([#1202](https://github.com/stlink-org/stlink/pull/1202))
- Included 'SSIZE_MAX' from 'limits.h' in 'src/common.c' ([#1207](https://github.com/stlink-org/stlink/pull/1207))
- Fix for libusb_kernel_driver_active & error handling for st.st_size () ([#1210](https://github.com/stlink-org/stlink/pull/1210), [#1211](https://github.com/stlink-org/stlink/pull/1211), [#1214](https://github.com/stlink-org/stlink/pull/1214))
- General fixes and improvements ([#1240](https://github.com/stlink-org/stlink/pull/1240), [#1242](https://github.com/stlink-org/stlink/pull/1242), [#1290](https://github.com/stlink-org/stlink/pull/1290), [#1291](https://github.com/stlink-org/stlink/pull/1291), [#1295](https://github.com/stlink-org/stlink/pull/1295))
- Fixes for project compilation ([#1241](https://github.com/stlink-org/stlink/pull/1241), [#1271](https://github.com/stlink-org/stlink/pull/1271), [#1283](https://github.com/stlink-org/stlink/pull/1283), [#1286](https://github.com/stlink-org/stlink/pull/1286),commit [#f93adb9](https://github.com/stlink-org/stlink/commit/f93adb92f2e4ecf05a9361cb723c98693586929d))
- st-trace: Fixed clock issues ([#1248](https://github.com/stlink-org/stlink/pull/1248), [#1251](https://github.com/stlink-org/stlink/pull/1251), [#1252](https://github.com/stlink-org/stlink/pull/1252))
- Fixed compilation with gcc-12 ([#1257](https://github.com/stlink-org/stlink/pull/1257), [#1267](https://github.com/stlink-org/stlink/pull/1267))
- Fixed flash regs addr for STM32L152RET6 in common_flash.c ([#1265](https://github.com/stlink-org/stlink/pull/1265))
- Fixed flash, dbgmcu and rcc registers for STM32L1 ([#1266](https://github.com/stlink-org/stlink/pull/1266))
- Fixed incorrect SRAM size for L496x and L4A6x ([#1268](https://github.com/stlink-org/stlink/pull/1268), commit [#ff81148](https://github.com/stlink-org/stlink/commit/ff8114895a9fc32cae6a9374e58eac6256d68183))
- Fixed st-trace reconnect on Windows ([#1272](https://github.com/stlink-org/stlink/pull/1272), [#1292](https://github.com/stlink-org/stlink/pull/1292))
- [compilation] Corrected path to stlink/chips subdirectory ([#1276](https://github.com/stlink-org/stlink/pull/1276), [#1279](https://github.com/stlink-org/stlink/pull/1279))
- [compilation] Fixed GUI compilation failure on OpenBSD i386 ([#1284](https://github.com/stlink-org/stlink/pull/1284))
- [STM32U5x5]: Last bytes are not written (flashed) when len(<binary>)%16 <= 8 ([#1303](https://github.com/stlink-org/stlink/pull/1303), [#1315](https://github.com/stlink-org/stlink/pull/1315))
- [STM32WLE]: Erase flash fails on second page ([#1305](https://github.com/stlink-org/stlink/pull/1305), commit [#7dcb130](https://github.com/stlink-org/stlink/commit/7dcb1302d8b91b2217c4ce50cb255aa8e78ab001))
- Fixed unbounded write and check return values of sscanf ([#1306](https://github.com/stlink-org/stlink/pull/1306))
- Added null check for return value of stlink_chipid_get_params() ([#1307](https://github.com/stlink-org/stlink/pull/1307))
- Fixed warning in a few *.cmake files ([#1309](https://github.com/stlink-org/stlink/pull/1309))
- Fixed support for STM32U5 chips ([#1320](https://github.com/stlink-org/stlink/pull/1320), [#1355](https://github.com/stlink-org/stlink/pull/1355))
- [STM32G0B1]: Erase fails starting page 64 ([#1321](https://github.com/stlink-org/stlink/pull/1321))
- Notification "unknown option -- u" in tool st-util ([#1326](https://github.com/stlink-org/stlink/pull/1326), [#1327](https://github.com/stlink-org/stlink/pull/1327))
- Do not crash when the STLink chip returns a voltage factor of zero ([#1343](https://github.com/stlink-org/stlink/pull/1343))
- stlink-gui: failed to allocate 139988352155568 bytes ([#1356](https://github.com/stlink-org/stlink/pull/1356))
- [STM32U575RGT6]: Verification failed at offset 43008 ([#1362](https://github.com/stlink-org/stlink/pull/1362), commit [#0145bae](https://github.com/stlink-org/stlink/commit/0145baeb2e3bac31bf9d3cbd0dab38d70618d46b))
# v1.7.0
Release date: 2021-04-25
@ -10,7 +116,7 @@ Features:
- Extended set of cmd line arguments for st-info and st-util ([#332](https://github.com/stlink-org/stlink/pull/332), [#990](https://github.com/stlink-org/stlink/pull/990), [#1091](https://github.com/stlink-org/stlink/pull/1091), [#1114](https://github.com/stlink-org/stlink/pull/1114))
- Extended support for STM32H7 & rework of software reset ([#532](https://github.com/stlink-org/stlink/pull/532), [#801](https://github.com/stlink-org/stlink/pull/801), [#868](https://github.com/stlink-org/stlink/pull/868), [#1008](https://github.com/stlink-org/stlink/pull/1008), [#1059](https://github.com/stlink-org/stlink/pull/1059), [#1063](https://github.com/stlink-org/stlink/pull/1063), [#1071](https://github.com/stlink-org/stlink/pull/1071))
- Added support for STM32H742/743/753 ([#671](https://github.com/stlink-org/stlink/pull/671), [#793](https://github.com/stlink-org/stlink/pull/793), [#823](https://github.com/stlink-org/stlink/pull/823), [#998](https://github.com/stlink-org/stlink/pull/998), [#1052](https://github.com/stlink-org/stlink/pull/1052))
- Added support for STM32H742/743/753 ([#671](https://github.com/stlink-org/stlink/pull/671), [#793](https://github.com/stlink-org/stlink/pull/793), [#823](https://github.com/stlink-org/stlink/pull/823), [#998](https://github.com/stlink-org/stlink/pull/998), [#1052](https://github.com/stlink-org/stlink/pull/1052), [#1184](https://github.com/stlink-org/stlink/pull/1184), [#1324](https://github.com/stlink-org/stlink/pull/1324))
- Official support for STLINK-V3 programmers (commit [#5e0a502](https://github.com/stlink-org/stlink/commit/5e0a502df812495bfa96fa9116a19f1306152b17), [#820](https://github.com/stlink-org/stlink/pull/820), [#1022](https://github.com/stlink-org/stlink/pull/1022), [#1025](https://github.com/stlink-org/stlink/pull/1025))
- Added preliminary support for STM32L5x2 ([#904](https://github.com/stlink-org/stlink/pull/904), [#999](https://github.com/stlink-org/stlink/pull/999))
- Option bytes on the STM32F767 ZIT6 Nucleo-144 ([#968](https://github.com/stlink-org/stlink/pull/968), [#997](https://github.com/stlink-org/stlink/pull/997))
@ -29,7 +135,7 @@ Updates & changes:
- [doc] Updated documentation on target resetting ([#261](https://github.com/stlink-org/stlink/pull/261), [#533](https://github.com/stlink-org/stlink/pull/533), [#1107](https://github.com/stlink-org/stlink/pull/1107))
- [doc] Added note on `(gdb) run` command (commit [#03793d4](https://github.com/stlink-org/stlink/commit/03793d42b6078344a9ef8ad55f1d5d0fc19e486e), [#267](https://github.com/stlink-org/stlink/pull/267))
- [doc] `st-flash --reset` parameter (one solution for #356) ([#642](https://github.com/stlink-org/stlink/pull/642))
- [refactoring] General maintenance ([#864](https://github.com/stlink-org/stlink/pull/864), [#976](https://github.com/stlink-org/stlink/pull/976), [#978](https://github.com/stlink-org/stlink/pull/978))
- [refactoring] General maintenance ([#864](https://github.com/stlink-org/stlink/pull/864). [#978](https://github.com/stlink-org/stlink/pull/978))
- Imported debian pkg-settings ([#986](https://github.com/stlink-org/stlink/pull/986))
- Add support for FreeBSD's `libusb` reimplementation ([#992](https://github.com/stlink-org/stlink/pull/992), [#993](https://github.com/stlink-org/stlink/pull/993))
- [doc] Added explanation about STM32F103 fake chips (commit [#a66557a](https://github.com/stlink-org/stlink/commit/a66557a102d48e69feb0a9746e8e42c4baf31fe2), [#1024](https://github.com/stlink-org/stlink/pull/1024))
@ -40,16 +146,17 @@ Updates & changes:
Fixes:
- Improvements and fixes of the flash loaders, unification of the reset function ([#244](https://github.com/stlink-org/stlink/pull/244), [#382](https://github.com/stlink-org/stlink/pull/382), [#705](https://github.com/stlink-org/stlink/pull/705), [#980](https://github.com/stlink-org/stlink/pull/980), [#995](https://github.com/stlink-org/stlink/pull/995), [#1008](https://github.com/stlink-org/stlink/pull/1008), [#1115](https://github.com/stlink-org/stlink/pull/1115), [#1117](https://github.com/stlink-org/stlink/pull/1117), [#1122](https://github.com/stlink-org/stlink/pull/1122), [#1124](https://github.com/stlink-org/stlink/pull/1124))
- Flash loader rework ([#356](https://github.com/stlink-org/stlink/pull/356), [#556](https://github.com/stlink-org/stlink/pull/556), [#593](https://github.com/stlink-org/stlink/pull/593), [#597](https://github.com/stlink-org/stlink/pull/597), [#607](https://github.com/stlink-org/stlink/pull/607), [#612](https://github.com/stlink-org/stlink/pull/612), [#638](https://github.com/stlink-org/stlink/pull/638), [#661](https://github.com/stlink-org/stlink/pull/661), [#690](https://github.com/stlink-org/stlink/pull/690), [#807](https://github.com/stlink-org/stlink/pull/807), [#817](https://github.com/stlink-org/stlink/pull/817), [#818](https://github.com/stlink-org/stlink/pull/818), [#854](https://github.com/stlink-org/stlink/pull/854), [#868](https://github.com/stlink-org/stlink/pull/868), [#967](https://github.com/stlink-org/stlink/pull/967), [#979](https://github.com/stlink-org/stlink/pull/979), [#1008](https://github.com/stlink-org/stlink/pull/1008), [#1043](https://github.com/stlink-org/stlink/pull/1043), [#1054](https://github.com/stlink-org/stlink/pull/1054), [#1092](https://github.com/stlink-org/stlink/pull/1092), [#1105](https://github.com/stlink-org/stlink/pull/1105), [#1113](https://github.com/stlink-org/stlink/pull/1113))
- Improvements and fixes of the flash loaders, unification of the reset function ([#244](https://github.com/stlink-org/stlink/pull/244), [#382](https://github.com/stlink-org/stlink/pull/382), [#705](https://github.com/stlink-org/stlink/pull/705), [#724](https://github.com/stlink-org/stlink/pull/724), [#980](https://github.com/stlink-org/stlink/pull/980), [#995](https://github.com/stlink-org/stlink/pull/995), [#1008](https://github.com/stlink-org/stlink/pull/1008), [#1115](https://github.com/stlink-org/stlink/pull/1115), [#1117](https://github.com/stlink-org/stlink/pull/1117), [#1122](https://github.com/stlink-org/stlink/pull/1122), [#1124](https://github.com/stlink-org/stlink/pull/1124))
- Flash loader rework ([#356](https://github.com/stlink-org/stlink/pull/356), [#556](https://github.com/stlink-org/stlink/pull/556), [#593](https://github.com/stlink-org/stlink/pull/593), [#597](https://github.com/stlink-org/stlink/pull/597), [#607](https://github.com/stlink-org/stlink/pull/607), [#612](https://github.com/stlink-org/stlink/pull/612), [#638](https://github.com/stlink-org/stlink/pull/638), [#661](https://github.com/stlink-org/stlink/pull/661), [#690](https://github.com/stlink-org/stlink/pull/690), [#724](https://github.com/stlink-org/stlink/pull/724), [#807](https://github.com/stlink-org/stlink/pull/807), [#817](https://github.com/stlink-org/stlink/pull/817), [#818](https://github.com/stlink-org/stlink/pull/818), [#854](https://github.com/stlink-org/stlink/pull/854), [#868](https://github.com/stlink-org/stlink/pull/868), [#967](https://github.com/stlink-org/stlink/pull/967), [#979](https://github.com/stlink-org/stlink/pull/979), [#1008](https://github.com/stlink-org/stlink/pull/1008), [#1043](https://github.com/stlink-org/stlink/pull/1043), [#1054](https://github.com/stlink-org/stlink/pull/1054), [#1092](https://github.com/stlink-org/stlink/pull/1092), [#1105](https://github.com/stlink-org/stlink/pull/1105), [#1113](https://github.com/stlink-org/stlink/pull/1113))
- Fixed old DFU serial number for STLINK programmers ([#417](https://github.com/stlink-org/stlink/pull/417), [#494](https://github.com/stlink-org/stlink/pull/494), [#1106](https://github.com/stlink-org/stlink/pull/1106), [#1121](https://github.com/stlink-org/stlink/pull/1121))
- Use vl flashloader for all STM32F1 series ([#769](https://github.com/stlink-org/stlink/pull/769), [#1041](https://github.com/stlink-org/stlink/pull/1041), [#1044](https://github.com/stlink-org/stlink/pull/1044))
- Improvements for Chip_ID read ([#620](https://github.com/stlink-org/stlink/pull/620), [#1008](https://github.com/stlink-org/stlink/pull/1008), [#1120](https://github.com/stlink-org/stlink/pull/1120))
- Use vl flashloader for all STM32F1 series ([#724](https://github.com/stlink-org/stlink/pull/724), [#769](https://github.com/stlink-org/stlink/pull/769), [#1041](https://github.com/stlink-org/stlink/pull/1041), [#1044](https://github.com/stlink-org/stlink/pull/1044))
- [regression] Changed timeout on flash write ([#787](https://github.com/stlink-org/stlink/pull/787), [#981](https://github.com/stlink-org/stlink/pull/981), [#987](https://github.com/stlink-org/stlink/pull/987))
- cmake compile failure with external `CMAKE_MODULE_PATH` set ([#962](https://github.com/stlink-org/stlink/pull/962))
- doc/man: Fixed installation directory ([#970](https://github.com/stlink-org/stlink/pull/970))
- Fixed installation path for desktop-file and icons ([#972](https://github.com/stlink-org/stlink/pull/972))
- Fix for static linking of `libssp` ([#973](https://github.com/stlink-org/stlink/pull/973), [#974](https://github.com/stlink-org/stlink/pull/974))
- [regression] Fixed wrong formatting for library install path ([#978](https://github.com/stlink-org/stlink/pull/978), [#1089](https://github.com/stlink-org/stlink/pull/1089))
- [regression] Fixed wrong formatting for library install path ([#978](https://github.com/stlink-org/stlink/pull/978), [#1089](https://github.com/stlink-org/stlink/pull/1089), [#1277](https://github.com/stlink-org/stlink/pull/1277))
- Fixed installation of header files needed for compiling with `libstlink.so.1.6.1` (commit [#31b1fa1](https://github.com/stlink-org/stlink/commit/31b1fa16201521e2aaf464576f2f169981abede0), [#982](https://github.com/stlink-org/stlink/pull/982))
- Fixed `connect under reset` for `st-flash` and `st-util` ([#983](https://github.com/stlink-org/stlink/pull/983))
- Fix for `mmap() size_t overflow` in `st-flash` ([#988](https://github.com/stlink-org/stlink/pull/988), [#989](https://github.com/stlink-org/stlink/pull/989))
@ -67,7 +174,7 @@ Fixes:
- [doc] Corrected spelling mistake in bug report template ([#1103](https://github.com/stlink-org/stlink/pull/1103))
- Fixed STM32WB55 reading DEBUG IDCODE from the wrong address ([#1100](https://github.com/stlink-org/stlink/pull/1100), [#1101](https://github.com/stlink-org/stlink/pull/1101))
- Applied missing changes to tests ([#1119](https://github.com/stlink-org/stlink/pull/1119))
- Improvements for Chip_ID read ([#1008](https://github.com/stlink-org/stlink/pull/1008), [#1120](https://github.com/stlink-org/stlink/pull/1120))
- Fixed reading of chip ID on Cortex-M0+ core ([#1017](https://github.com/stlink-org/stlink/pull/1017), [#1125](https://github.com/stlink-org/stlink/pull/1125), [#1126](https://github.com/stlink-org/stlink/pull/1126), [#1133](https://github.com/stlink-org/stlink/pull/1133))
# v1.6.1
@ -122,7 +229,7 @@ Updates & changes:
- [doc] `st-flash --flash=n[k][m]` command line option to override device model ([#902](https://github.com/stlink-org/stlink/pull/902))
- [refactoring] Improved cmake build process ([#912](https://github.com/stlink-org/stlink/pull/912))
- Set up a `libusb` log level accordingly to verbosity ([#894](https://github.com/stlink-org/stlink/pull/894)
- [compatibility] Updated `libusb` to v1.0.23 ([#895](https://github.com/stlink-org/stlink/pull/895, [#1089](https://github.com/stlink-org/stlink/pull/1089))
- [compatibility] Updated `libusb` to v1.0.23 ([#895](https://github.com/stlink-org/stlink/pull/895)
- Updated compiling doc & version support ([#896](https://github.com/stlink-org/stlink/pull/896), [#897](https://github.com/stlink-org/stlink/pull/897), [#899](https://github.com/stlink-org/stlink/pull/899))
- Version requirements & pkg-maintainer
- Fixed install paths in build script
@ -165,7 +272,6 @@ Fixes:
- Set static link for `libssp` (stack-smashing protection) ([#960](https://github.com/stlink-org/stlink/pull/960), [#961](https://github.com/stlink-org/stlink/pull/961))
- Fixed udev rules installing to wrong directory ([#966](https://github.com/stlink-org/stlink/pull/966))
- Fixed formatting for options display in `st-flash` & `st-info` (commits [#c783d0e](https://github.com/stlink-org/stlink/commit/c783d0e777ccc83a7a8be26a4f4d3414e0478560) and [#562cd24](https://github.com/stlink-org/stlink/commit/562cd2496e696dbd22950925866aac662d81ee5f))
- Fixed reading of chip ID on Cortex-M0+ core ([#1125](https://github.com/stlink-org/stlink/pull/1125), [#1126](https://github.com/stlink-org/stlink/pull/1126), [#1133](https://github.com/stlink-org/stlink/pull/1133))
# v1.6.0
@ -245,7 +351,7 @@ Updates and fixes:
- Debian packaging, `cmake` and `README.md` fixes ([#682](https://github.com/stlink-org/stlink/pull/682), [#683](https://github.com/stlink-org/stlink/pull/683))
- Disabled static library installation by default ([#702](https://github.com/stlink-org/stlink/pull/702))
- Fix for `libusb` deprecation ([#703](https://github.com/stlink-org/stlink/pull/703), [#704](https://github.com/stlink-org/stlink/pull/704))
- Renamed `STLINK_CHIPID_STM32_L4R9` to `STLINK_CHIPID_STM32_L4RX` ([#706](https://github.com/stlink-org/stlink/pull/706))
- Renamed `STLINK_CHIPID_STM32_L4R9` to `STLINK_CHIPID_STM32_L4Rx` ([#706](https://github.com/stlink-org/stlink/pull/706))
- [regression] stlink installation under Linux (Debian 9) is broken since #695 ([#700](https://github.com/stlink-org/stlink/pull/700), [#701](https://github.com/stlink-org/stlink/pull/701), [#707](https://github.com/stlink-org/stlink/pull/707))
- Fixed flash memory map for STM32F72xxx target ([#711](https://github.com/stlink-org/stlink/pull/711))
- Proper flash page size calculation for STM32F412xx target ([#721](https://github.com/stlink-org/stlink/pull/721))

Wyświetl plik

@ -2,24 +2,82 @@
# General cmake settings
###
cmake_minimum_required(VERSION 3.4.2)
cmake_minimum_required(VERSION 3.10.2)
cmake_policy(SET CMP0042 NEW)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
###
# General project settings
#
# Default cmake directories:
#
# | Target Type | GNUInstallDirs Variable | Built-In Default |
# | --- | --- | --- |
# | RUNTIME | ${CMAKE_INSTALL_BINDIR} | bin |
# | LIBRARY | ${CMAKE_INSTALL_LIBDIR} | lib |
# | ARCHIVE | ${CMAKE_INSTALL_LIBDIR} | lib |
# | PRIVATE_HEADER | ${CMAKE_INSTALL_INCLUDEDIR} | include |
# | PUBLIC_HEADER | ${CMAKE_INSTALL_INCLUDEDIR} | include |
# | FILE_SET (type HEADERS) | ${CMAKE_INSTALL_INCLUDEDIR} | include |
#
# | TYPE Argument | GNUInstallDirs Variable | Built-In Default |
# | --- | --- | --- |
# | BIN | ${CMAKE_INSTALL_BINDIR} | bin |
# | SBIN | ${CMAKE_INSTALL_SBINDIR} | sbin |
# | LIB | ${CMAKE_INSTALL_LIBDIR} | lib |
# | INCLUDE | ${CMAKE_INSTALL_INCLUDEDIR} | include |
# | SYSCONF | ${CMAKE_INSTALL_SYSCONFDIR} | etc |
# | SHAREDSTATE | ${CMAKE_INSTALL_SHARESTATEDIR} | com |
# | LOCALSTATE | ${CMAKE_INSTALL_LOCALSTATEDIR} | var |
# | RUNSTATE | ${CMAKE_INSTALL_RUNSTATEDIR} | <LOCALSTATE dir>/run |
# | DATA | ${CMAKE_INSTALL_DATADIR} | <DATAROOT dir> |
# | INFO | ${CMAKE_INSTALL_INFODIR} | <DATAROOT dir>/info |
# | LOCALE | ${CMAKE_INSTALL_LOCALEDIR} | <DATAROOT dir>/locale |
# | MAN | ${CMAKE_INSTALL_MANDIR} | <DATAROOT dir>/man |
# | DOC | ${CMAKE_INSTALL_DOCDIR} | <DATAROOT dir>/doc |
#
# ${CMAKE_BINARY_DIR}
# This is the full path to the top level of the current CMake build tree.
# For an in-source build, this would be the same as CMAKE_SOURCE_DIR.
#
# ${CMAKE_SOURCE_DIR}
# This is the full path to the top level of the current CMake source tree.
# For an in-source build, this would be the same as CMAKE_BINARY_DIR.
#
# ${CMAKE_CURRENT_BINARY_DIR}
# The path to the binary directory currently being processed.
# This is the full path to the build directory that is currently being processed by cmake.
# Each directory added by add_subdirectory() will create a binary directory in the build tree,
# and as it is being processed this variable will be set.
# For in-source builds this is the current source directory being processed.
#
# ${CMAKE_CURRENT_SOURCE_DIR}
# The path to the source directory currently being processed.
# This is the full path to the source directory that is currently being processed by cmake.
#
###
###
# General Project Settings
###
project(stlink C)
set(PROJECT_DESCRIPTION "Open source version of the STMicroelectronics ST-LINK Tools")
include(${CMAKE_MODULE_PATH}/get_version.cmake) # Determine project version
include(GNUInstallDirs) # Define GNU standard installation directories
## Determine project version
include(${CMAKE_MODULE_PATH}/get_version.cmake)
# Define install directory for st-link shared files
cmake_host_system_information(RESULT OS_NAME QUERY OS_NAME)
message(STATUS "Checking for OS_NAME: ${OS_NAME}")
## Set C build flags
if (NOT MSVC)
@ -30,7 +88,7 @@ else ()
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
endif ()
endif()
###
@ -50,10 +108,10 @@ if (_stack_chk_fail_exists)
set(SSP_LIB -static ssp)
else ()
set(SSP_LIB ssp)
endif ()
endif()
else ()
set(SSP_LIB "")
endif ()
endif()
CHECK_INCLUDE_FILE(sys/mman.h STLINK_HAVE_SYS_MMAN_H)
if (STLINK_HAVE_SYS_MMAN_H)
@ -68,12 +126,17 @@ endif()
CHECK_INCLUDE_FILE(unistd.h STLINK_HAVE_UNISTD_H)
if (STLINK_HAVE_UNISTD_H)
add_definitions(-DSTLINK_HAVE_UNISTD_H)
endif ()
endif()
CHECK_INCLUDE_FILE(dirent.h STLINK_HAVE_DIRENT_H)
if (STLINK_HAVE_DIRENT_H)
add_definitions(-DSTLINK_HAVE_DIRENT_H)
endif()
if (MSVC)
# Use string.h rather than strings.h and disable annoying warnings
add_definitions(-DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS /wd4710)
endif ()
endif()
###
@ -88,10 +151,17 @@ include_directories(${PROJECT_BINARY_DIR}/inc) # contains version.h
include_directories(src)
include_directories(src/st-flash)
include_directories(src/st-info)
include_directories(src/st-trace)
include_directories(src/st-util)
include_directories(src/stlink-lib)
## Set installation directory for header files
if (WIN32)
set(STLINK_INCLUDE_PATH ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Main include install directory")
else ()
set(STLINK_INCLUDE_PATH ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} CACHE PATH "Main include install directory")
endif()
## Subordinate CMakeLists for version config & header installation
add_subdirectory(inc)
@ -100,27 +170,40 @@ add_subdirectory(inc)
set(STLINK_HEADERS
inc/backend.h
inc/stlink.h
src/stlink-lib/commands.h
src/stlink-lib/libusb_settings.h
src/stlink-lib/reg.h
inc/stm32.h
inc/stm32flash.h
src/stlink-lib/calculate.h
src/stlink-lib/chipid.h
src/stlink-lib/commands.h
src/stlink-lib/common_flash.h
src/stlink-lib/flash_loader.h
src/stlink-lib/helper.h
src/stlink-lib/libusb_settings.h
src/stlink-lib/lib_md5.h
src/stlink-lib/logging.h
src/stlink-lib/map_file.h
src/stlink-lib/md5.h
src/stlink-lib/option_bytes.h
src/stlink-lib/register.h
src/stlink-lib/sg.h
src/stlink-lib/usb.h
src/stlink-lib/helper.h
)
set(STLINK_SOURCE
src/common.c
src/stlink-lib/calculate.c
src/stlink-lib/chipid.c
src/stlink-lib/common_flash.c
src/stlink-lib/common.c
src/stlink-lib/flash_loader.c
src/stlink-lib/helper.c
src/stlink-lib/logging.c
src/stlink-lib/map_file.c
src/stlink-lib/lib_md5.c
src/stlink-lib/md5.c
src/stlink-lib/option_bytes.c
src/stlink-lib/read_write.c
src/stlink-lib/sg.c
src/stlink-lib/usb.c
src/stlink-lib/helper.c
)
if (WIN32)
@ -132,7 +215,7 @@ if (WIN32)
# Add drop-in replacement for unistd.h to sources
include_directories(src/win32/unistd)
set(STLINK_HEADERS "${STLINK_HEADERS};src/win32/unistd/unistd.h")
endif ()
endif()
if (NOT STLINK_HAVE_SYS_MMAN_H)
include_directories(src/win32/mmap)
@ -144,20 +227,18 @@ if (WIN32)
set(STLINK_SOURCE "${STLINK_SOURCE};src/win32/sys_time.c")
set(STLINK_HEADERS "${STLINK_HEADERS};src/win32/sys_time.h")
endif()
endif ()
endif()
## Include test execution for test-targets for target Debug
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
include(CTest)
endif ()
endif()
###
# Libraries
###
set(STLINK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Main library install directory")
# Set the environment variable LD_LIBRARY_PATH to point to /usr/local/lib (per default).
execute_process(COMMAND bash -c "export LD_LIBRARY_PATH=${CMAKE_INSTALL_LIBDIR}")
@ -183,18 +264,25 @@ set_target_properties(${STLINK_LIB_SHARED} PROPERTIES
)
# Link shared library
if (APPLE) # ... with Apple macOS libraries
find_library(ObjC objc)
find_library(CoreFoundation CoreFoundation)
find_library(IOKit IOKit)
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB} ${ObjC} ${CoreFoundation} ${IOKit})
elseif (WIN32) # ... with Windows libraries
if (WIN32) # ... with Windows libraries
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB} wsock32 ws2_32)
else ()
target_link_libraries(${STLINK_LIB_SHARED} ${LIBUSB_LIBRARY} ${SSP_LIB})
endif ()
endif()
install(TARGETS ${STLINK_LIB_SHARED} DESTINATION ${STLINK_LIBRARY_PATH})
install(TARGETS ${STLINK_LIB_SHARED}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# Copy libusb DLL-library to binary output folder
if (WIN32)
file(COPY ${LIBUSB_WIN_OUTPUT_FOLDER}/MinGW64/dll/libusb-1.0.dll
DESTINATION ${CMAKE_INSTALL_BINDIR})
file(COPY ${LIBUSB_WIN_OUTPUT_FOLDER}/MinGW64/dll/libusb-1.0.dll
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})
endif()
###
@ -222,18 +310,13 @@ set_target_properties(${STLINK_LIB_STATIC} PROPERTIES
)
# Link static library
if (APPLE) # ... with Apple macOS libraries
find_library(ObjC objc)
find_library(CoreFoundation CoreFoundation)
find_library(IOKit IOKit)
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} ${SSP_LIB} ${ObjC} ${CoreFoundation} ${IOKit})
elseif (WIN32) # ... with Windows libraries
if (WIN32) # ... with Windows libraries
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} ${SSP_LIB} wsock32 ws2_32)
else ()
target_link_libraries(${STLINK_LIB_STATIC} ${LIBUSB_LIBRARY} ${SSP_LIB})
endif ()
endif()
install(TARGETS ${STLINK_LIB_STATIC} ARCHIVE DESTINATION ${STLINK_LIBRARY_PATH})
install(TARGETS ${STLINK_LIB_STATIC} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
###
@ -250,14 +333,14 @@ if (MSVC)
include_directories(src/win32/getopt)
set(ST-UTIL_SOURCES "${ST-UTIL_SOURCES};src/win32/getopt/getopt.c")
set(ST-TRACE_SOURCES "${ST-TRACE_SOURCES};src/win32/getopt/getopt.c")
endif ()
endif()
add_executable(st-flash ${ST-FLASH_SOURCES})
add_executable(st-info ${ST-INFO_SOURCES})
add_executable(st-util ${ST-UTIL_SOURCES})
add_executable(st-trace ${ST-TRACE_SOURCES})
if (WIN32 OR APPLE)
if (WIN32)
target_link_libraries(st-flash ${STLINK_LIB_STATIC} ${SSP_LIB})
target_link_libraries(st-info ${STLINK_LIB_STATIC} ${SSP_LIB})
target_link_libraries(st-util ${STLINK_LIB_STATIC} ${SSP_LIB})
@ -267,7 +350,7 @@ else ()
target_link_libraries(st-info ${STLINK_LIB_SHARED} ${SSP_LIB})
target_link_libraries(st-util ${STLINK_LIB_SHARED} ${SSP_LIB})
target_link_libraries(st-trace ${STLINK_LIB_SHARED} ${SSP_LIB})
endif ()
endif()
install(TARGETS st-flash DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS st-info DESTINATION ${CMAKE_INSTALL_BINDIR})
@ -288,20 +371,30 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(STLINK_UDEV_RULES_DIR "/lib/udev/rules.d" CACHE PATH "udev rules directory")
file(GLOB RULES_FILES ${CMAKE_SOURCE_DIR}/config/udev/rules.d/*.rules)
install(FILES ${RULES_FILES} DESTINATION ${STLINK_UDEV_RULES_DIR})
endif ()
endif()
###
# Additional build tasks
###
add_subdirectory(src/stlink-gui) # contains subordinate CMakeLists to build GUI
add_subdirectory(tests) # contains subordinate CMakeLists to build test executables
add_subdirectory(cmake/packaging) # contains subordinate CMakeLists to build packages
# MCU configuration files
if (WIN32)
set(CMAKE_CHIPS_DIR ${CMAKE_INSTALL_PREFIX}/config/chips)
else ()
set(CMAKE_CHIPS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/chips)
endif ()
add_definitions( -DSTLINK_CHIPS_DIR="${CMAKE_CHIPS_DIR}" )
file(GLOB CHIP_FILES ${CMAKE_SOURCE_DIR}/config/chips/*.chip)
install(FILES ${CHIP_FILES} DESTINATION ${CMAKE_CHIPS_DIR})
# Documentation / manpages
option(STLINK_GENERATE_MANPAGES "Generate manpages with pandoc" OFF)
add_subdirectory(doc/man) # contains subordinate CMakeLists to generate manpages
add_subdirectory(src/stlink-gui) # contains subordinate CMakeLists to build GUI
add_subdirectory(tests) # contains subordinate CMakeLists to build test executables
add_subdirectory(cmake/packaging) # contains subordinate CMakeLists to build packages
###
# Uninstall target
@ -317,4 +410,4 @@ if (NOT TARGET uninstall)
uninstall COMMAND ${CMAKE_COMMAND}
-P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake
)
endif ()
endif()

Wyświetl plik

@ -12,6 +12,17 @@ We love your input! We want to make contributing to this project as easy and tra
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
Report a bug by [opening a new issue]() with one of the available templates. It's that easy!
**NOTE: In order to offer sufficient and the best possible support, please read and follow the instructions below before submitting a ticket:**
1) If using a ST-Link-v2 programmer: Convince yourself that it is recognised as an USB device by your computer, thus reporting device and manufacturer ID. Use a diagnostic tool to probe for enumerated USB devices, e.g [`lsusb -v`](https://linux.die.net/man/8/lsusb) on unix-based systems.
2) **Use the [ST-Link firmware upgrade tool](https://www.st.com/en/development-tools/stsw-link007.html) based on Java to read out the current firmware version and update to the latest available version. This also works for _non-genuine_ ST programmers and boards.**
3) Try to make sure you have a working toolchain before starting to build.
4) **Update to the _latest_ release version or maybe even use the `develop` branch.**
5) Search for your problem in the available open issues, _before_ opening a new ticket.
6) Make sure to **use the available issue templates** to submit a bug-report or a feature-request. **Do not replace the prepared text, edit the placeholders instead. _Describe_ your problem.**
7) Avoid to add new comments to closed issues unless they confirm a solution already available.
8) Don't comment on tickets which do not specifically address your device or hardware - open a new ticket instead.
9) Consider if you can help to solve other issues (e.g. you have the same hardware)
## Coding conventions
To read code written by other contributors can turn out to be quite demanding - a variable which seems to self-explaining, may appear cryptic to other readers. If you plan to contribute, please take this into account and feel encouraged to help others understand your code. In order to help you along, we have composed some contribution guidelines for this project. As this project already has a history you may find parts in the codebase that do not seem to comply with these guidelines, but we are trying to improve continuosly. However we can do even better, if every contributor considers the following points:

Wyświetl plik

@ -1,15 +1,13 @@
# Open source version of the STMicroelectronics STlink Tools
# Open source version of the STMicroelectronics STLINK Tools
[![BSD licensed](https://img.shields.io/badge/license-BSD-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/stlink-org/stlink.svg)](https://github.com/stlink-org/stlink/releases/latest)
[![Downloads](https://img.shields.io/github/downloads/stlink-org/stlink/total)](https://github.com/stlink-org/stlink/releases/latest)
![GitHub commits](https://img.shields.io/github/commits-since/stlink-org/stlink/v1.7.0/develop)
![GitHub commits](https://img.shields.io/github/commits-since/stlink-org/stlink/v1.8.0/develop)
![GitHub activity](https://img.shields.io/github/commit-activity/m/stlink-org/stlink)
![GitHub contributors](https://img.shields.io/github/contributors/stlink-org/stlink)
[![CodeQL](https://github.com/stlink-org/stlink/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/stlink-org/stlink/actions/workflows/codeql-analysis.yml)
[![C/C++ CI](https://github.com/stlink-org/stlink/actions/workflows/c-cpp.yml/badge.svg?branch=testing)](https://github.com/stlink-org/stlink/actions/workflows/c-cpp.yml)
[![Linux Status](https://img.shields.io/travis/stlink-org/stlink/master?env=BADGE=linux&label=linux)](https://travis-ci.org/stlink-org/stlink)
[![macOS Status](https://img.shields.io/travis/stlink-org/stlink/master?env=BADGE=osx&label=osx)](https://travis-ci.org/stlink-org/stlink)
Recent new features and bugfixes can be found in the [Changelog](CHANGELOG.md) of this software project.
@ -22,7 +20,7 @@ The stlink library and tools are licensed under the **[BSD-3 License](LICENSE.md
stlink is an open source toolset to program and debug STM32 devices and boards manufactured by STMicroelectronics.
It supports several so called STLINK programmer boards (and clones thereof) which use a microcontroller chip to translate commands from USB to JTAG/SWD. There are four generations available on the market which are _all_ supported by this toolset:
- **STLINK/V1** _[obsolete as of 21-11-2019, continued support by this toolset] \*)_
- **STLINK/V1** _[obsolete as of 21-11-2019, continued support by this toolset]_
- transport layer: SCSI passthru commands over USB
- stand-alone programmer
- on-board on STM32VL Discovery boards
@ -38,8 +36,6 @@ It supports several so called STLINK programmer boards (and clones thereof) whic
- stand-alone programmer (STLINK-V3SET, STLINK-V3MINI, STLINK-V3MODS)
- on-board on some STM32 Nucleo boards (STLINK-V3E)
_\*)_ **Note: Support for the STLINK/V1 on macOS is limited to 10.14 - 10.15. Due to the deprecation and removal of macOS Kernel Extensions (KEXT) there will be no support for this programmer on macOS 11 or any later version.**
On the user level there is no difference in handling or operation between these different revisions.
The STlink toolset includes:
@ -53,9 +49,9 @@ The STlink toolset includes:
## Supported operating systems and hardware combinations
Currently known working combinations of programmers and targets are listed in [devices_boards.md](doc/devices_boards.md).
Currently known working MCU targets are listed in [supported_devices.md](doc/supported_devices.md).
Supported operating systems are listed in [version_support.md](doc/version_support.md).
A list of supported operating can be found in [version_support.md](doc/version_support.md).
## Tutorial & HOWTO
@ -70,16 +66,7 @@ Please ensure to select the correct version for your system (i686 or x86_64). Th
Alternatively one may compile and install from source as described in our [compiling manual](doc/compiling.md#Windows).
**macOS**:
We recommend to install from:
- [homebrew](https://formulae.brew.sh/formula/stlink) or
- [MacPorts](https://ports.macports.org/port/stlink)
Alternatively one can compile and install from source as described in our [compiling manual](doc/compiling.md#macOS).
**Linux**:
**Linux / Unix**:
We recommend to install `stlink-tools` from the package repository of the used distribution:
@ -87,16 +74,17 @@ We recommend to install `stlink-tools` from the package repository of the used d
- Debian Linux: [(Link)](https://github.com/stlink-org/stlink/releases)
- Ubuntu Linux: [(Link)](https://github.com/stlink-org/stlink/releases)
- Arch Linux: [(Link)](https://www.archlinux.org/packages/community/x86_64/stlink)
- Arch Linux: [(Link)](https://archlinux.org/packages/extra/x86_64/stlink/)
- Alpine Linux: [(Link)](https://pkgs.alpinelinux.org/packages?name=stlink)
- Fedora: [(Link)](https://src.fedoraproject.org/rpms/stlink)
- Gentoo Linux: [(Link)](https://packages.gentoo.org/packages/dev-embedded/stlink)
**Other Operating Systems**:
- RedHat/CentOS 8: Users can install from [EPEL repository](https://src.fedoraproject.org/rpms/stlink/branch/epel8)
- FreeBSD: Users can install from [freshports](https://www.freshports.org/devel/stlink)
**macOS**:
**Support for macOS has been dropped with v1.8.0.**
Please use v1.7.0 instead, **but note that this version is no longer maintained and supported!**
## 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](doc/compiling.md).
@ -110,3 +98,9 @@ When there is no executable available for your platform or you need the latest (
- Please start new forks from the develop branch, as pull requests will go into this branch as well.
Please also refer to our [Contribution Guidelines](CONTRIBUTING.md).
## User Reviews
*I hope it's not to out of topic, but I've been so frustrated with AVR related things on OpenBSD, the fact that stlink built out of the box without needing to touch anything was so relieving. Literally made my whole weekend better!
I take it's thanks to @Crest and also to the stlink-org team (@Nightwalker-87 and @xor-gate it seems) to have made a software that's not unfriendly to the "fringe" OSes.
Thank you <3"* - nbonfils, 11.12.2021

Wyświetl plik

@ -7,7 +7,9 @@ The following versions of the stlink toolset are currently being supported.<br /
| Version | Supported |
| ------- | ------------------ |
| develop | :white_check_mark: |
| 1.6.x | :white_check_mark: |
| 1.8.0 | :white_check_mark: |
| 1.7.0 | :x: |
| 1.6.x | :x: |
| 1.5.x | :x: |
| 1.4.0 | :x: |
| 1.3.x | :x: |

Wyświetl plik

@ -10,24 +10,7 @@
include(FindPackageHandleStandardArgs)
if (APPLE) # macOS
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr /usr/local /opt
PATH_SUFFIXES libusb-1.0
)
set(LIBUSB_NAME libusb-1.0.a)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS /usr /usr/local /opt
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libusb DEFAULT_MSG LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARY)
if (NOT LIBUSB_FOUND)
message(FATAL_ERROR "No libusb library found on your system! Install libusb-1.0 from Homebrew or MacPorts")
endif ()
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is integrated into the system
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is integrated into the system
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr/include
@ -41,7 +24,24 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # FreeBSD; libusb is
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARY)
if (NOT LIBUSB_FOUND)
message(FATAL_ERROR "Expected libusb library not found on your system! Verify your system integrity.")
endif ()
endif()
elseif (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") # OpenBSD; libusb-1.0 is available from ports
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr/local/include
PATH_SUFFIXES libusb-1.0
)
set(LIBUSB_NAME usb-1.0)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS /usr/local
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libusb DEFAULT_MSG LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARY)
if (NOT LIBUSB_FOUND)
message(FATAL_ERROR "No libusb-1.0 library found on your system! Install libusb-1.0 from ports or packages.")
endif()
elseif (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)) # Windows or MinGW-toolchain on Debian
# MinGW/MSYS/MSVC: 64-bit or 32-bit?
@ -51,41 +51,19 @@ elseif (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)) # Windows or MinGW-to
else ()
message(STATUS "=== Building for Windows (i686) ===")
set(ARCH 32)
endif ()
endif()
if (WIN32 AND NOT EXISTS "/etc/debian_version") # Skip this for Debian...
FIND_PATH(
LIBUSB_INCLUDE_DIR NAMES libusb.h
HINTS /usr /usr/local /opt
PATH_SUFFIXES libusb-1.0
)
if (MINGW OR MSYS)
set(LIBUSB_NAME usb-1.0)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MinGW${ARCH}/static
)
else (MSVC)
set(LIBUSB_NAME libusb-1.0.lib)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
HINTS ${LIBUSB_WIN_OUTPUT_FOLDER}/MS${ARCH}/dll
)
endif ()
endif ()
if (NOT LIBUSB_FOUND)
# Preparations for installing libusb library
set(LIBUSB_WIN_VERSION 1.0.23) # set libusb version
set(LIBUSB_WIN_VERSION 1.0.25) # set libusb version
set(LIBUSB_WIN_ARCHIVE libusb-${LIBUSB_WIN_VERSION}.7z)
if (WIN32 AND NOT EXISTS "/etc/debian_version") # ... on native Windows systems
set(LIBUSB_WIN_ARCHIVE_PATH ${CMAKE_BINARY_DIR}/${LIBUSB_WIN_ARCHIVE})
set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_BINARY_DIR}/3rdparty/libusb-${LIBUSB_WIN_VERSION})
else (EXISTS "/etc/debian_version" AND MINGW) # ... only for cross-building on Debian
elseif (EXISTS "/etc/debian_version" AND MINGW) # ... only for cross-building on Debian
set(LIBUSB_WIN_ARCHIVE_PATH ${CMAKE_SOURCE_DIR}/build-mingw-${ARCH}/${LIBUSB_WIN_ARCHIVE})
set(LIBUSB_WIN_OUTPUT_FOLDER ${CMAKE_SOURCE_DIR}/build-mingw-${ARCH}/3rdparty/libusb-${LIBUSB_WIN_VERSION})
endif ()
endif()
# Get libusb package
if (EXISTS ${LIBUSB_WIN_ARCHIVE_PATH}) # ... should the package be already there (for whatever reason)
@ -94,9 +72,9 @@ elseif (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)) # Windows or MinGW-to
message(STATUS "downloading libusb ${LIBUSB_WIN_VERSION}")
file(DOWNLOAD
https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-${LIBUSB_WIN_VERSION}/libusb-${LIBUSB_WIN_VERSION}.7z/download
${LIBUSB_WIN_ARCHIVE_PATH} EXPECTED_MD5 cf3d38d2ff053ef343d10c0b8b0950c2
${LIBUSB_WIN_ARCHIVE_PATH} EXPECTED_MD5 aabe177bde869bfad34278335eaf8955
)
endif ()
endif()
file(MAKE_DIRECTORY ${LIBUSB_WIN_OUTPUT_FOLDER})
@ -124,7 +102,7 @@ elseif (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)) # Windows or MinGW-to
NO_CMAKE_FIND_ROOT_PATH
)
else (MSVC)
elseif (MSVC)
set(LIBUSB_NAME libusb-1.0.lib)
find_library(
LIBUSB_LIBRARY NAMES ${LIBUSB_NAME}
@ -132,9 +110,9 @@ elseif (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)) # Windows or MinGW-to
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH
)
endif ()
endif()
message(STATUS "Missing libusb library has been installed")
endif ()
endif()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libusb DEFAULT_MSG LIBUSB_LIBRARY LIBUSB_INCLUDE_DIR)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARY)
@ -154,5 +132,5 @@ else ()
if (NOT LIBUSB_FOUND)
message(FATAL_ERROR "libusb library not found on your system! Install libusb 1.0.x from your package repository.")
endif ()
endif ()
endif()
endif()

Wyświetl plik

@ -14,14 +14,13 @@ function(add_cflag_if_supported flag)
if (C_SUPPORTS${flagclean})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
endif ()
endif()
endfunction()
add_cflag_if_supported("-std=gnu11")
add_cflag_if_supported("-std=gnu18")
add_cflag_if_supported("-Wall")
add_cflag_if_supported("-Wextra")
add_cflag_if_supported("-Wshadow")
add_cflag_if_supported("-O")
add_cflag_if_supported("-D_FORTIFY_SOURCE=2")
add_cflag_if_supported("-fstrict-aliasing")
add_cflag_if_supported("-Wundef")
@ -39,16 +38,14 @@ add_cflag_if_supported("-Wimplicit-function-declaration")
##
if (NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
add_cflag_if_supported("-Wredundant-decls")
endif ()
endif()
if (NOT (WIN32 OR (EXISTS "/etc/debian_version" AND MINGW)))
add_cflag_if_supported("-fPIC")
endif ()
endif()
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
add_cflag_if_supported("-ggdb")
add_cflag_if_supported("-O0")
else ()
add_cflag_if_supported("-O2")
add_cflag_if_supported("-Werror")
endif ()
endif()

Wyświetl plik

@ -28,7 +28,7 @@ if (GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
)
if (res EQUAL 1)
set(PROJECT_VERSION "${PROJECT_VERSION}-dirty")
endif ()
endif()
# Strip a leading v off of the version as proceeding code expects just the version numbering.
string(REGEX REPLACE "^v" "" PROJECT_VERSION ${PROJECT_VERSION})
@ -53,14 +53,14 @@ if (GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
# ...the version does not match with git-version string
if (NOT __version_str STREQUAL __version_file)
message(STATUS "Rewrite ${PROJECT_SOURCE_DIR}/.version with ${__version_str}!")
endif ()
endif()
else (NOT EXISTS "${PROJECT_SOURCE_DIR}/.version")
elseif (NOT EXISTS "${PROJECT_SOURCE_DIR}/.version")
# No local .version file found: Create a new one...
file(WRITE "${PROJECT_SOURCE_DIR}/.version" ${__version_str})
endif ()
endif()
message(STATUS "stlink version: ${PROJECT_VERSION}")
message(STATUS "Major ${PROJECT_VERSION_MAJOR} Minor ${PROJECT_VERSION_MINOR} Patch ${PROJECT_VERSION_PATCH}")
@ -68,13 +68,13 @@ if (GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
else (len EQUAL 3)
message(STATUS "Failed to extract version parts from \"${PROJECT_VERSION}\"")
set(ERROR_FLAG "1")
endif (len EQUAL 3)
endif(len EQUAL 3)
else (GIT_DESCRIBE_RESULT EQUAL 0)
message(WARNING "git describe failed: ${GIT_DESCRIBE_ERROR}")
set(ERROR_FLAG "1")
endif(GIT_DESCRIBE_RESULT EQUAL 0)
endif ()
endif()
##
# Failure to read version via git
@ -101,9 +101,9 @@ if (NOT GIT_FOUND OR NOT EXISTS "${PROJECT_SOURCE_DIR}/.git" OR ERROR_FLAG EQUAL
set(__detect_version 1)
else ()
message(STATUS "Fail to extract version parts from \"${PROJECT_VERSION}\"")
endif ()
endif()
else (EXISTS ${PROJECT_SOURCE_DIR}/.version)
message(STATUS "File \"${PROJECT_SOURCE_DIR}/.version\" does not exist.")
message(FATAL_ERROR "Unable to determine project version")
endif ()
endif ()
endif()
endif()

Wyświetl plik

@ -45,7 +45,7 @@ include(CMakeParseArguments)
if (NOT EXISTS ${PANDOC_EXECUTABLE})
find_program(PANDOC_EXECUTABLE pandoc)
mark_as_advanced(PANDOC_EXECUTABLE)
endif ()
endif()
###############################################################################
# Based on code from UseLATEX
@ -133,7 +133,7 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
Please delete them:
$ rm -r CMakeFiles/ CmakeCache.txt
")
ENDif ()
endif()
endfunction()
# This builds a document
@ -171,7 +171,7 @@ function(add_document target_name)
if (NOT PANDOC_EXECUTABLE)
message(WARNING "Pandoc not found. Install Pandoc (http://johnmacfarlane.net/pandoc/) or set cache variable PANDOC_EXECUTABLE.")
return()
endif ()
endif()
set(options EXPORT_ARCHIVE NO_EXPORT_PRODUCT EXPORT_PDF DIRECT_TEX_TO_PDF VERBOSE)
set(oneValueArgs PRODUCT_DIRECTORY)
@ -188,29 +188,29 @@ function(add_document target_name)
if (NOT "${target_extension}" STREQUAL ".tex" AND NOT "${target_extension}" STREQUAL ".latex")
# if (NOT "${target_extension}" STREQUAL ".tex")
MESSAGE(FATAL_ERROR "Target '${target_name}': Cannot use 'EXPORT_PDF' for target of type '${target_extension}': target type must be '.tex' or '.latex'")
endif ()
endif ()
endif()
endif()
if (${ADD_DOCUMENT_DIRECT_TEX_TO_PDF})
list(LENGTH ${ADD_DOCUMENT_SOURCES} SOURCE_LEN)
if (SOURCE_LEN GREATER 1)
MESSAGE(FATAL_ERROR "Target '${target_name}': Only one source can be specified when using the 'DIRECT_TEX_TO_PDF' option")
endif ()
endif()
# set(ADD_DOCUMENT_SOURCES, list(GET ${ADD_DOCUMENT_SOURCES} 1))
pandocology_get_file_stemname(source_stemname ${ADD_DOCUMENT_SOURCES})
pandocology_get_file_extension(source_extension ${ADD_DOCUMENT_SOURCES})
if (NOT "${source_extension}" STREQUAL ".tex" AND NOT "${source_extension}" STREQUAL ".latex")
MESSAGE(FATAL_ERROR "Target '${target_name}': Cannot use 'DIRECT_TEX_TO_PDF' for source of type '${source_extension}': source type must be '.tex' or '.latex'")
endif ()
endif()
SET(check_target ${source_stemname}.pdf)
IF (NOT ${check_target} STREQUAL ${target_name})
MESSAGE(FATAL_ERROR "Target '${target_name}': Must use target name of '${check_target}' if using 'DIRECT_TEX_TO_PDF'")
endif ()
endif ()
endif()
endif()
## set up output directory
if ("${ADD_DOCUMENT_PRODUCT_DIRECTORY}" STREQUAL "")
set(ADD_DOCUMENT_PRODUCT_DIRECTORY "product")
endif ()
endif()
get_filename_component(product_directory ${CMAKE_BINARY_DIR}/${ADD_DOCUMENT_PRODUCT_DIRECTORY} ABSOLUTE)
# get_filename_component(absolute_product_path ${product_directory}/${target_name} ABSOLUTE)
@ -232,7 +232,7 @@ function(add_document target_name)
pandocology_add_input_dir(${CMAKE_CURRENT_SOURCE_DIR}/${resource_dir} ${CMAKE_CURRENT_BINARY_DIR} build_resources)
if (${ADD_DOCUMENT_EXPORT_ARCHIVE})
pandocology_add_input_dir(${CMAKE_CURRENT_SOURCE_DIR}/${resource_dir} ${product_directory} exported_resources)
endif ()
endif()
endforeach()
## primary command
@ -255,7 +255,7 @@ function(add_document target_name)
# we produce the target in the source directory, in case other build targets require it as a source
COMMAND latexmk -gg -halt-on-error -interaction=nonstopmode -file-line-error -pdf ${build_sources} 2>/dev/null >/dev/null || (grep --no-messages -A8 ".*:[0-9]*:.*" ${target_stemname}.log && false)
)
endif ()
endif()
add_to_make_clean(${CMAKE_CURRENT_BINARY_DIR}/${target_name})
else()
add_custom_command(
@ -267,7 +267,7 @@ function(add_document target_name)
COMMAND ${PANDOC_EXECUTABLE} ${build_sources} ${ADD_DOCUMENT_PANDOC_DIRECTIVES} -o ${target_name}
)
add_to_make_clean(${CMAKE_CURRENT_BINARY_DIR}/${target_name})
endif ()
endif()
## figure out what all is going to be produced by this build set, and set
## those as dependencies of the primary target
@ -275,14 +275,14 @@ function(add_document target_name)
set(primary_target_dependencies ${primary_target_dependencies} ${CMAKE_CURRENT_BINARY_DIR}/${target_name})
if (NOT ${ADD_DOCUMENT_NO_EXPORT_PRODUCT})
set(primary_target_dependencies ${primary_target_dependencies} ${product_directory}/${target_name})
endif ()
endif()
if (${ADD_DOCUMENT_EXPORT_PDF})
set(primary_target_dependencies ${primary_target_dependencies} ${CMAKE_CURRENT_BINARY_DIR}/${target_stemname}.pdf)
set(primary_target_dependencies ${primary_target_dependencies} ${product_directory}/${target_stemname}.pdf)
endif ()
endif()
if (${ADD_DOCUMENT_EXPORT_ARCHIVE})
set(primary_target_dependencies ${primary_target_dependencies} ${product_directory}/${target_stemname}.tbz)
endif ()
endif()
## primary target
# # target cannot have same (absolute name) as dependencies:
@ -326,7 +326,7 @@ function(add_document target_name)
)
add_to_make_clean(${CMAKE_CURRENT_BINARY_DIR}/${target_stemname}.pdf)
add_to_make_clean(${product_directory}/${target_stemname}.pdf)
endif ()
endif()
## copy products
if (NOT ${ADD_DOCUMENT_NO_EXPORT_PRODUCT})
@ -336,7 +336,7 @@ function(add_document target_name)
COMMAND ${CMAKE_COMMAND} -E copy ${target_name} ${product_directory}
)
add_to_make_clean(${product_directory}/${target_name})
endif ()
endif()
## copy resources
if (${ADD_DOCUMENT_EXPORT_ARCHIVE})
@ -359,7 +359,7 @@ function(add_document target_name)
# ALL
# DEPENDS ${product_directory}/${target_stemname}.tbz
# )
endif ()
endif()
endfunction(add_document)

Wyświetl plik

@ -15,17 +15,12 @@ set(CPACK_SET_DESTDIR "ON")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/dist)
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/dist")
if (APPLE) # macOS
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-macosx-amd64")
set(CPACK_INSTALL_PREFIX "")
elseif (WIN32 AND (NOT EXISTS "/etc/debian_version")) # Windows
if (WIN32 AND (NOT EXISTS "/etc/debian_version")) # Windows
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-win32")
set(CPACK_INSTALL_PREFIX "")
elseif (WIN32) # Windows cross-build on Debian/Ubuntu
elseif (WIN32) # Windows cross-build on Debian/Ubuntu
set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-${TOOLCHAIN_PREFIX}")
set(CPACK_INSTALL_PREFIX "")
@ -53,7 +48,7 @@ elseif (EXISTS "/etc/debian_version" AND NOT EXISTS WIN32) # Package-build is av
set(CPACK_DEBIAN_PACKAGE_RELEASE "1")
# CPACK_DEBIAN_PACKAGE_ARCHITECTURE --> Default: Output of dpkg --print-architecture
set(CPACK_DEBIAN_PACKAGE_DEPENDS "pkg-config, build-essential, debhelper (>=9), cmake (>= 3.4.2), libusb-1.0-0-dev (>= 1.0.20)")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "pkg-config, build-essential, debhelper (>=9), cmake (>= 3.13.0), libusb-1.0-0-dev (>= 1.0.22)")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Nightwalker-87 <stlink-org>")
# CPACK_DEBIAN_PACKAGE_DESCRIPTION --> Default: CPACK_DEBIAN_PACKAGE_DESCRIPTION (as it is set)
# CPACK_DEBIAN_PACKAGE_SECTION --> Default: devel
@ -106,7 +101,7 @@ elseif (EXISTS "/etc/debian_version" AND NOT EXISTS WIN32) # Package-build is av
else ()
# No package configuration on other platforms ...
endif ()
endif()
###

Wyświetl plik

@ -1,3 +1,15 @@
stlink (1.8.0) unstable; urgency=medium
* Release v1.8.0
-- Nightwalker-87 <stlink-org> Thu, 01 Feb 2024 00:00:00 +0100
stlink (1.7.0) unstable; urgency=medium
* Release v1.7.0
-- Nightwalker-87 <stlink-org> Sun, 25 Apr 2021 00:00:00 +0100
stlink (1.6.1) unstable; urgency=medium
* Initial cpack-based package release for Debian/Ubuntu

Wyświetl plik

@ -1,8 +1,8 @@
Source: stlink
Priority: optional
Maintainer: Nightwalker-87 <stlink-org>
Build-Depends: cmake, dh-cmake, debhelper (>= 9), libusb-1.0-0-dev, libgtk-3-dev
Standards-Version: 4.5.0
Build-Depends: cmake (>= 3.13.0), dh-cmake, debhelper (>= 9), libusb-1.0-0-dev (>= 1.0.22), libgtk-3-dev (>= 3.22.30)
Standards-Version: 4.6.2
Rules-Requires-Root: no
Section: electronics
Homepage: https://github.com/stlink-org/stlink

Wyświetl plik

@ -2,7 +2,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: stlink
Upstream-Contact: Nightwalker-87 <stlink-org>
Source: https://github.com/stlink-org/stlink
Files-Excluded: stlinkv1_macos_driver
Files: *
Copyright: 2011-2020 stlink-org

Wyświetl plik

@ -1,2 +1,8 @@
* Thu Feb 01 2024 Nightwalker-87 <stlink-org> - 1.8.0
- Release v1.8.0
* Sun Apr 25 2021 Nightwalker-87 <stlink-org> - 1.7.0
- Release v1.7.0
* Mon Jun 01 2020 Nightwalker-87 <stlink-org> - 1.6.1
- Initial cpack-based RPM package release

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32C011xx device
#
dev_type STM32C011xx
ref_manual_id 0490
chip_id 0x443 // STM32_CHIPID_C011xx
flash_type C0
flash_size_reg 0x1fff75a0
flash_pagesize 0x800 // 2 KB
sram_size 0x1800 // 6 KB
bootrom_base 0x1fff0000
bootrom_size 0x1800 // 6 KB
option_base 0x1fff7800 // STM32_C0_OPTION_BYTES_BASE
option_size 0x80 // 128 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32C031xx device
#
dev_type STM32C031xx
ref_manual_id 0490
chip_id 0x453 // STM32_CHIPID_C031xx
flash_type C0
flash_size_reg 0x1fff75a0
flash_pagesize 0x800 // 2 KB
sram_size 0x3000 // 12 KB
bootrom_base 0x1fff0000
bootrom_size 0x1800 // 6 KB
option_base 0x1fff7800 // STM32_C0_OPTION_BYTES_BASE
option_size 0x80 // 128 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F03x device
#
dev_type STM32F03x
ref_manual_id 0091
chip_id 0x444 // STM32_CHIPID_F0xx_SMALL
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x400 // 1 KB
sram_size 0x1000 // 4 KB
bootrom_base 0x1fffec00
bootrom_size 0xc00 // 3 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F04x device
#
dev_type STM32F04x
ref_manual_id 0091
chip_id 0x445 // STM32_CHIPID_F04
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x400 // 1 KB
sram_size 0x1800 // 6 KB
bootrom_base 0x1fffec00
bootrom_size 0xc00 // 3 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F05x device
#
dev_type STM32F05x
ref_manual_id 0091
chip_id 0x440 // STM32_CHIPID_F0
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x400 // 1 KB
sram_size 0x2000 // 8 KB
bootrom_base 0x1fffec00
bootrom_size 0xc00 // 3 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F07x device
#
dev_type STM32F07x
ref_manual_id 0091
chip_id 0x448 // STM32_CHIPID_F0_CAN
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0x4000 // 16 KB
bootrom_base 0x1fffc800
bootrom_size 0x3000 // 12 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags none

Wyświetl plik

@ -0,0 +1,15 @@
# Chip-ID file for STM32F09x device
#
dev_type STM32F09x
ref_manual_id 0091
chip_id 0x442 // STM32_CHIPID_F09x
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0x8000 // 32 KB
bootrom_base 0x1fffd800
bootrom_size 0x2000 // 8 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags none

Wyświetl plik

@ -0,0 +1,15 @@
# Chip-ID file for STM32F1xx Connectivity Line device (F105 / F107)
#
dev_type STM32F1xx_CL
ref_manual_id 0008
chip_id 0x418 // STM32_CHIPID_F1_CONN
flash_type F0_F1_F3
flash_size_reg 0x1ffff7e0
flash_pagesize 0x800 // 2 KB
sram_size 0x10000 // 64 KB
bootrom_base 0x1fffb000
bootrom_size 0x4800 // 18 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F1xx high density device
#
dev_type F1xx_HD
ref_manual_id 0008
chip_id 0x414 // STM32_CHIPID_F1_HD
flash_type F0_F1_F3
flash_size_reg 0x1ffff7e0
flash_pagesize 0x800 // 2 KB
sram_size 0x10000 // 64 KB
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F1 low density device
#
dev_type STM32F1xx_LD
ref_manual_id 0008
chip_id 0x412 // STM32_CHIPID_F1_LD
flash_type F0_F1_F3
flash_size_reg 0x1ffff7e0
flash_pagesize 0x400 // 1 KB
sram_size 0x2800 // 10 KB
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F1xx medium density device
#
dev_type STM32F1xx_MD
ref_manual_id 0008
chip_id 0x410 // STM32_CHIPID_F1_MD
flash_type F0_F1_F3
flash_size_reg 0x1ffff7e0
flash_pagesize 0x400 // 1 KB
sram_size 0x5000 // 20 KB
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F1xx high density Value Line device
#
dev_type STM32F1xx_VL_HD
ref_manual_id 0041
chip_id 0x428 // STM32_CHIPID_F1_VL_HD
flash_type F0_F1_F3
flash_size_reg 0x1ffff7e0
flash_pagesize 0x800 // 2 KB
sram_size 0x8000 // 32 KB
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STMF1xx Value Line medium & low density device
#
dev_type STM32F1xx_VL_MD_LD
ref_manual_id 0041
chip_id 0x420 // STM32_CHIPID_F1_VL_MD_LD
flash_type F0_F1_F3
flash_size_reg 0x1ffff7e0
flash_pagesize 0x400 // 1 KB
sram_size 0x2000 // 8 KB /* 0x1000 for low density devices */
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F1xx XL density device
#
dev_type STM32F1xx_XLD
ref_manual_id 0008
chip_id 0x430 // STM32_CHIPID_F1_XLD
flash_type F1_XL
flash_size_reg 0x1ffff7e0
flash_pagesize 0x800 // 2 KB
sram_size 0x18000 // 96 KB
bootrom_base 0x1fffe000
bootrom_size 0x1800 // 6 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F2xx device
#
dev_type STM32F2xx
ref_manual_id 0033
chip_id 0x411 // STM32_CHIPID_F2
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x20000 // 128 KB
sram_size 0x20000 // 128 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x1fffc000 // STM32_F2_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F3xx device (F301x6/8, F302x6x8, F318x8)
#
dev_type STM32F301_F302_F318
ref_manual_id 0365 // also RM0366
chip_id 0x439 // STM32_CHIPID_F3xx_SMALL
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0xa000 // 40 KB
bootrom_base 0x1fffd800
bootrom_size 0x2000 // 8 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F3xx device (F302xBxC, F303xB/C, F358)
#
dev_type STM32F302_F303_358
ref_manual_id 0365 // also RM0316
chip_id 0x422 // STM32_CHIPID_F3
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0xa000 // 40 KB
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F3xx high density device (F302xD/E, F303xD/E, F398xE)
#
dev_type STM32F302_F303_F398_HD
ref_manual_id 0365 // also RM0316 (Rev 5)
chip_id 0x446 // STM32_CHIPID_F303_HD
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0x10000 // 64 KB
bootrom_base 0x1fffd800
bootrom_size 0x2000 // 8 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F3xx device (F303x6/8, F328, F334)
#
dev_type STM32F303_F328_F334
ref_manual_id 0364 // also RM0316
chip_id 0x438 // STM32_CHIPID_F334
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0x3000 // 12 KB
bootrom_base 0x1fffd800
bootrom_size 0x2000 // 8 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F37x device
#
dev_type STM32F37x
ref_manual_id 0313
chip_id 0x432 // STM32_CHIPID_F37x
flash_type F0_F1_F3
flash_size_reg 0x1ffff7cc
flash_pagesize 0x800 // 2 KB
sram_size 0xa000 // 40 KB
bootrom_base 0x1ffff000
bootrom_size 0x800 // 2 KB
option_base 0x1ffff800 // STM32_F0_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F401xB/xC device
#
dev_type STM32F401xB_xC
ref_manual_id 0368
chip_id 0x423 // STM32_CHIPID_F4_LP
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x10000 // 64 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F401xD/xE device
#
dev_type STM32F401xD_xE
ref_manual_id 0368
chip_id 0x433 // STM32_CHIPID_F4_DE
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x18000 // 96 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x40023C14 // STM32_F4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F410 device
#
dev_type STM32F410
ref_manual_id 0401
chip_id 0x458 // STM32_CHIPID_F410
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x8000 // 32 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F411xC/xE device
#
dev_type STM32F411xC_xE
ref_manual_id 0383
chip_id 0x431 // STM32_CHIPID_F411xx
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x20000 // 128 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F412 device
#
dev_type STM32F412
ref_manual_id 0402
chip_id 0x441 // STM32_CHIPID_F412
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x40000 // 256 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F413 / STM32F423 device
#
dev_type STM32F413_F423
ref_manual_id 0430 // RM0430 (Rev 2)
chip_id 0x463 // STM32_CHIPID_F413
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x50000 // 320 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F42x / STM32F43x device
#
dev_type STM32F42x_F43x
ref_manual_id 0090 // RM0090 (Rev. 2)
chip_id 0x419 // STM32_CHIPID_F4_HD
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x40000 // 256 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F446 device
#
dev_type STM32F446
ref_manual_id 0390
chip_id 0x421 // STM32_CHIPID_F446
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x20000 // 128 KB
sram_size 0x20000 // 128 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x40023c14 // STM32_F4_OPTION_BYTES_BASE
option_size 0x10 // 16 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F46x / STM32F47x device
#
dev_type STM32F46x_F47x
ref_manual_id 0090 // RM0090 (Rev. 2)
chip_id 0x434 // STM32_CHIPID_F4_DSI
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x40000 // 256 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F4x5 / STM32F4x7 device
#
dev_type STM32F4x5_F4x7
ref_manual_id 0090 // RM0090 (Rev. 2)
chip_id 0x413 // STM32_CHIPID_F4
flash_type F2_F4
flash_size_reg 0x1fff7a22
flash_pagesize 0x4000 // 16 KB
sram_size 0x30000 // 192 KB
bootrom_base 0x1fff0000
bootrom_size 0x7800 // 30 KB
option_base 0x40023c14 // STM32_F4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F72x / STM32F73x device
#
dev_type STM32F72x_F73x
ref_manual_id 0431
chip_id 0x452 // STM32_CHIPID_F72xxx
flash_type F7
flash_size_reg 0x1ff07a22
flash_pagesize 0x800 // 2 KB
sram_size 0x40000 // 256 KB
bootrom_base 0x100000
bootrom_size 0xedc0 // 59.4375 KB
option_base 0x1fff0000 // STM32_F7_OPTION_BYTES_BASE
option_size 0x20 // 32 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F74x / STM32F75x device
#
dev_type STM32F74x_F75x
ref_manual_id 0385
chip_id 0x449 // STM32_CHIPID_F7
flash_type F7
flash_size_reg 0x1ff0f442
flash_pagesize 0x800 // 2 KB
sram_size 0x50000 // 320 KB
bootrom_base 0x100000
bootrom_size 0xedc0 // 59.4375 KB
option_base 0x1fff0000 // STM32_F7_OPTION_BYTES_BASE
option_size 0x20 // 32 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32F76x / STM32F77x device
#
dev_type STM32F76x_F77x
ref_manual_id 0410
chip_id 0x451 // STM32_CHIPID_F76xxx
flash_type F7
flash_size_reg 0x1ff0f442
flash_pagesize 0x800 // 2 KB
sram_size 0x80000 // 512 KB
bootrom_base 0x200000
bootrom_size 0xedc0 // 59.4375 KB
option_base 0x1fff0000 // STM32_F7_OPTION_BYTES_BASE /* Used for reading back option bytes, writing uses FLASH_F7_OPTCR and FLASH_F7_OPTCR1 */
option_size 0x20 // 32 B
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G030 / STM32G031 / STM32G041 device
#
dev_type STM32G03x_G04x
ref_manual_id 0444 // also RM454
chip_id 0x466 // STM32_CHIPID_G0_CAT1
flash_type G0
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x2000 // 8 KB
bootrom_base 0x1fff0000
bootrom_size 0x2000 // 8 KB
option_base 0x1fff7800 // STM32_G0_OPTION_BYTES_BASE
option_size 0x80 // 128 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G05x / STM32G06x device
#
dev_type STM32G05x_G06x
ref_manual_id 0444 // also RM454
chip_id 0x456 // STM32_CHIPID_G0_CAT4
flash_type G0
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x4800 // 18 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800 // STM32_G0_OPTION_BYTES_BASE
option_size 0x80 // 128 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G07x / STM32G08x device
#
dev_type STM32G07x_G08x
ref_manual_id 0444 // also RM454
chip_id 0x460 // STM32_CHIPID_G0_CAT2
flash_type G0
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x9000 // 36 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800 // STM32_G0_OPTION_BYTES_BASE
option_size 0x80 // 128 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G0Bx / STM32G0Cx device
#
dev_type STM32G0Bx_G0Cx
ref_manual_id 0444 // also RM454
chip_id 0x467 // STM32_CHIPID_G0_CAT3
flash_type G0
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x24000 // 144 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800 // STM32_G0_OPTION_BYTES_BASE
option_size 0x80 // 128 B
flags dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G43x / STM32G44x device
#
dev_type STM32G43x_G44x
ref_manual_id 0440
chip_id 0x468 // STM32_CHIPID_G4_CAT2
flash_type G4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x8000 // 32 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1ffff800 // STM32_G4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G47x / STM32G48x device
#
dev_type STM32G47x_G48x
ref_manual_id 0440
chip_id 0x469 // STM32_CHIPID_G4_CAT3
flash_type G4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x20000 // 128 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1ffff800 // STM32_G4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32G49x / STM32G4Ax device
#
dev_type STM32G49x_G4Ax
ref_manual_id 0440
chip_id 0x479 // STM32_CHIPID_G4_CAT4
flash_type G4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x1c000 // 112 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1ffff800 // STM32_G4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32H5xx device
#
dev_type STM32H5xx
ref_manual_id 0481
chip_id 0x484 // STM32_CHIPID_H5xx
flash_type L5_U5_H5
flash_size_reg 0x08fff80c
flash_pagesize 0x2000 // 8 KB
sram_size 0xa0000 // 640 KB
bootrom_base 0x0bf80000
bootrom_size 0x8000 // 32 KB
option_base 0x0
option_size 0x0
flags dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32H72x / STM32H73x device
#
dev_type STM32H72x_H73x
ref_manual_id 0468
chip_id 0x483 // STM32_CHIPID_H72x
flash_type H7
flash_size_reg 0x1ff1e880
flash_pagesize 0x20000 // 128 KB
sram_size 0x20000 // 128 KB "DTCM"
bootrom_base 0x1ff00000
bootrom_size 0x20000 // 128 KB
option_base 0x5200201c // STM32_H7_OPTION_BYTES_BASE
option_size 0x2c // 44 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32H74x / STM32H75x device
#
dev_type STM32H74x_H75x
ref_manual_id 0433
chip_id 0x450 // STM32_CHIPID_H74xxx
flash_type H7
flash_size_reg 0x1ff1e880
flash_pagesize 0x20000 // 128 KB
sram_size 0x20000 // 128 KB "DTCM"
bootrom_base 0x1ff00000
bootrom_size 0x20000 // 128 KB
option_base 0x5200201c // STM32_H7_OPTION_BYTES_BASE
option_size 0x2c // 44 B /* FLASH_OPTSR_CUR to FLASH_BOOT_PRGR */
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32H7Ax / STM32H7Bx device
#
dev_type STM32H7Ax_H7Bx
ref_manual_id 0455
chip_id 0x480 // STM32_CHIPID_H7Ax
flash_type H7
flash_size_reg 0x08fff80c
flash_pagesize 0x2000 // 8 KB
sram_size 0x20000 // 128 KB "DTCM"
bootrom_base 0x1ff00000
bootrom_size 0x20000 // 128 KB
option_base 0x5200201c // STM32_H7_OPTION_BYTES_BASE
option_size 0x2c // 44 B
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L0xxx (Cat.1) device (L010x3 / L010x4 / L011x / L021x)
#
dev_type STM32L0xxx_Cat_1
ref_manual_id 0451 // also RM0377
chip_id 0x457 // STM32_CHIPID_L0_CAT1
flash_type L0_L1
flash_size_reg 0x1ff8007c
flash_pagesize 0x80 // 128 B
sram_size 0x2000 // 8 KB
bootrom_base 0x1ff00000
bootrom_size 0x2000 // 8 KB
option_base 0x1ff80000 // STM32_L0_OPTION_BYTES_BASE
option_size 0x20 // 32 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L0xxx (Cat.2) device (L010x6 / L031x / L041x)
#
dev_type STM32L0xxx_Cat_2
ref_manual_id 0451 // also RM0377
chip_id 0x425 // STM32_CHIPID_L0_CAT2
flash_type L0_L1
flash_size_reg 0x1ff8007c
flash_pagesize 0x80 // 128 B
sram_size 0x2000 // 8 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x1ff80000 // STM32_L0_OPTION_BYTES_BASE
option_size 0x20 // 32 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L0xxx (Cat.3) device (L010x8 / L051x / L053x / L063x)
#
dev_type STM32L0xxx_Cat_3
ref_manual_id 0451 // also RM0367 & RM0377
chip_id 0x417 // STM32_CHIPID_L0_CAT3
flash_type L0_L1
flash_size_reg 0x1ff8007c
flash_pagesize 0x80 // 128 B
sram_size 0x2000 // 8 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x1ff80000 // STM32_L0_OPTION_BYTES_BASE
option_size 0x20 // 32 B
flags none

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L0xxx (Cat.5) device (L010xB / L071x / L081x / L073x / L083x)
#
dev_type STM32L0xxx_Cat_5
ref_manual_id 0451 // also RM0367 & RM0377
chip_id 0x447 // STM32_CHIPID_L0_CAT5
flash_type L0_L1
flash_size_reg 0x1ff8007c
flash_pagesize 0x80 // 128 B
sram_size 0x5000 // 20 KB
bootrom_base 0x1ff00000
bootrom_size 0x2000 // 8 KB
option_base 0x1ff80000 // STM32_L0_OPTION_BYTES_BASE
option_size 0x20 // 32 B
flags dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L1xx (Cat.1) device (L100C6 / L100R8 / L100RB)
#
dev_type STM32L1xx_Cat_1
ref_manual_id 0038
chip_id 0x416 // STM32_CHIPID_L1_MD
flash_type L0_L1
flash_size_reg 0x1ff8004c
flash_pagesize 0x100 // 128 B
sram_size 0x4000 // 16 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L1xx (Cat.2) device (L100C6-A / L100R8-A / L100RB-A)
#
dev_type STM32L1xx_Cat_2
ref_manual_id 0038
chip_id 0x429 // STM32_CHIPID_L1_CAT2
flash_type L0_L1
flash_size_reg 0x1ff8004c
flash_pagesize 0x100 // 128 B
sram_size 0x8000 // 32 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L1xx (Cat.3) device (L100RC / L15xxC)
#
dev_type STM32L1xx_Cat_3
ref_manual_id 0038
chip_id 0x427 // STM32_CHIPID_L1_MD_PLUS
flash_type L0_L1
flash_size_reg 0x1ff800cc
flash_pagesize 0x100 // 128 B
sram_size 0x8000 // 32 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L1xx (Cat.4) device (L15xxD / L162xD)
#
dev_type STM32L1xx_Cat_4
ref_manual_id 0038
chip_id 0x436 // STM32_CHIPID_L1_MD_PLUS_HD
flash_type L0_L1
flash_size_reg 0x1ff800cc
flash_pagesize 0x100 // 128 B
sram_size 0xc000 // 48 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x1ff80000 // STM32_L1_OPTION_BYTES_BASE
option_size 0x8 // 8 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L1xx (Cat.5) device (L15xxE / L162xE)
#
dev_type STM32L1xx_Cat_5
ref_manual_id 0038
chip_id 0x437 // STM32_CHIPID_L152_RE
flash_type L0_L1
flash_size_reg 0x1ff800cc
flash_pagesize 0x100 // 128 B
sram_size 0x14000 // 80 KB
bootrom_base 0x1ff00000
bootrom_size 0x1000 // 4 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L41x / STM32L42x device
#
dev_type STM32L41x_L42x
ref_manual_id 0394
chip_id 0x464 // STM32_CHIPID_L41x_L42x
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0xa000 // 40 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x0
option_size 0x0
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L43x / STM32L44x device
#
dev_type STM32L41x_L42x
ref_manual_id 0392
chip_id 0x435 // STM32_CHIPID_L43x_L44x
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0xc000 // 48 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800 // STM32_L4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,16 @@
# Chip-ID file for STM32L45x / STM32L46x device
#
dev_type STM32L45x_L46x
ref_manual_id 0394
chip_id 0x462 // STM32_CHIPID_L45x_L46x
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x20000 // 128 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x0
option_size 0x0
flags swo
otp_base 0x1fff7000
otp_size 0x400 // 1 KB

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L47x / STM32L48x device
#
dev_type STM32L47x_L48x
ref_manual_id 0351
chip_id 0x415 // STM32_CHIPID_L4
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x18000 // 96 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800 // STM32_L4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,16 @@
# Chip-ID file for STM32L496x / STM32L4A6x device
#
dev_type STM32L496x_L4A6x
ref_manual_id 0351
chip_id 0x461 // STM32_CHIPID_L496x_L4A6x
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x50000 // 320 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800 // STM32_L4_OPTION_BYTES_BASE
option_size 0x4 // 4 B
flags swo
otp_base 0x1fff7000
otp_size 0x400 // 1 KB

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L4Px / STM32L4Qx device
#
dev_type STM32L4Px_L4Qx
ref_manual_id 0432
chip_id 0x471 // STM32_CHIPID_L4PX
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x1000 // 4 KB
sram_size 0xa0000 // 640 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1ff00000
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L4Rx device
#
dev_type STM32L4Rx
ref_manual_id 0432
chip_id 0x470 // STM32_CHIPID_L4RX
flash_type L4
flash_size_reg 0x1fff75e0
flash_pagesize 0x1000 // 4 KB
sram_size 0xa0000 // 640 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1ff00000
option_size 0x4 // 4 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32L5x2xx device
#
dev_type STM32L5x2xx
ref_manual_id 0438
chip_id 0x472 // STM32_CHIPID_L5x2xx
flash_type L5_U5_H5
flash_size_reg 0x0bfa05e0
flash_pagesize 0x1000 // 4 KB
sram_size 0x40000 // 256 KB
bootrom_base 0x0bf90000
bootrom_size 0x8000 // 32 KB
option_base 0x0
option_size 0x0
flags dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32U535 / STM32U545 device
#
dev_type STM32U535_U545
ref_manual_id 0456
chip_id 0x455 // STM32U535/545
flash_type L5_U5_H5
flash_size_reg 0x0bfa07a0
flash_pagesize 0x2000 // 8 KB
sram_size 0x44800 // 274 KB
bootrom_base 0x0bf90000
bootrom_size 0x8000 // 32 KB
option_base 0x0
option_size 0x0
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32U5Fx / STM32U5Gx device
#
dev_type STM32U5Fx_U5Gx
ref_manual_id 0456
chip_id 0x476 // STM32U5Fx5/5Gx
flash_type L5_U5_H5
flash_size_reg 0x0bfa07a0
flash_pagesize 0x2000 // 8 KB
sram_size 0x2f4800 // 3026 KB
bootrom_base 0x0bf90000
bootrom_size 0x8000 // 32 KB
option_base 0x0
option_size 0x0
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32U575 / STM32U585 device
#
dev_type STM32U575_U585
ref_manual_id 0456
chip_id 0x482 // STM32U575/585
flash_type L5_U5_H5
flash_size_reg 0x0bfa07a0
flash_pagesize 0x2000 // 8 KB
sram_size 0xc4800 // 786 KB
bootrom_base 0x0bf90000
bootrom_size 0x10000 // 64 KB
option_base 0x0
option_size 0x0
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32U59x / STM32U5Ax device
#
dev_type STM32U59x_U5Ax
ref_manual_id 0456
chip_id 0x481 // STM32U59x/5Ax
flash_type L5_U5_H5
flash_size_reg 0x0bfa07a0
flash_pagesize 0x2000 // 8 KB
sram_size 0x274800 // 2514 KB
bootrom_base 0x0bf90000
bootrom_size 0x8000 // 32 KB
option_base 0x0
option_size 0x0
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32WBx0 / STM32WBx5 device
#
dev_type STM32WBx0_WBx5
ref_manual_id 0434 // also RM0471
chip_id 0x495 // STM32_CHIPID_WB55
flash_type WB_WL
flash_size_reg 0x1fff75e0
flash_pagesize 0x1000 // 4 KB
sram_size 0x40000 // 256 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff8000
option_size 0x80 // 128 B
flags swo

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for STM32WLEx device
#
dev_type STM32WLEx
ref_manual_id 0033
chip_id 0x497 // STM32_CHIPID_WLE
flash_type WB_WL
flash_size_reg 0x1fff75e0
flash_pagesize 0x800 // 2 KB
sram_size 0x10000 // 64 KB
bootrom_base 0x1fff0000
bootrom_size 0x7000 // 28 KB
option_base 0x1fff7800
option_size 0x10 // 16 B
flags swo dualbank

Wyświetl plik

@ -0,0 +1,14 @@
# Chip-ID file for unknown device
#
dev_type unknown
ref_manual_id 0000
chip_id 0x0 // STM32_CHIPID_UNKNOWN
flash_type UNKNOWN
flash_size_reg 0x0
flash_pagesize 0x0
sram_size 0x0
bootrom_base 0x0
bootrom_size 0x0
option_base 0x0
option_size 0x0
flags none

Wyświetl plik

@ -1,4 +1,4 @@
# stm32 discovery boards, with onboard st/linkv1
# STM32 discovery boards, with onboard st/linkv1
# ie, STM32VL
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", \

Wyświetl plik

@ -1,4 +1,4 @@
# stm32 nucleo boards, with onboard st/linkv2-1
# STM32 nucleo boards, with onboard st/linkv2-1
# ie, STM32F0, STM32F4.
# STM32VL has st/linkv1, which is quite different

Wyświetl plik

@ -1,4 +1,4 @@
# stm32 discovery boards, with onboard st/linkv2
# STM32 discovery boards, with onboard st/linkv2
# ie, STM32L, STM32F4.
# STM32VL has st/linkv1, which is quite different

Wyświetl plik

@ -7,7 +7,12 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", \
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", \
MODE:="0666", \
SYMLINK+="stlinkv3_%n"
# STLink V3SET MINIE
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3754", \
MODE:="0666", \
SYMLINK+="stlinkv3_%n"
# STLink V3SET
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374d", \
MODE:="0666", \

Wyświetl plik

@ -4,9 +4,11 @@ Alexey Cherevatenko
Alexey Panarin
Anatoli Klassen [dev26th]
Andrea Mucignat
Andrew Andrianov [necromant]
Andrew Andrianov [nekromant]
Andrey Yurovsky
Andy Isaacson
Andreas Sandberg [andysan]
Antoine Faure [antoinefaure]
Anton [Ant-ON]
Áron Radics
A. Sheaff
@ -24,6 +26,7 @@ Chris Samuelson
Christian Deussen [nullsub]
Christophe Levantis
Craig Lilley
Crest [Crest]
Dan Dev
Dan Hepler
Daniel Campoverde [alx741]
@ -40,16 +43,19 @@ Fabien Chouteau [Fabien-Chouteau]
Florian Hars
Friedrich Beckmann
Gabriel Górski [Glaeqen]
Geoffrey Brown
Geoffrey Brown [geoffreymbrown]
George Talusan [gtalusan]
Georg von Zengen
Giuseppe Barba
Greg Alexander [galexander1]
Greg Meiste [meisteg]
Grzegorz Szymaszek [gszy]
Guillaume Revaillot [grevaillot]
Hakkavélin <hakkavelin@braudrist.lan>
Gwenhael Goavec-Merou [trabucayre]
[Hakkavélin]
Halt Hammerzeit
htk <htk@vdr.fritz.box>
Hsu Pu [hsupu]
[hydroconstructor]
Ian Griffiths
Jack Peel
Jakub Tyszkowski
@ -62,6 +68,7 @@ Jens Hoffmann
Jerome Lambourg
Jim Paris
Jiří Netolický
Jerry Jacobs [xor-gate]
Jerry Nosky [jnosky]
Jochen Wilhelmy [Jochen0x90h]
John Hall [simplerobot]
@ -84,7 +91,6 @@ Michael Pratt [prattmic]
Michael Sparmann
Mike Szczys
Magnus Lundin [mlu]
mux <freelancer.c@gmail.com>
Ned Konz
Nic McDonald
Nicolas Schodet
@ -92,7 +98,7 @@ Oleksiy Slyshyk [slyshykO]
Olivier Croquette
Olivier Gay
Onno Kortmann
orangeudav <orangeudav@gmail.com>
[orangeudav]
Pavel Kirienko
Pekka Nikander
Pete Nelson
@ -100,6 +106,8 @@ Peter Torelli [petertorelli]
Peter Zotov
Petteri Aimonen
Piotr Haber
[RafaelLeeImg]
[rcubee]
Rene Hopf [rene-dev]
Robin Kreis
Roger Wolff [rewolff]
@ -113,7 +121,8 @@ Simon Wright
Stany Marcel
Stefan Misik
Sven Wegener
Tarek Bochkati [tarek-bochkati] (STMicroelectronics)
Tarek Bochkati [tarek-bochkati]
[texane]
Timothy Lee [timothytylee]
Tuomo Kaikkonen
Theodore A. Roth
@ -128,6 +137,7 @@ Vasiliy Glazov [Vascom]
Vegard Storheil Eriksen
Viacheslav Dobromyslov
Victor Mayoral Vilches
[whitequark]
William Ransohoff [WRansohoff]
Wojciech A. Koszek
Woodrow Douglass

Wyświetl plik

@ -1,74 +1,42 @@
# Compiling from sources
## Microsoft Windows (10, 8.1)
## Microsoft Windows (10, 11)
### Common Requirements
On Windows users should ensure that the following software is installed:
- `git` (_optional, but recommended_)
- `cmake` (3.17.0 or later)
- `MinGW-w64` (7.0.0 or later) with GCC toolchain 8.1.0
- `cmake`
- `7-zip`
- `MinGW-w64`
### Installation
1. Install `git` from <https://git-scm.com/download/win>
2. Install `cmake` from <https://cmake.org/download><br />
Ensure that you add cmake to the $PATH system variable when following the instructions by the setup assistant.
3. Install
- _EITHER_: **MinGW-w64** from <https://sourceforge.net/projects/mingw-w64> (mingw-w64-install.exe)<br />
- _OR_: **MSVC toolchain** from Visual Studio Build Tools 2019
3. Install MinGW-w64<br />
Download **MinGW-w64** from <https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1.7z>. Extract content to `C:\mingw-w64\` and add `C:\mingw-w64\bin\` to PATH-Variable.<br />
4. Create a new destination folder at a place of your choice
5. Open the command-line (cmd.exe) and execute `cd C:\$Path-to-your-destination-folder$\`
6. Fetch the project sourcefiles by running `git clone https://github.com/stlink-org/stlink.git`from the command-line (cmd.exe)<br />
or download the stlink zip-sourcefolder from the Release page on GitHub
#### MSVC toolchain - minimal installation
Visual Studio IDE is not necessary, only Windows SDK & build tools are required (~3,3GB).
1. Open <https://visualstudio.microsoft.com/downloads/>
2. Navigate through menus as follows (might change overtime)
`All downloads > Tools for Visual Studio 2019 > Build Tools for Visual Studio 2019 > Download`
3. Start downloaded executable. After Visual Studio Installer bootstraps and main window pops up, open `Individual Components` tab, and pick
- latest build tools (eg. `MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.25)`)
- latest Windows SDK (eg. `Windows 10 SDK (10.0.18362.0)`)
4. After installation finishes, you can press `Launch` button in Visual Studio Installer's main menu.
- Thus you can open `Developer Command Prompt for VS 2019`. It is `cmd.exe` instance with adjusted PATHs including eg. `msbuild`.
- Alternatively, you can use `Developer Powershell for VS 2019` which is the same thing for `powershell.exe`. Both are available from Start menu.
- Another option is to add `msbuild` to PATH manually. Its location should be `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin`. Then, it should be available from any `powershell.exe` or `cmd.exe` session.
or download and extract the stlink zip-sourcefolder from the Release page on GitHub.
### Building
#### MinGW-w64
1. Use the command-line to move to the `scripts` directory within the source-folder: `cd stlink\scripts\`
2. Execute `./mingw64-build.bat`
1. Open command-line with administrator privileges
2. Move to the `stlink` directory
3. Execute `mingw64-build.bat`
NOTE:<br />
Per default the build script (currently) uses `C:\Program Files\mingw-w64\x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0\mingw64\bin`.<br />
Per default the build script (currently) uses `C:\mingw-w64\x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0\mingw64\bin`.<br />
When installing different toolchains make sure to update the path in the `mingw64-build.bat`.<br />
This can be achieved by opening the .bat file with a common text editor.
#### MSVC toolchain
1. In a command prompt, change the directory to the folder where the stlink files were cloned (or unzipped) to.
2. Make sure the build folder exists (`mkdir build` if not).
3. From the build folder, run cmake (`cd build; cmake ..`).
This will create a solution file `stlink.sln` in the build folder.
Now, you can build whole `stlink` suite using following command:
```
msbuild /m /p:Configuration=Release stlink.sln
```
Options:
- `/m` - compilation runs in parallel utilizing multiple cores
@ -95,7 +63,7 @@ Install the following packages from your package repository:
- `git`
- `gcc` or `clang` or `mingw32-gcc` or `mingw64-gcc` (C-compiler; very likely gcc is already present)
- `build-essential` (on Debian based distros (Debian, Ubuntu))
- `cmake` (3.4.2 or later, use the latest version available from the repository)
- `cmake`
- `rpm` (on Debian based distros (Debian, Ubuntu), needed for package build with `make package`)
- `libusb-1.0`
- `libusb-1.0-0-dev` (development headers for building)
@ -119,14 +87,18 @@ or execute (Debian-based systems only): `apt-get install gcc build-essential cma
1. Change into the project source directory: `cd stlink`
2. Run `make clean` -- required by some linux variants.
3. Run `make release` to create the _Release_ target
4. Run `make install` to full install the package with complete system integration
3. Run `make release` to create the _Release_ target.
4. Run `make install` to full install the package with complete system integration. This might require sudo permissions.
5. Run `make debug` to create the _Debug_ target (_optional_)<br />
The debug target is only necessary in order to modify the sources and to run under a debugger.
6. Run `make package`to build a Debian Package. The generated packages can be found in the subdirectory `./build/dist`.
6. Run `make package`to build a Debian Package. The generated packages can be found in the subdirectory `./build/Release/dist`.
As an option you may also install to an individual user-defined folder e.g `$HOME` with `make install DESTDIR=$HOME`.
### How to avoid the error message: "Can not open shared object file"
When installing system-wide (`sudo make install`) the dynamic library cache needs to be updated with the command `ldconfig`.
#### Removal:
1. Run `make uninstall` to perform a clean uninstall of the package from the system.
@ -159,7 +131,7 @@ Within the sourcefolder of the project, these rules are located in the subdirect
Afterwards it may be necessary to reload the udev rules:
```sh
$ sudo cp -a config/udev/rules.d/* /etc/udev/rules.d/
$ sudo cp -a config/udev/rules.d/* /lib/udev/rules.d/
$ sudo udevadm control --reload-rules
$ sudo udevadm trigger
```
@ -179,45 +151,6 @@ Choose one of the following options _before_ connecting the device to your compu
1. `cp stlink_v1.modprobe.conf /etc/modprobe.d`
2. `modprobe -r usb-storage && modprobe usb-storage`
## macOS
### Common requirements
The best and recommended way is to install a package manager for open source software,
either [homebrew](https://brew.sh) or [MacPorts](https://www.macports.org/).
Then install the following dependencies from the package repository:
- `git`
- `gcc` or `llvm` (for clang) (C-compiler)
- `cmake`
- `libusb`
- `gtk+3` or `gtk3` (_optional_, needed for `stlink-gui`)
To do this with only one simple command, type:
- for homebrew:
- with gcc: `sudo brew install git gcc cmake libusb gtk+3` or
- with clang: `sudo brew install git llvm cmake libusb gtk+3` or
- for MacPorts:
- with gcc: `sudo port install git gcc10 cmake libusb gtk3` or
- with clang: `sudo port install git llvm-10 cmake libusb gtk3`
### Installation
1. Open a new terminal window
2. Create a new destination folder at a place of your choice e.g. at `~/git`: `mkdir $HOME/git`
3. Change to this directory: `cd ~/git`
4. Fetch the project sourcefiles by running `git clone https://github.com/stlink-org/stlink.git`
### Building
1. Change into the project source directory: `cd stlink`
2. Run `make clean` to clean remnants of any previous builds.
3. Run `make release` to create the _Release_ target
4. Run `make debug` to create the _Debug_ target (_optional_)<br />
The debug target is only necessary in order to modify the sources and to run under a debugger.
## Build options
### Build using a different directory for shared libs
@ -235,4 +168,6 @@ Below are the preset default cmake options, which apply if none of these options
- `-DCMAKE_INSTALL_SYSCONFDIR=/etc`
- `-DCMAKE_INSTALL_PREFIX=/usr/local`
Please refer to the related [cmake documentation](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) for details.
Author: nightwalker-87

Wyświetl plik

@ -1,23 +0,0 @@
# Warning: This example assumes that you are building on a host with pkg-config available (e.g. linux).
# The logic required to build under windows/mingw and/or mac was intentionally omitted to keep this
# CMakeLists as small as possible.
cmake_minimum_required(VERSION 3.4.2)
project(st-hello)
set(PROJECT_VERSION 0.1)
set(SRCS main.c)
include_directories(${STLINK_INCLUDE_DIRS})
find_package(PkgConfig)
pkg_check_modules(STLINK REQUIRED stlink)
set(CMAKE_C_FLAGS " ${STLINK_CFLAGS_OTHER} -Wall -Werror")
add_executable(${PROJECT_NAME} ${SRCS})
target_link_libraries(${PROJECT_NAME} ${STLINK_LIBRARIES})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})

Wyświetl plik

@ -1,2 +0,0 @@
This is a simple standalone application example that uses libstlink.
It can be used as a boilerplate for app development.

Wyświetl plik

@ -1,28 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <stlink.h>
static stlink_t *stlink_open_first(void) {
stlink_t* sl = NULL;
sl = stlink_v1_open(0, 1);
if (sl == NULL)
sl = stlink_open_usb(0, 1, NULL);
return sl;
}
int main() {
stlink_t* sl = NULL;
sl = stlink_open_first();
if (sl == NULL) {
fprintf(stderr, "Failed to open stlink device ;(\n");
exit(1);
}
fprintf(stderr, "STlink device opened, that's cool!\n");
stlink_close(sl);
return 0;
}

Wyświetl plik

@ -1,411 +0,0 @@
=== Compilation with pkg-config ===
In order to use pkg-config for development purposes, add the following lines to the toplevel CMakeLists.txt file:
###
# Additional build tasks
###
## Package configuration (pkg-config) on unix-based systems
if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
add_subdirectory(doc/dev/pkg-config) # external tool pkg-config
endif ()
=== Target Identification ===
The following information is available about the target:
- chip id: 0xE0042000 or 0x40015800, primary information to derive flash and sram architection
- core id: Result from the STLINK_DEBUGREADCOREID call, additionally used for flash/sram architection
- cpu id: 0xE000ED00 (CMSIS System Control Block CPU ID), not used in stlink
=== Backend ===
The "backend" implements the interface to the adapter hardware.
There are two backends for two different adapters: "sg" (stlink v1?) and "usb" (stlink v2?).
Include stlink/backend.h
typedef struct _stlink_backend {
void (*close) (stlink_t * sl);
int (*exit_debug_mode) (stlink_t * sl);
int (*enter_swd_mode) (stlink_t * sl);
int (*enter_jtag_mode) (stlink_t * stl);
int (*exit_dfu_mode) (stlink_t * stl);
int (*core_id) (stlink_t * stl);
int (*reset) (stlink_t * stl);
int (*jtag_reset) (stlink_t * stl, int value);
int (*run) (stlink_t * stl);
int (*status) (stlink_t * stl);
int (*version) (stlink_t *sl);
int (*read_debug32) (stlink_t *sl, uint32_t addr, uint32_t *data);
int (*read_mem32) (stlink_t *sl, uint32_t addr, uint16_t len);
int (*write_debug32) (stlink_t *sl, uint32_t addr, uint32_t data);
int (*write_mem32) (stlink_t *sl, uint32_t addr, uint16_t len);
int (*write_mem8) (stlink_t *sl, uint32_t addr, uint16_t len);
int (*read_all_regs) (stlink_t *sl, struct stlink_reg * regp);
int (*read_reg) (stlink_t *sl, int r_idx, struct stlink_reg * regp);
int (*read_all_unsupported_regs) (stlink_t *sl, struct stlink_reg *regp);
int (*read_unsupported_reg) (stlink_t *sl, int r_idx, struct stlink_reg *regp);
int (*write_unsupported_reg) (stlink_t *sl, uint32_t value, int idx, struct stlink_reg *regp);
int (*write_reg) (stlink_t *sl, uint32_t reg, int idx);
int (*step) (stlink_t * stl);
int (*current_mode) (stlink_t * stl);
int (*force_debug) (stlink_t *sl);
int32_t (*target_voltage) (stlink_t *sl);
int (*set_swdclk) (stlink_t * stl, uint16_t divisor);
} stlink_backend_t;
Descriptions below describe the actions of the usb.h backend:
void (*close) (stlink_t * sl);
int (*exit_debug_mode) (stlink_t * sl);
__stlink_usb_exit_debug_mode: Send STLINK_DEBUG_EXIT
returns -1 or 0
int (*enter_swd_mode) (stlink_t * sl);
_stlink_usb_enter_swd_mode: Send STLINK_DEBUG_ENTER+STLINK_DEBUG_ENTER_SWD
returns -1 or 0
int (*enter_jtag_mode) (stlink_t * stl);
int (*exit_dfu_mode) (stlink_t * stl);
_stlink_usb_exit_dfu_mode: Send STLINK_DFU_EXIT
returns -1 or 0
int (*core_id) (stlink_t * stl);
_stlink_usb_core_id: Assign the result from STLINK_DEBUG_READCOREID to stl->core_id
returns -1 or 0
int (*reset) (stlink_t * stl);
_stlink_usb_reset: Send STLINK_DEBUG_RESETSYS and reset via AIRCR
AIRCR is part of the CMSIS System Control Block (SCB), which is located in
the System Control Space at 0xE000ED0C
returns -1 or 0 ?
int (*jtag_reset) (stlink_t * stl, int value);
_stlink_usb_jtag_reset: Send STLINK_JTAG_DRIVE_NRST.
"value" is sent as argument for STLINK_JTAG_DRIVE_NRST and probably contains
the status of the NRST line (0: low, 1: high). Also the value 2 is used in the software.
returns -1 or 0
int (*run) (stlink_t * stl);
_stlink_usb_run: Send STLINK_DEBUG_RUNCORE
returns -1 or 0
int (*status) (stlink_t * stl);
_stlink_usb_status: Assign the result from STLINK_DEBUG_GETSTATUS to stl->q_len
returns -1 or 0
int (*version) (stlink_t *sl);
_stlink_usb_version: Read version with STLINK_GET_VERSION.
Result is stored in sl->q_buf (6 bytes????)
returns -1 or 0
int (*read_debug32) (stlink_t *sl, uint32_t addr, uint32_t *data);
_stlink_usb_read_debug32: Send STLINK_JTAG_READDEBUG_32BIT
to read 32 bits from "addr". The result data is stored at "*data".
returns -1 or 0
int (*read_mem32) (stlink_t *sl, uint32_t addr, uint16_t len);
_stlink_usb_read_mem32: Use STLINK_DEBUG_READMEM_32BIT
to read "len" bytes from "addr"
Result is returned in sl->q_buf, sl->q_len returns the size of the data (should be
equal to "len"???).
returns -1 or 0
int (*write_debug32) (stlink_t *sl, uint32_t addr, uint32_t data);
_stlink_usb_write_debug32: Use STLINK_JTAG_WRITEDEBUG_32BIT
to store "data" at "addr"
returns -1 or 0
int (*write_mem32) (stlink_t *sl, uint32_t addr, uint16_t len);
_stlink_usb_write_mem32: Use STLINK_DEBUG_WRITEMEM_32BIT to
send data stored in sl->q_buf to the target at "addr".
"len" is the size data (???? not clear whether this are bytes )
returns -1 or 0
int (*write_mem8) (stlink_t *sl, uint32_t addr, uint16_t len);
_stlink_usb_write_mem8: Use STLINK_DEBUG_WRITEMEM_8BIT to
send data stored in sl->q_buf to the target at "addr".
"len" is the size in bytes (probably).
returns -1 or 0
int (*read_all_regs) (stlink_t *sl, struct stlink_reg * regp);
_stlink_usb_read_all_regs: Send STLINK_DEBUG_READALLREGS to read
all register values and store them into *regp;
returns -1 or 0
int (*read_reg) (stlink_t *sl, int r_idx, struct stlink_reg * regp);
_stlink_usb_read_reg: Send STLINK_DEBUG_READREG to read specific register "r_idx".
The result is then stored in *regp in the correct register.
Example if "r_idx" is 18, then the result is stored in regp->process_sp
returns -1 or 0
int (*read_all_unsupported_regs) (stlink_t *sl, struct stlink_reg *regp);
_stlink_usb_read_all_unsupported_regs: Calls "_stlink_usb_read_unsupported_reg"
(see below) to read all registers.
returns -1 or 0
int (*read_unsupported_reg) (stlink_t *sl, int r_idx, struct stlink_reg *regp);
_stlink_usb_read_unsupported_reg Use DCRSR and DCRDR to access some
of the internal registers (primask, basepri, faultmask, control, fpscr).
Also will fill regp->s (???) for some specific "r_idx" values.
WARNING: Some r_idx values may lead to a out of array bound problem in C.
returns -1 or 0
int (*write_unsupported_reg) (stlink_t *sl, uint32_t value, int idx, struct stlink_reg *regp);
_stlink_usb_write_unsupported_reg:
Updates one of the following registers:
primask (idx=0x1c), basepri (idx=0x1d), faultmask (idx=0x1e), control (idx=0x1f)
The new value is given as "value" as fn argument.
Corresponding values are refreshed in regp, however the old value for is kept in regp:
If basepri has to be updated (idx=0x1d), then all register values are fetched and
basepri is updated in the core, but not in *regp (BUG???).
returns -1 or 0
int (*write_reg) (stlink_t *sl, uint32_t reg, int idx);
_stlink_usb_write_reg: Use STLINK_DEBUG_WRITEREG to update register "idx"
with value "reg".
returns -1 or 0
int (*step) (stlink_t * stl);
_stlink_usb_step: Send STLINK_DEBUG_STEPCORE
returns -1 or 0
int (*current_mode) (stlink_t * stl);
_stlink_usb_current_mode: Send STLINK_GET_CURRENT_MODE and return
the current mode.
returns -1 or the value for the current mode.
Modes probably are:
STLINK_DEV_DFU_MODE 0x00
STLINK_DEV_MASS_MODE 0x01
STLINK_DEV_DEBUG_MODE 0x02
int (*force_debug) (stlink_t *sl);
_stlink_usb_force_debug: Sends STLINK_DEBUG_FORCEDEBUG. No other side effects
returns -1 or 0
int32_t (*target_voltage) (stlink_t *sl);
_stlink_usb_target_voltage: Send STLINK_GET_TARGET_VOLTAGE
returns -1 or the target voltage. (??? dimension is not clear...)
int (*set_swdclk) (stlink_t * stl, uint16_t divisor);
_stlink_usb_set_swdclk: Send STLINK_DEBUG_APIV2_SWD_SET_FREQ and "divisor" value
returns -1 or 0
=== Other Functions ===
Include: stlink.h
Prototype: void stlink_close(stlink_t *sl);
Include: inc/stlink.h
Definition: src/common.c
Description:
Calls the backend "close" procedure and frees 'sl'
Backend: "close"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -
Include: inc/stlink.h
Prototype: int stlink_core_id(stlink_t *sl);
Definition: src/common.c
Description:
Calls the backend "core_id", calls stlink_print_data() on higher verbose levels.
Assigns the core id returned by STLINK_DEBUGREADCOREID to sl->core_id
Only some specific core ids are used: See include/stm32.h
Usage includes the selection of the correct flash algorithm.
Backend: "core_id"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -1 for error. 0 for success.
Include: inc/stlink.h
Prototype: int stlink_reset(stlink_t *sl);
Definition: src/common.c
Description:
Just calls the backend "reset" procedure (reset via STLINK_DEBUG_RESETSYS
and reset via AIRCR register at 0xE000ED0C)
Backend: "reset"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -1 for error. 0 for success.
Include: inc/stlink.h
Prototype: int stlink_jtag_reset(stlink_t *sl, int value);
Definition: src/common.c
Description:
Just calls the backend "jtag_reset" procedure
Backend: "jtag_reset"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
value: 0: drive low, 1: drive high, 2: pulse
Return: -1 for error. 0 for success.
Include: inc/stlink.h
Prototype: int stlink_run(stlink_t *sl, enum run_type type);
Definition: src/common.c
Description:
Just calls the backend "run" procedure.
Backend: "run"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
type: RUN_NORMAL - run target, RUN_FLASH_LOADER - run target with masking interrupts
Return: -1 for error. 0 for success.
Include: inc/stlink.h
Prototype: int stlink_status(stlink_t *sl);
Definition: src/common.c
Description:
Calls the backend "status" procedure and the procedure "stlink_core_stat()" to
store the status in "sl->core_stat". Possible value for "sl->core_stat" are:
STLINK_CORE_RUNNING
STLINK_CORE_HALTED
STLINK_CORE_STAT_UNKNOWN
Backend: "status"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -1 for error. 0 for success.
Include: inc/stlink.h
Prototype: int stlink_version(stlink_t *sl);
Definition: src/common.c
Description:
Calls the backend "version" procedure, parses the result and puts the result into sl->version
This version probably refers to the version of the adapter.
Backend: "version"
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -1 for error. 0 for success.
int stlink_read_debug32(stlink_t *sl, uint32_t addr, uint32_t *data);
int stlink_read_mem32(stlink_t *sl, uint32_t addr, uint16_t len);
int stlink_write_debug32(stlink_t *sl, uint32_t addr, uint32_t data);
int stlink_write_mem32(stlink_t *sl, uint32_t addr, uint16_t len);
int stlink_write_mem8(stlink_t *sl, uint32_t addr, uint16_t len);
int stlink_read_all_regs(stlink_t *sl, struct stlink_reg *regp);
int stlink_read_all_unsupported_regs(stlink_t *sl, struct stlink_reg *regp);
int stlink_read_reg(stlink_t *sl, int r_idx, struct stlink_reg *regp);
int stlink_read_unsupported_reg(stlink_t *sl, int r_idx, struct stlink_reg *regp);
int stlink_write_unsupported_reg(stlink_t *sl, uint32_t value, int r_idx, struct stlink_reg *regp);
int stlink_write_reg(stlink_t *sl, uint32_t reg, int idx);
int stlink_step(stlink_t *sl);
int stlink_current_mode(stlink_t *sl);
int stlink_force_debug(stlink_t *sl);
int stlink_target_voltage(stlink_t *sl);
int stlink_set_swdclk(stlink_t *sl, int freq_khz);
int stlink_erase_flash_mass(stlink_t* sl);
int stlink_write_flash(stlink_t* sl, stm32_addr_t address, uint8_t* data, uint32_t length, uint8_t eraseonly);
int stlink_parse_ihex(const char* path, uint8_t erased_pattern, uint8_t * * mem, size_t * size, uint32_t * begin);
uint8_t stlink_get_erased_pattern(stlink_t *sl);
int stlink_mwrite_flash(stlink_t *sl, uint8_t* data, uint32_t length, stm32_addr_t addr);
int stlink_fwrite_flash(stlink_t *sl, const char* path, stm32_addr_t addr);
int stlink_fwrite_option_bytes(stlink_t *sl, const char* path, stm32_addr_t addr);
int stlink_fwrite_option_bytes_32bit(stlink_t *sl,uint32_t val);
int stlink_mwrite_sram(stlink_t *sl, uint8_t* data, uint32_t length, stm32_addr_t addr);
int stlink_fwrite_sram(stlink_t *sl, const char* path, stm32_addr_t addr);
int stlink_verify_write_flash(stlink_t *sl, stm32_addr_t address, uint8_t *data, uint32_t length);
Include: inc/stlink.h
Prototype: int stlink_chip_id(stlink_t *sl, uint32_t *chip_id);
Definition: src/common.c
Description:
Tries to read out the chip id via memory read from the device.
Note: sl->chip_id is NOT updated by this procedure. Instead this happens in stlink_load_device_params():
Do not call this function, but instead call stlink_load_device_params()
Backend: -
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
chip_id: Pointer. Result is stored via this pointer.
Return: -1 for error. 0 for success.
Include: inc/stlink.h
Prototype: int stlink_cpu_id(stlink_t *sl, cortex_m3_cpuid_t *cpuid);
Definition: src/common.c
Description:
Reads the CPU id from STLINK_REG_CM3_CPUID (0xE000ED00, first value of
the SCB, system control block) and splits this into
cpuid->implementer_id
cpuid->variant
cpuid->part
cpuid->revision
The result is not used in the tools, but only in the usb test program.
Backend: -
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
cpuid: Pointer. Result is stored via this pointer.
Return: -1 for error. 0 for success.
int stlink_erase_flash_page(stlink_t* sl, stm32_addr_t flashaddr);
uint32_t stlink_calculate_pagesize(stlink_t *sl, uint32_t flashaddr);
uint16_t read_uint16(const unsigned char *c, const int pt);
void stlink_core_stat(stlink_t *sl);
Include: inc/stlink.h
Prototype: void stlink_print_data(stlink_t *sl);
Definition: src/common.c
Description:
If debug logging is enabled: Print the HEX content of the q_buf array.
q_buf will contain the result of the last "backend" command.
Backend: -
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -
unsigned int is_bigendian(void);
uint32_t read_uint32(const unsigned char *c, const int pt);
void write_uint32(unsigned char* buf, uint32_t ui);
void write_uint16(unsigned char* buf, uint16_t ui);
bool stlink_is_core_halted(stlink_t *sl);
int write_buffer_to_sram(stlink_t *sl, flash_loader_t* fl, const uint8_t* buf, size_t size);
int write_loader_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t* size);
int stlink_fread(stlink_t* sl, const char* path, bool is_ihex, stm32_addr_t addr, size_t size);
Include: inc/stlink.h
Prototype: int stlink_load_device_params(stlink_t *sl);
Definition: src/common.c
Description:
This is one of the most important procedures. It will get all the device info
and store the results in the "sl" structure. Many other procedures will depend
on this information.
The identification is based on the stlink_chip_id() result and the flash_size register value
Backend: -
Arguments:
sl: Pointer to the stlink data structure, returned by stlink_v1_open() or stlink_open_usb()
Return: -1 for error. 0 for success.
int stlink_read_option_bytes_f2(stlink_t *sl, uint32_t* option_byte);
int stlink_read_option_bytes_f4(stlink_t *sl, uint32_t* option_byte);
Include "flash_loader.h"
int stlink_flash_loader_init(stlink_t *sl, flash_loader_t* fl);
int stlink_flash_loader_write_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t* size);
int stlink_flash_loader_run(stlink_t *sl, flash_loader_t* fl, stm32_addr_t target, const uint8_t* buf, size_t size);
Inlcude "sg.h"
stlink_t* stlink_v1_open(const int verbose, int reset);
Include "usb.h"
stlink_t *stlink_open_usb(enum ugly_loglevel verbose, bool reset, char serial[STLINK_SERIAL_MAX_SIZE]);
size_t stlink_probe_usb(stlink_t **stdevs[]);
void stlink_probe_usb_free(stlink_t **stdevs[], size_t size);

Wyświetl plik

@ -1,15 +0,0 @@
set(PKG_CONFIG_LIBDIR "\${prefix}/lib/\${deb_host_multiarch}")
set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include/\${deb_host_multiarch}/${PROJECT_NAME}")
set(PKG_CONFIG_LIBS "-L\${libdir} -l:libstlink.so.${PROJECT_VERSION_MAJOR}")
set(PKG_CONFIG_CFLAGS "-I\${includedir}")
set(PKG_CONFIG_REQUIRES "libusb-1.0")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig.pc.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
DESTINATION ${STLINK_LIBRARY_PATH}/pkgconfig
)

Some files were not shown because too many files have changed in this diff Show More