Skip to content

Commit

Permalink
General Project Update
Browse files Browse the repository at this point in the history
- Updated build script for Windows
- [doc] Updated documentation on:
--> compile instructions
--> release preparation steps
--> list of supported devices
--> OS version support status
  • Loading branch information
Nightwalker-87 committed Jan 30, 2024
1 parent b05a117 commit 926e7ef
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 47 deletions.
38 changes: 2 additions & 36 deletions doc/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,14 @@ On Windows users should ensure that the following software is installed:
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_: Download **MinGW-w64** from <hhttp://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z>. Extract content to `C:\mingw-w64\` and add `C:\mingw-w64\bin\` to PATH-Variable.<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 and extract 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.

### Building

#### MinGW-w64
Expand All @@ -58,19 +37,6 @@ Per default the build script (currently) uses `C:\mingw-w64\x86_64-8.1.0-release
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
Expand Down
14 changes: 7 additions & 7 deletions doc/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Release

This document describes the necessary steps for developers to create a release:

1. Update `CHANGELOG.md`, `cmake/packaging/deb/changelog` & `cmake/packaging/rpm/changelog`
1. Update changelog (`CHANGELOG.md`, `cmake/packaging/deb/changelog` & `cmake/packaging/rpm/changelog`)
2. Update `.version` with semantic version: `x.x.x`
3. Update `README.md` with semantic version `x.x.x` in commits badge
4. Merge `develop` into `master`
5. Create and push git tag and commits `git tag x.x.x`
6. Create binary packages (.rpm / .deb / .zip) with `make package && sh ./cmake/packaging/windows/generate_binaries.sh`
7. Upload packages to the [release page](https://github.com/stlink-org/stlink/releases) of this project
8. Merge `master` into `develop`
9. Update GitHub security policy (/SECURITY.md)
4. Update GitHub security policy (`SECURITY.md`)
5. Merge `develop` into `master`
6. Create and push git tag and commits `git tag x.x.x`
7. Create binary packages (.rpm / .deb / .zip) with `make package && sh ./cmake/packaging/windows/generate_binaries.sh`
8. Upload packages to the [release page](https://github.com/stlink-org/stlink/releases) of this project
9. Merge `master` into `develop`
7 changes: 5 additions & 2 deletions doc/supported_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ More commonly these are:
| STM32F4 | M4F | |
| STM32G4 | M4F | |
| STM32L4 | M4F | |
| STM32F7 | M4F | |
| STM32H7 | M4F | |
| STM32F7 | M7F | |
| STM32H7 | M7F | |
| STM32WB | M4F | |
| STM32WL | M4 | |
| STM32L5 | M33 | |
| STM32H5 | M33 | |
| STM32U5 | M33 | |


# Chinese Clone-Chips [may work, but without support!]
Expand Down
2 changes: 1 addition & 1 deletion doc/version_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Other Linux-/Unix-based Operating Systems:
| Ubuntu 20.04 LTS (Focal) | 1.0.23 | 3.**16.3** | 3.24.**18** | May 2025 |
| | | | | |
| FreeBSD 13.x | 1.0.**16-18** (API 0x01000102) | 3.22.1 | 3.24.31 | |
| FreeBSD 12.x | 1.0.**16-18** (API 0x01000102) | 3.22.1 | 3.24.31 | Dec 2023 |
| | | | | |
| NetBSD 9.x | 1.0.24 | 3.21.2 | 3.24.30 | |
| NetBSD 8.x | 1.0.24 | 3.**19.7** | 3.24.27 | |
Expand All @@ -60,6 +59,7 @@ Systems with highlighted versions remain compatible with this toolset.

| Operating System | libusb | cmake | End of<br />OS-Support |
| ---------------------------------------- | ------------------------------ | ---------- | ---------------------- |
| FreeBSD 12.x | 1.0.**16-18** (API 0x01000102) | 3.**22.1** | Dec 2023 |
| Alpine 3.15 | 1.0.**24** | 3.**21.3** | Nov 2023 |
| Fedora 35 [x64] | 1.0.**24** | 3.**21.3** | Dec 2022 |
| Alpine 3.14 | 1.0.**24** | 3.**20.3** | May 2023 |
Expand Down
2 changes: 1 addition & 1 deletion mingw64-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mkdir build-mingw
cd build-mingw
set PATH=C:\Program Files (x86)\CMake\bin;C:\Program Files\CMake\bin;C:\mingw-w64\x86_64-8.1.0-win32-sjlj-rt_v6-rev0\mingw64\bin;%PATH%
set PATH=C:\Program Files\CMake\bin;C:\mingw-w64\x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1\mingw64\bin;%PATH%
cmake -G "MinGW Makefiles" ..
mingw32-make
mingw32-make install
Expand Down

0 comments on commit 926e7ef

Please sign in to comment.