Skip to content

Commit

Permalink
General project update
Browse files Browse the repository at this point in the history
- Fixed whitespace formatting
- Updated CHANGELOG.md
- Updated version_support.md
- Updated minimum build requirements:
   cmake > 3.16.3 / libusb > 1.0.23 / libgtk-dev > 3.24.18 / C17
- Minor formatting and grammar fixes
  • Loading branch information
Nightwalker-87 committed Oct 3, 2024
1 parent 685c41a commit 226e533
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 138 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ Release date: 2024-09-01
This release drops support for some older operating systems. Check project README for details.

Updated system requirements:
- `cmake` >= 3.13.0
- `libusb` >= 1.0.22
- `libgtk-dev` >= 3.22.30
- C-Standard: C17 (ISO/IEC 9899:2018)
- `cmake` >= 3.16.3
- `libusb` >= 1.0.23
- `libgtk-dev` >= 3.24.18

Features:
- Added support for STLINK-V3PWR ([#1388](https://github.com/stlink-org/stlink/pull/1388), [#1389](https://github.com/stlink-org/stlink/pull/1389))
Expand All @@ -34,7 +35,11 @@ Fixes:
- Fixed STM32H7 FLASH_OPTCR unlock sequence ([#1401](https://github.com/stlink-org/stlink/pull/1401), [#1416](https://github.com/stlink-org/stlink/pull/1416))
- Restored support for STM32G4 Cat4 device STM32G491 ([#1403](https://github.com/stlink-org/stlink/pull/1403), [#1414](https://github.com/stlink-org/stlink/pull/1414))
- Fixed STM32H7 option byte programming ([#1417](https://github.com/stlink-org/stlink/pull/1417))
- Latest release stlink-1.8.0-win32 doesn't run ([#1364](https://github.com/stlink-org/stlink/pull/1364), [#1410](https://github.com/stlink-org/stlink/pull/1410) commit [_commit-ID TBD_])
- Latest release stlink-1.8.0-win32 doesn't run ([#1364](https://github.com/stlink-org/stlink/pull/1364), [#1410](https://github.com/stlink-org/stlink/pull/1410), commit [#e493109](https://github.com/stlink-org/stlink/commit/e4931097f887d8a048d1d188388b82ced918cf08))
- Make path to .chip files relative to installation directory on Windows ([#1421](https://github.com/stlink-org/stlink/pull/1421))
- Replaced deprecated cmd to fix package uninstall ([#1426](https://github.com/stlink-org/stlink/pull/1426))
- Fixed compilation error -Wshorten-64-to-32 in stlink-lib/usb.c ([#1427](https://github.com/stlink-org/stlink/pull/1427))
- st-util cannot parse -V and -F options and --freq option results in a segmentation fault ([#1428](https://github.com/stlink-org/stlink/pull/1428), [#1429](https://github.com/stlink-org/stlink/pull/1429))

# v1.8.0

Expand All @@ -44,6 +49,7 @@ This release drops support for macOS and some older operating systems. Check pro
Removed Travis CI integration as it is no longer functional.

Updated system requirements:
- C-Standard: C11 (ISO/IEC 9899:2011)
- `cmake` >= 3.13.0
- `libusb` >= 1.0.22
- `libgtk-dev` >= 3.22.30
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# General cmake settings
###

cmake_minimum_required(VERSION 3.10.2)
cmake_minimum_required(VERSION 3.16.3)
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 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)

Expand Down
16 changes: 6 additions & 10 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,12 @@ There are a few options:
./st-util - usage:
-h, --help Print this help
-vXX, --verbose=XX Specify a specific verbosity level (0..99)
-v, --verbose Specify generally verbose logging
-p 4242, --listen_port=1234
Set the gdb server listen port. (default port: 4242)
-m, --multi
Set gdb server to extended mode.
st-util will continue listening for connections after disconnect.
-n, --no-reset, --hot-plug
Do not reset board on connection.
-h, --help Print this help
-vXX, --verbose=XX Specify a specific verbosity level (0..99)
-v, --verbose Specify general verbose logging
-p 4242, --listen_port=1234 Set the listen port for the gdb server (default: 4242)-
-m, --multi Set gdb server to extended mode. st-util will continue listening for connections after disconnect.
-n, --no-reset, --hot-plug Do not reset board on connection.
```

The STLink device to use can be specified using the --serial parameter.
Expand Down
119 changes: 57 additions & 62 deletions doc/version_support.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
_Source:_ [pkgs.org](https://pkgs.org) - libusb, cmake, gtk, libgtk (as of Apr 2023)

## Supported Operating Systems

### Microsoft Windows

On Windows users should ensure that cmake **3.13.0** or any later version is installed.<br />
On Windows users should ensure that cmake **3.16.3** or any later version is installed.<br />
Up on compiling c-make will **automatically** download and install the latest compatible version of `libusb`.

- Windows 10
Expand All @@ -19,73 +17,70 @@ Actively maintained versions of:
- openSUSE
- OpenMandriva
- Arch Linux
- FreeBSD
- FreeBSD [libusb 1.0.16-18 (API 0x01000102)]
- NetBSD
- OpenBSD

Other Linux-/Unix-based Operating Systems:

| Operating System | libusb | cmake | libgtk-dev | End of<br />OS-Support |
| ------------------------ | ------------------------------ | ---------- | ----------- | ---------------------- |
| 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 | |
| | | | | |
| NetBSD 9.x | 1.0.24 | 3.21.2 | 3.24.30 | |
| NetBSD 8.x | 1.0.24 | 3.**19.7** | 3.24.27 | |
| | | | | |
| CentOS 9 Stream [x64] | 1.0.24 (`libusbx`) | 3.20.3 | 3.24.30 | |
| CentOS 8 Stream [x64] | 1.0.23 (`libusbx`) | 3.20.2 | 3.**22.30** | May 2024 |
| | | | | |
| ALT Linux P10 | 1.0.24 | 3.20.5 | 3.24.31 | |
| ALT Linux P9 | 1.0.**22** | 3.**16.3** | 3.24.29 | |
| | | | | |
| KaOS [x64] | 1.0.24 | 3.22.1 | 3.24.31 | |
| Mageia Cauldron | 1.0.24 | 3.22.1 | 3.24.31 | |
| PCLinuxOS [x64] | (?) | 3.22.1 | 3.24.31 | |
| Solus [x64] | 1.0.24 | 3.22.1 | 3.24.30 | |
| Void Linux | 1.0.24 | 3.22.1 | 3.24.31 | |
| Slackware Current | 1.0.24 | 3.21.4 | 3.24.31 | |
| Adélie 1.0 | 1.0.23 | 3.**16.4** | 3.24.23 | |
| Operating System | libusb | cmake | libgtk-dev | End of<br />OS-Support |
| ------------------------ | -------------------------- | ---------- | ----------- | ---------------------- |
| KaOS [x64] | 1.0.27 | 3.30.2 | 3.24.43 | |
| Void Linux [x64] | 1.0.27 | 3.30.1 | 3.24.42 | |
| CentOS 9 Stream [x64] | 1.0.26 (`libusbx`) | 3.26.5 | 3.24.31 | |
| Mageia 9 [x64] | 1.0.26 | 3.26.4 | 3.24.38 | |
| Solus [x64] | 1.0.26 | 3.24.1 | 3.24.38 | |
| ALT Linux P10 [x64] | 1.0.26 | 3.23.2 | 3.24.32 | |
| PCLinuxOS [x64] | (?) | 3.30.2 | 3.24.38 | |
| | | | | |
| Slackware 15 [x64] | 1.0.**24** | 3.24.1 | 3.24.31 | |
| NetBSD 9.x | 1.0.**24** | 3.**21.2** | 3.24.**30** | |
| Adélie 1.0 | 1.0.**23** | 3.23.5 | 3.24.**30** | |
| 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 | Jan 2026 |


## Unsupported Operating Systems (as of Release v1.8.0)
## Unsupported Operating Systems (as of Release v1.8.1)

Systems with highlighted versions remain compatible with this toolset.

| Operating System | libusb | cmake | End of<br />OS-Support |
| ---------------------------------------- | ------------------------------ | ---------- | ---------------------- |
| Debian 11 (Bullseye) | 1.0.**24** | 3.**18.4** | Jun 2024 (v1.7.0) |
| 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 |
| CentOS / Rocky Linux / AlmaLinux 8 [x64] | 1.0.**23** (`libusbx`) | 3.**20.3** | Dec 2021 |
| Fedora 34 [x64] | 1.0.**24** (`libusbx`) | 3.**19.7** | Jun 2022 |
| OpenMandriva Lx 4.2 | 1.0.**24** | 3.**19.3** | Mar 2023 |
| Mageia 8 | 1.0.**24** | 3.**19.2** | Aug 2022 |
| Alpine 3.13 | 1.0.**24** | 3.**18.4** | Nov 2022 |
| Ubuntu 21.04 (Hirsute) | 1.0.**24** | 3.**18.4** | Jan 2022 |
| Fedora 33 [x64] | 1.0.**23** (`libusbx`) | 3.**18.3** | Nov 2021 |
| Alpine 3.12 | 1.0.**23** | 3.**17.2** | May 2022 |
| openSUSE Leap 15.3 [x64] | 1.0.21 | 3.**17.0** | Dec 2022 |
| Fedora 32 [x64] | 1.0.**23** (`libusbx`) | 3.**17.0** | May 2021 |
| openSUSE Leap 15.2 [x64] | 1.0.21 | 3.**17.0** | Dec 2021 |
| Ubuntu 20.10 (Groovy) | 1.0.**23** | 3.**16.3** | Jul 2021 |
| NetBSD 7.x | 1.0.**22** | 3.**16.1** | Jun 2020 |
| Alpine 3.11 | 1.0.**23** | 3.**15.5** | Nov 2021 |
| FreeBSD 11.x | 1.0.**16-18** (API 0x01000102) | 3.**15.5** | Sep 2021 |
| Alpine 3.10 | 1.0.**22** | 3.**14.5** | May 2021 |
| Fedora 31 [x64] | 1.0.**22**(`libusbx`) | 3.**14.5** | Nov 2020 |
| Mageia 7.1 | 1.0.**22** | 3.**14.3** | Jun 2021 |
| Fedora 30 | 1.0.**22**(`libusbx`) | 3.**14.2** | May 2020 |
| Ubuntu 19.10 (Eoan) | 1.0.**23** | 3.**13.4** | Jul 2020 |
| Alpine 3.9 | 1.0.**22** | 3.**13.0** | Jan 2021 |
| Debian 10 (Buster) | 1.0.**22** | 3.**13.4** | Jun 2024 (v1.7.0) |
| Ubuntu 18.04 LTS (Bionic) | 1.0.21 | 3.10.2 | Apr 2023 |
| openSUSE Leap 15.1 [x64] | 1.0.21 | 3.10.2 | Jan 2021 |
| Debian 9 (Stretch) | 1.0.21 | 3.7.2 | Jun 2022 |
| Slackware 14.2 | 1.0.20 | 3.5.2 | |
| OpenMandriva Lx 3.0x | 1.0.20 | 3.4.2 | |
| CentOS / Rocky Linux / AlmaLinux 7 [x64] | 1.0.21 (`libusbx`) | 2.8.12.2 | Jun 2024 |
| 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 |
| Fedora 34 [x64] | 1.0.**24** (`libusbx`) | 3.**19.7** | Jun 2022 |
| NetBSD 8.x | 1.0.**24** | 3.**19.7** | May 2024 |
| OpenMandriva Lx 4.2 | 1.0.**24** | 3.**19.3** | Mar 2023 |
| Mageia 8 | 1.0.**24** | 3.**19.2** | Aug 2022 |
| Debian 11 (Bullseye) | 1.0.**24** | 3.**18.4** | Jun 2024 |
| Alpine 3.13 | 1.0.**24** | 3.**18.4** | Nov 2022 |
| Ubuntu 21.04 (Hirsute) | 1.0.**24** | 3.**18.4** | Jan 2022 |
| CentOS / Rocky Linux / AlmaLinux 8 [x64] | 1.0.**23** (`libusbx`) | 3.**20.3** | Dec 2021 |
| CentOS 8 Stream [x64] | 1.0.**23** (`libusbx`) | 3.**20.2** | May 2024 |
| Fedora 33 [x64] | 1.0.**23** (`libusbx`) | 3.**18.3** | Nov 2021 |
| Alpine 3.12 | 1.0.**23** | 3.**17.2** | May 2022 |
| openSUSE Leap 15.3 [x64] | 1.0.21 | 3.**17.0** | Dec 2022 |
| Fedora 32 [x64] | 1.0.**23** (`libusbx`) | 3.**17.0** | May 2021 |
| openSUSE Leap 15.2 [x64] | 1.0.21 | 3.**17.0** | Dec 2021 |
| Ubuntu 20.10 (Groovy) | 1.0.**23** | 3.**16.3** | Jul 2021 |
| NetBSD 7.x | 1.0.22 | 3.16.1 | Jun 2020 |
| Alpine 3.11 | 1.0.**23** | 3.15.5 | Nov 2021 |
| FreeBSD 11.x | 1.0.16-18 (API 0x01000102) | 3.15.5 | Sep 2021 |
| ALT Linux P9 | 1.0.22 | 3.**16.3** | |
| Alpine 3.10 | 1.0.22 | 3.14.5 | May 2021 |
| Fedora 31 [x64] | 1.0.22 (`libusbx`) | 3.14.5 | Nov 2020 |
| Mageia 7.1 | 1.0.22 | 3.14.3 | Jun 2021 |
| Fedora 30 | 1.0.22 (`libusbx`) | 3.14.2 | May 2020 |
| Ubuntu 19.10 (Eoan) | 1.0.**23** | 3.13.4 | Jul 2020 |
| Alpine 3.9 | 1.0.22 | 3.13.0 | Jan 2021 |
| Debian 10 (Buster) | 1.0.22 | 3.13.4 | Jun 2024 |
| Ubuntu 18.04 LTS (Bionic) | 1.0.21 | 3.10.2 | Apr 2023 |
| openSUSE Leap 15.1 [x64] | 1.0.21 | 3.10.2 | Jan 2021 |
| Debian 9 (Stretch) | 1.0.21 | 3.7.2 | Jun 2022 |
| Slackware 14.2 | 1.0.20 | 3.5.2 | Jan 2024 |
| OpenMandriva Lx 3.0x | 1.0.20 | 3.4.2 | Jul 2019 |
| CentOS / Rocky Linux / AlmaLinux 7 [x64] | 1.0.21 (`libusbx`) | 2.8.12.2 | Jun 2024 |

_All other operating systems which are not listed are unsupported._
2 changes: 1 addition & 1 deletion src/st-util/gdb-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ char* make_memory_map(stlink_t *sl) {
snprintf(map, sz, memory_map_template_H72x3x,
sl->flash_size,
sl->flash_pgsz);
} else {
} else {
snprintf(map, sz, memory_map_template,
sl->flash_size,
sl->sram_size,
Expand Down
14 changes: 7 additions & 7 deletions src/stlink-gui/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@ static gpointer stlink_gui_populate_filemem_view(gpointer data) {

if (gui->file_mem.memory) { g_free(gui->file_mem.memory); }

goffset file_size = g_file_info_get_size(file_info);
goffset file_size = g_file_info_get_size(file_info);

if ((0 > file_size) && ((goffset)G_MAXSIZE <= file_size)) {
stlink_gui_set_info_error_message(gui, "File too large.");
goto out_input;
}
if ((0 > file_size) && ((goffset)G_MAXSIZE <= file_size)) {
stlink_gui_set_info_error_message(gui, "File too large.");
goto out_input;
}

gui->file_mem.size = file_size;
gui->file_mem.memory = g_malloc(gui->file_mem.size);
Expand All @@ -344,8 +344,8 @@ static gpointer stlink_gui_populate_filemem_view(gpointer data) {
gui->progress.fraction = (gdouble)(off + n_read) / gui->file_mem.size;
}

out_input: g_object_unref(input_stream);
out: g_object_unref(file);
out_input: g_object_unref(input_stream);
out: g_object_unref(file);
}

g_idle_add((GSourceFunc)stlink_gui_update_filemem_view, gui);
Expand Down
28 changes: 14 additions & 14 deletions src/stlink-lib/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ uint32_t time_ms() {
}

int32_t arg_parse_freq(const char *str) {
int32_t value = -1;
if (str != NULL) {
char* tail = NULL;
value = strtol(str, &tail, 10);
if (tail != NULL) {
if (tail[0] == 'M' && tail[1] == '\0') {
value = value*1000;
}
else if (tail[0] != '\0' && !(tail[0] == 'k' && tail[1] == '\0')) {
value = -1; /* error */
}
}
}
return value; /* frequency in kHz */
int32_t value = -1;
if (str != NULL) {
char* tail = NULL;
value = strtol(str, &tail, 10);
if (tail != NULL) {
if (tail[0] == 'M' && tail[1] == '\0') {
value = value*1000;
}
else if (tail[0] != '\0' && !(tail[0] == 'k' && tail[1] == '\0')) {
value = -1; // error
}
}
}
return value; // frequency in kHz
}
2 changes: 1 addition & 1 deletion src/stlink-lib/option_bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int32_t stlink_write_option_bytes_f0(stlink_t *sl, stm32_addr_t addr, uin
int32_t ret = 0;

if (len < 12 || addr != STM32_F0_OPTION_BYTES_BASE) {
WLOG("Only full write of option bytes area is supported\n");
WLOG("Only full write of option bytes area is supported\n");
return -1;
}

Expand Down
Loading

0 comments on commit 226e533

Please sign in to comment.