Porównaj commity

...

359 Commity

Autor SHA1 Wiadomość Data
nightwalker-87 40948aa3de Merge remote-tracking branch 'origin/develop' 2024-02-01 00:01:58 +01:00
nightwalker-87 133c2564de Release v1.8.0 2024-02-01 00:00:02 +01:00
nightwalker-87 926e7efe4c General Project Update
- Updated build script for Windows
- [doc] Updated documentation on:
--> compile instructions
--> release preparation steps
--> list of supported devices
--> OS version support status
2024-01-30 23:40:04 +01:00
nightwalker-87 b05a117204 Merge branch 'testing' into develop 2024-01-21 15:02:17 +01:00
nightwalker-87 32e8dcc8b5 [doc] Updated tutorial: Access to the UART via a virtual COM port
(Closes #1334)
2024-01-21 14:43:22 +01:00
nightwalker-87 0145baeb2e Fixed memory alignment for STM32L5/U5/H5 chips
(Closes #1362)
2024-01-20 13:00:52 +01:00
nightwalker-87 ae78d3639d Merge branch 'testing' into develop 2023-12-25 14:41:52 +01:00
nightwalker-87 8c581c3eec Updated CHANGELOG.md 2023-12-25 14:40:10 +01:00
nightwalker-87 816730f4f7 [refactoring] Clean-up & bugfix for st-trace 2023-12-24 19:15:03 +01:00
nightwalker-87 45c31e9169 Added interface for spdlog (optional) 2023-12-24 12:26:01 +01:00
nightwalker-87 e7f41b2965 Support for STLINK/v2 & /v3 max trace buffers 2023-12-24 12:08:08 +01:00
nightwalker-87 c1efbec7a7 Fixed incorrect chip-ID for STM32C01x MCU 2023-12-24 11:47:51 +01:00
nightwalker-87 5613f281c5 Fixed compilation error. 2023-12-24 00:46:56 +01:00
nightwalker-87 a60c24cbc0 General Project Update
- [doc] Updated system requirements
- Updated CHANGELOG.md
- Updated list of contributors
2023-12-24 00:34:29 +01:00
nightwalker-87 135a5472d9 Reverted commit ba335a47
"STM32F76xxx: Added flashing in dual bank mode"
2023-12-24 00:01:35 +01:00
nightwalker-87 81575cb2d9 [doc] Updated udev directory (#1358) 2023-12-23 17:45:17 +01:00
nightwalker-87 8f2b289f20 Info on HW breakpoints for external bus
- [doc] Updated tutorial.md (Closes #1219)
- Moved memory maps into separate file.
2023-11-27 23:41:27 +01:00
nightwalker-87 ba335a47ab STM32F76xxx: Added flashing in dual bank mode
(Closes #1174)
2023-11-27 22:00:27 +01:00
nightwalker-87 4637b1497b Merge branch 'develop' into testing 2023-11-24 20:38:03 +01:00
nightwalker-87 3efa7932fb Fixed memory allocation for stlink-gui
(Closes #1356)
2023-11-24 20:22:50 +01:00
nightwalker-87 7dcb1302d8 Fixes for STM32H7 & STM32G0B1 devices
- Fixed flash lock for STM32H7 dual bank devices
- Fixed flash erase issue on STM32G0B1 (Closes #1321)
2023-11-24 18:21:31 +01:00
nightwalker-87 509d60efe4
Merge pull request #1355 from marcelobarrosufu/develop
Fixed support for STM32U5 chips.
2023-11-23 20:16:22 +01:00
nightwalker-87 ed558c9ac7
Merge branch 'develop' into develop 2023-11-23 20:12:57 +01:00
nightwalker-87 e212349460
Merge pull request #1354 from rcubee/c0
Added support for STM32C0x1.
2023-11-23 20:10:31 +01:00
nightwalker-87 fb141d40d7
Merge pull request #1353 from mirkomatonti/mirko-otp_read_write
First Implementation of the OTP Read/Write function
2023-11-23 20:08:15 +01:00
Mirko Matonti 033007fd27 pr adjustment 2023-11-23 17:46:09 +00:00
nightwalker-87 0d16dbac9a CodeQL Workflow Maintenance
- Removed incompatible workflow
- Updated existing workflow
2023-11-22 01:13:44 +01:00
nightwalker-87 3e18d9d3b7
Merge pull request #1349 from IVOES/develop
Add CodeQL Workflow for Code Security Analysis
2023-11-15 23:43:10 +01:00
rcubee cf840b5f3d fixed formatting 2023-11-14 17:38:12 +01:00
rcubee 3fd7140524 forgot to include these 2023-11-14 17:30:00 +01:00
Marcelo Barros de Almeida 5df53adb2c Missing swo and dualback flags in U6 chip models 2023-11-14 07:39:56 -03:00
Marcelo Barros de Almeida e286f243ef Fixing support for U5 chips (original U5x5.chip was not handling all U5 chips ) 2023-11-14 00:27:19 -03:00
rcubee 4a7b8cdb26 removed the patch file itself 2023-11-11 18:19:04 +01:00
rcubee eb083ae753 removed redundant lines 2023-11-11 17:40:28 +01:00
rcubee 99a2be4d28 initial commit 2023-11-11 17:27:05 +01:00
Mirko e122764f21 forgot to include this 2023-11-08 22:58:05 +00:00
Mirko 3cb15d7da2 final 2023-11-08 15:14:19 +00:00
Mirko b1d99a2fc2 cleaning ident 2023-11-08 15:04:10 +00:00
Mirko 2d21188cdc first commit 2023-11-08 14:51:19 +00:00
Brian abf354a155 Add CodeQL Workflow for Code Security Analysis
Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
- Runs daily.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for git submodules, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).

Signed-off-by: Brian <bayuan@purdue.edu>
2023-10-29 15:28:16 -04:00
Brian b9a0a49a54 Add CodeQL Workflow for Code Security Analysis
Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
- Runs daily.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for git submodules, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).

Signed-off-by: Brian <bayuan@purdue.edu>
2023-10-20 01:02:15 -04:00
Brian ed8fa62d09 Add CodeQL Workflow for Code Security Analysis
Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
- Runs daily.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for git submodules, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).

Signed-off-by: Brian <bayuan@purdue.edu>
2023-10-18 16:49:46 -04:00
nightwalker-87 31c7fc6f8a
Merge pull request #1343 from shysaur/zero-voltage-factor-fix
Do not crash when the STLink chip returns a voltage factor of zero.
2023-10-15 23:04:47 +02:00
Daniele Cattaneo 3387ca5b42 Do not crash when the STLink chip returns a voltage factor of zero. 2023-10-14 17:57:32 +02:00
Brian df7c7d2172 Add CodeQL Workflow for Code Security Analysis
Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every push and pull request to the main branch.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for third-party code, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation.

Signed-off-by: Brian <bayuan@purdue.edu>
2023-10-11 19:55:50 -04:00
nightwalker-87 40fbdb4112
Merge pull request #1333 from fliiiix/bugfix/printf-format
Fix printf format to print 0 correctly
2023-09-16 12:35:24 +02:00
nightwalker-87 956d654096
Merge pull request #1332 from stlink-org/testing
Merge branch `testing` into `develop`
2023-09-16 12:34:15 +02:00
nightwalker-87 a0c0216108 Updated behaviour on Reset
Fixes an issue where early breakpoints did not trigger.
(Closes #1198) (Closes #1246) (Closes #1319)
2023-09-14 11:35:35 +02:00
fliiiix 23d52b92ae Prefix all CDB bytes with 0x, including zeros 2023-09-04 18:48:41 +02:00
nightwalker-87 fd8d8e6139
Merge branch 'develop' into testing 2023-09-02 17:35:59 +02:00
nightwalker-87 7475ec7f30 General Project Update
- Updated CHANGELOG.md
- Updated README.md
- Minor fixes & updates in documentation.
2023-09-02 17:18:09 +02:00
nightwalker-87 f3fcaf2553
Merge pull request #1330 from andars/fix-some-stm32l0-flashing-issues
Fixed some flashing issues on STM32L0.
2023-09-01 22:50:35 +02:00
nightwalker-87 99925c687b
Merge pull request #1327 from ArmoredPony/develop
Fixed unknown option -u in st-util.
2023-09-01 22:47:58 +02:00
nightwalker-87 0915ee9dca
Merge pull request #1325 from gollux/install-paths
CMake: Avoid hard-wired /usr/local/share
2023-09-01 22:41:46 +02:00
andrew 1861b8dc9f Fix stm32lx flash loader on STM32L0
STM32L0 chips use loader_code_stm32lx, but this flash loader is built
for armv7-m and uses instructions that are unsupported on STM32L0 (which
have Cortex M0+ cores implementing armv6-m).

In particular, loader_code_stm32lx uses variants of add-immediate that
do not update the condition flags ( `add r0, r0, #4` ). These are 32bit
instructions in armv7-m and are not available in armv6-m.

Enable loader_code_stm32lx to run on both armv6-m and armv7-m by
building for armv6-m, which requires changing the `add` instructions to
`adds` instructions that do update condition flags (which is ok because
the subs updates the condition flags again before the branch).
2023-08-27 13:34:00 -07:00
andrew 2e6cf7d806 Fix use of uninitialized flash_loader_t in stm32l1_write_half_pages
stm32l1_write_half_pages uses a local flash_loader_t that is never
initialized.

This results in stlink_flash_loader_run using uninitialized values for
fl->buf_addr and fl->loader_addr when copying the buffer
and initializing the source register and PC before running the core to
execute the flashloader.

Pass the flash_loader_t from stlink_flashloader_write through to
stm32l1_write_half_pages and use that one instead of an uninitialized
local structure.
2023-08-27 13:33:57 -07:00
ArmoredPony 270efb3535 fixed unknown option -u 2023-08-16 18:05:37 +04:00
Martin Mares 4b69bdd3e9 CMake: Avoid hard-wired /usr/local/share
Instead of defining own CMAKE_INSTALL_SHAREDIR, use existing
CMAKE_INSTALL_FULL_DATADIR.

This way, CMAKE_INSTALL_PREFIX is respected.
2023-08-15 12:45:30 +02:00
nightwalker-87 f7fb0a6caa
Merge pull request #1318 from miaobuao/patch-1
Updated package source link for Arch Linux
2023-07-09 00:44:39 +02:00
nightwalker-87 682ec389b7 [doc] Corrected compiling manual
(Closes #1317)
2023-07-09 00:38:49 +02:00
Meo 457d971a40
Update README.md 2023-07-03 09:59:26 +08:00
nightwalker-87 2f27e8ec98 Fixed chip recovery after reset
(Closes #1260)
2023-06-27 08:24:09 +02:00
nightwalker-87 8fad9be9d0 [refactoring] Clean-up for stlink-lib
- Moved declarations for read/write functions to read_write.h .
- Checked & revised header includes
- Changed some datatypes for write_buffer_to_sram() to avoid explicit
casting.
2023-06-25 15:45:33 +02:00
nightwalker-87 041517bd4a Fixed flashing on STM32G0/G4 dual bank devices
(Closes #1310)
2023-06-25 15:31:13 +02:00
nightwalker-87 101d77bf7e Formatting & style fixes. 2023-06-24 23:55:12 +02:00
nightwalker-87 d4b53b06b6
Merge pull request #1315 from stlink-org/testing
Merge branch `testing` into `develop`
2023-06-19 23:48:26 +02:00
nightwalker-87 b72f5b5acf Fixed compilation on Windows
- [doc] Updated installation instructions
- Fixed cmd bug in mingw64-build.bat
- Fixed cmake building for WIN32
2023-06-12 11:56:21 +02:00
nightwalker-87 2c337615c9 [refactoring] Clean-up for stlink-flash & -info
- Ensure proper function declaration
- Checked & revised header includes
2023-06-11 14:29:23 +02:00
nightwalker-87 5d3f3ec7f4 Set flash_type for STM32H5 devices 2023-06-10 21:37:01 +02:00
nightwalker-87 755c20c08e Replace data types with fixed width typedefs (C99)
- Unified variable type: size_t --> uint32_t
- Removed unnecessary explicit casts
- Minor formatting fixes
2023-06-10 20:07:19 +02:00
nightwalker-87 efc5c3713d Fixed flash-write/verify error
(Closes #1303)
2023-06-09 14:51:57 +02:00
nightwalker-87 fc990648c4 [refactoring] Clean-up for stlink-lib
- Ensure proper function declaration
- Checked & revised header includes
2023-06-09 12:55:25 +02:00
nightwalker-87 be2e7e3883 [refactoring] Clean-up for stlink-lib
- Ensure proper function declaration
- Moved some functions to related modules
- Checked & revised header includes
- Renamed "md5" to "lib_md5"
- New source file "md5"
2023-06-09 01:28:22 +02:00
nightwalker-87 67ae7a12d8 Added comments for testing modules 2023-06-09 01:16:18 +02:00
nightwalker-87 dbe13dedae [doc] Added header comments for lib modules
- common.c/.h
 - sg.c/.h
 - usb.c/.h
2023-06-07 23:12:00 +02:00
nightwalker-87 c8eaebc58e Improvents for library documentation
- Renamed header file reg.h to register.h
- Added unified header comments for files
- [doc] flash_loader.h: // Static functions
2023-06-07 22:44:59 +02:00
nightwalker-87 92ad99fe35 Minor fixes & additions
- G49x_G4Ax & WLEx: Added dualbank support
- G49x_G4Ax: Added option byte support
- Minor formatting improvements
- Replaced leftovers for non-fixed length types
2023-06-07 22:01:56 +02:00
nightwalker-87 5e85fd0639 Replace data types with fixed width typedefs (C99)
- Unified variable types (Closes #909)
short --> int16_t
unsigned short --> uint16_t
int --> int32_t
unsigned int --> uint32_t
long --> int32_t
unsigned long --> uint32_t
long long --> int64_t
unsigned long long --> uint64_t

- Added missing header includes
2023-05-08 02:05:55 +02:00
nightwalker-87 a9c213958e
Merge pull request #1312 from gemesa/fix-broken-links
[doc] Fixed broken links
2023-05-07 19:40:42 +02:00
Andras Gemes 623570e3cc
Renamed 'supported devices.md' to 'supported_devices.md' 2023-05-07 12:39:03 +02:00
Andras Gemes e4b2594b5a
Fixed broken links 2023-05-05 15:41:07 +02:00
nightwalker-87 b1c4de647c Naming convention for header includes 2023-05-03 14:02:26 +02:00
nightwalker-87 5621d541d9 Resorted #defines in stm32flash.h 2023-05-03 13:55:19 +02:00
nightwalker-87 800c8616fb Unified #define names for STM32 devices 2023-04-30 22:32:59 +02:00
nightwalker-87 823187216a st-flash: auto-reset after mass erase 2023-04-30 20:46:37 +02:00
nightwalker-87 7c2c953ff6 Unified chipid enum naming for L0 series 2023-04-30 19:21:17 +02:00
nightwalker-87 ab286988b4 Corrected preprocessor header includes 2023-04-30 18:52:14 +02:00
nightwalker-87 1775184084 General Project Update
- Updated CHANGELOG.md
- Updated README.md
- Merged flash loader source files
2023-04-30 14:31:50 +02:00
nightwalker-87 01981ad890
Merge pull request #1309 from slyshykO/fix-cmake-else-warn2
Fixed warning in a few *.cmake files.
2023-04-30 12:48:15 +02:00
nightwalker-87 fe939f73b1
Merge branch 'develop' into fix-cmake-else-warn2 2023-04-29 23:16:27 +02:00
nightwalker-87 78b2893e5d
Merge pull request #1307 from IVOES/fix-inconsistent-null-check
Added null check for return value of stlink_chipid_get_params().
2023-04-29 23:15:54 +02:00
nightwalker-87 c48d117d3b
Merge pull request #1306 from IVOES/fix-unbounded-write
Fixed unbounded write and check return values of sscanf.
2023-04-29 23:14:07 +02:00
Oleksiy Slyshyk 222ff47165 fix warn in a few *.cmake 2023-04-28 17:59:47 +03:00
Mingjie Shen 8f97e62708 Check return values of sscanf()
Failing to check that a call to 'scanf' actually writes to an output
variable can lead to unexpected behavior at reading time.
2023-04-22 18:12:36 -04:00
Mingjie Shen 98902c271e Add null check for return value of stlink_chipid_get_params()
Pass a null pointer to "%s" is undefined behaviour.
2023-04-22 00:53:29 -04:00
Mingjie Shen 0a5cad7ee8 Fix unbounded write of sscanf
Format string "%s" that does not control the length of data
written may overflow.
2023-04-22 00:03:54 -04:00
nightwalker-87 8de2b4dcfa
Merge pull request #1302 from signed-log/fix-broken-link
Fixed broken link in documentation.
2023-04-17 23:37:59 +02:00
Nicolas signed-log FORMICHELLA 39f306feaa
Fix broken doc link 2023-04-15 08:02:19 +02:00
nightwalker-87 1745bf5193 [doc] Human-readable flash_type in chip-id files
(Closes #1155)
2023-04-08 02:16:48 +02:00
nightwalker-87 1d301a5498 Fix for option byte read (Closes #1156) 2023-04-07 23:33:28 +02:00
nightwalker-87 8da1ae8b15
Merge pull request #1300 from stlink-org/f2023_1
Initial support for STM32 L5 & U5 devices and minor changes
2023-04-06 20:13:58 +02:00
nightwalker-87 982408e6ee Fixes regarding version support
- Updated version_support.md
- Updated version requirements for libusb
2023-04-05 21:33:49 +02:00
nightwalker-87 5946076723 General maintenance
- Updated pkg-version requirements
- Updated version_support.md
- Removed Ubuntu 18.04 from GH workflow
2023-04-04 23:54:56 +02:00
nightwalker-87 8af1dcb71e Minor changes & fixes
- Simplified listing of supported devices
- Corrected #define STM32L5_PWR_CR1_VOS
- Check the return code of stlink_read_debug32
- Fix for flash register reading on L5x2 devices
2023-04-04 23:32:51 +02:00
nightwalker-87 e93fa5798b Updated CHANGELOG.md 2023-03-19 18:46:22 +01:00
nightwalker-87 21633df34a Minor compilation fixes
- Corrected install path for gui executable
- Changed directory for chip-id files
2023-03-19 15:43:37 +01:00
nightwalker-87 186e38a0fa Minor fixes & additions
- [doc] Update on OS version support
- Minor fixes for G0-series from #1293
- [doc] Added core-IDs for WB/WL-series
- [doc] Correction for G0/L0-series core-IDs
- Set option_size to 128 B for G0-series (#1194)
2023-03-18 21:53:27 +01:00
nightwalker-87 2ff79959f4 Minor fixes & additions
- Corrected flash_pagesize for STM32U5
- Updated STM32 core IDs
- Added chip-id file for STM32H5 devices
2023-03-18 21:19:15 +01:00
nightwalker-87 f875a7f0c9
Merge branch 'develop' into f2023_1 2023-02-14 21:16:21 +01:00
nightwalker-87 c72175133c
Merge pull request #1295 from stlink-org/doc
General fixes and improvements
2023-02-14 20:37:07 +01:00
nightwalker-87 c18293a82e Minor fixes
- Updated Standards-Version for deb-package
- Fix for strcmp(value, "L4") in chipid.c
- Minor formatting fixes
2023-02-13 23:59:11 +01:00
nightwalker-87 1c6b5258ca
Merge branch 'develop' into doc 2023-01-15 14:21:21 +01:00
nightwalker-87 1bec78c428 Updated libusb checksum for WIN32 2023-01-15 14:20:48 +01:00
nightwalker-87 82fb1cc773 Updated header files in CMakeLists.txt 2023-01-15 14:14:25 +01:00
nightwalker-87 b15f0d4d89
Merge branch 'develop' into doc 2023-01-15 01:11:43 +01:00
nightwalker-87 61ff09e527 [doc] End of support for macOS (Closes #1296) 2023-01-14 12:14:35 +01:00
nightwalker-87 6bc70f776a
Merge pull request #1292 from simplerobot/develop
Fixed st-trace reconnect on Windows
2023-01-08 18:01:42 +01:00
nightwalker-87 2a8a36efba Updated GitHub Actions C/C++ CI workflow 2023-01-02 12:21:18 +01:00
nightwalker-87 750a92cdc4 Log message improvements for st-flash 2023-01-02 11:59:26 +01:00
John Hall 54e4bc5251 Updating windows signal handling to not terminate the application before cleanup. 2023-01-01 16:01:58 -08:00
nightwalker-87 893523d74e Updated CHANGELOG.md 2023-01-01 16:27:13 +01:00
nightwalker-87 b60a035404 Initial support for STM32 L5 & U5 devices
(References: #1005 #1096 #1247)
2023-01-01 13:32:14 +01:00
nightwalker-87 f025d756b7 Minor corrections regarding os support 2023-01-01 13:20:02 +01:00
nightwalker-87 dfff59d39f Added support for STM32L4Q5 (Closes #1224) 2022-12-31 14:49:39 +01:00
nightwalker-87 aee9a47e35 General fixes and improvements
- Bugfix: "Failed to parse flash type or unrecognized flash type"
(Closes #1240) (Closes #1242) (Closes #1290) (Closes #1291)
- Updated README.md on OS-support
- Updated version_support.md
- Removed remnants of macOS support in CMakeLists.txt
- Minor code formatting fixes
- Updated CHANGELOG.md
2022-12-30 18:01:06 +01:00
nightwalker-87 c7bcb5213f
Merge pull request #1288 from Phil242/develop
[doc] Added device ID for GD32F303VET6
2022-12-29 23:18:22 +01:00
nightwalker-87 194e6e9c6b General project clean-up
- Removed orphaned old dev-documentation
- Rearranged src files belonging to stlink-lib
- Revised & sorted option byte source code
- Updated devices_boards.md
2022-12-28 22:21:47 +01:00
nightwalker-87 45b846bac7
Merge pull request #1284 from MarcusLindemann/develop
[compilation] Fixed GUI compilation failure on OpenBSD i386
2022-12-28 01:46:22 +01:00
nightwalker-87 5af42f7e8f
Merge pull request #1281 from angiglesias/develop
Added udev-rule rule for the V3 MINIE programmer
2022-12-28 01:39:35 +01:00
nightwalker-87 879e76984e
Merge pull request #1279 from weiminshen99/develop
[compilation] Corrected path to stlink/chips subdirectory
2022-12-18 23:54:49 +01:00
Phil a4105f4ce8
Adding device ID for GD32F303VET6 2022-12-18 16:27:40 +01:00
Marcus Lindemann b669e4bf05 Fix resulting compilation fail on Ubuntu. 2022-12-06 21:52:19 +01:00
Marcus Lindemann 32fc9f11ef Fix resulting compilation error on Ubuntu 2022-12-06 21:41:07 +01:00
Marcus Lindemann 53e9252cc0 Resolve merge conflict for diverging branch.
Explicitely convert from goffset to gsize with prior overflow
check. Implicit conversion is forbidden by compiler settings.
2022-12-06 21:38:55 +01:00
Marcus Lindemann 729e9dbbdc Fix GUI compilation fail on OpenBSD i386
Explicitly convert from goffset to gsize with prior overflow check.
Implicit conversion is forbidden by compiler settings
2022-12-04 20:13:55 +01:00
Marcus Lindemann d063c1159f Fix GUI compilation fail on OpenBSD i386
Explicitely convert from goffset to gsize with prior overflow
check. Implicit conversion is forbidden by compiler settings.
2022-12-04 20:05:53 +01:00
Marcus Lindemann 0149071448 Fix GUI compilation fail on OpenBSD i386
Explicitely convert from goffset to gsize with prior overflow
check. Implicit conversion is forbidden by compiler settings.
2022-12-04 19:48:58 +01:00
Marcus Lindemann 33430783b3 [#1] fFix GUI compilation fail on OpenBSD i386
Explicitely convert from goffset to gsize with prior overflow
check. Implicit conversion is forbidden by compiler settings.
2022-12-04 18:11:51 +01:00
Wingman 44ec93d80c add if-clause for macOS 2022-12-03 05:11:59 -08:00
Angel Iglesias eb35054ea6 config: udev: Add rule for the V3 MINIE programmer 2022-11-22 10:28:49 +01:00
Wingman Shen 0d96e36269
Update README.md 2022-11-13 17:53:59 -08:00
Wingman Shen 89d7a57b38
Update CMakeLists.txt 2022-11-13 17:51:07 -08:00
nightwalker-87 f93adb92f2 Fixes for project compilation
- Cleanup for CMakeLists.txt
- [doc] Added list of cmake path variables
- Fixed stlink-gui install path (Closes #1270) (Closes #1271)
- Replaced path variable for chips directory
2022-10-24 01:49:03 +02:00
nightwalker-87 ff8114895a Corrected sram_size for L496x/L4A6x devices
(Closes #1268)
2022-10-23 20:40:43 +02:00
nightwalker-87 2087711c23 General Project Update
- Updated CHANGELOG.md
- Updated README.md
- Removed support for macOS (Closes #1269)
2022-10-23 20:22:16 +02:00
nightwalker-87 c2db68e0df
Merge pull request #1267 from robertgj/develop
Fix compilation with gcc-12
2022-08-29 22:56:27 +02:00
Robert Jenssen 8835d387f2 Fix compilation with gcc-12 2022-08-29 10:23:59 +10:00
nightwalker-87 43498dedf6 General Project Update
- Closes #1263.
- Updated CHANGELOG.md
- Updated list of contributors
2022-08-27 12:23:02 +02:00
nightwalker-87 3c258a14d7
Merge pull request #1266 from trabucayre/fix_l1_regs
Fixed flash, dbgmcu and rcc registers for STM32L1.
2022-08-26 22:29:15 +02:00
nightwalker-87 a32f2c5714
Merge pull request #1265 from trabucayre/fix_l152re_flash_reg_addr
Fixed flash regs addr for STM32L152RET6 in common_flash.c
2022-08-26 22:28:22 +02:00
nightwalker-87 d66c0cd563
Merge pull request #1259 from jdbruijn/doc/macos-compiling
[doc] Added `make install` to the macOS compiling instructions.
2022-08-26 22:26:53 +02:00
nightwalker-87 8f4e570807
Merge pull request #1254 from bauen1/fix-L4Rx-option-bytes
Added option byte address for L4Rx devices.
2022-08-26 22:26:14 +02:00
Gwenhael Goavec-Merou c94b74e56a stm32l1: fix flash, dbgmcu and rcc registers 2022-08-25 19:18:57 +02:00
Gwenhael Goavec-Merou 0e734a541b src/common_flash: fix flash regs addr for STM32L152RET6 2022-08-22 10:47:05 +02:00
Jeroen de Bruijn 87b21219a2
remove note block from compiling docs note 2022-07-15 08:16:57 +02:00
nightwalker-87 254a525a36
Merge pull request #1252 from simplerobot/john-trace-clock-issues
[st-trace] clock issues
2022-07-14 23:15:46 +02:00
nightwalker-87 172415409b
Merge pull request #1250 from simon-wh/feature/gd32f3_xl_ob
Added support for option bytes to F1xx_XLD (GD32F30x)
2022-07-14 23:12:22 +02:00
Jeroen de Bruijn 9f0521016c
add optional installation folder for macOS to compiling documentation 2022-07-14 16:34:51 +02:00
Jeroen de Bruijn 8956051ed5
add `make install` to the MacOS building instructions
This is required to get the `chips` directory in place. References #1237.
2022-07-14 11:57:01 +02:00
simon-wh 54e82342f9 Fix writing to 'BANK_2' in flash type F1_XL 2022-06-30 17:55:27 +01:00
bauen1 0729558f2c
L4Rx: fix option byte address 2022-06-15 14:28:41 +02:00
John Hall f8d1603be4 Updating to allow frequency units for clock and trace flags.
Making sure trace frequency is not less than 1/5 of the system frequency.
Showing minimum and maximum available trace speed when out of range.
Making sure MCU is stopped after reset to avoid missing data.
Making sure variables are intiallized.
2022-06-08 13:48:13 -07:00
simon-wh 9a7805ede5 Include GD32F303CGT6 in devices_boards.md 2022-05-20 11:02:50 +02:00
simon-wh a5696f2668 Define option byte properties for F1xx_XLD 2022-05-20 11:01:38 +02:00
nightwalker-87 951859c119
Merge pull request #1235 from Sylensky/feature/f401xd_option
Added parametres option_base, option_size for F401xD_xE
2022-05-14 16:43:11 +02:00
nightwalker-87 6870c82a4f
Merge pull request #1234 from Sylensky/feature/chipid-optimization
Optimisation for processing chipid files
2022-05-14 16:42:19 +02:00
Lucas Sinn 8dfb7973e7 made chipfile buffer size bigger 2022-03-28 09:18:30 +02:00
Lucas Sinn 3b328b26bd adding additional check if .chip files contain empty lines 2022-03-16 09:31:19 +01:00
Lucas Sinn 86a37544f1 added option_base, option_size for F401xD_xE 2022-03-14 13:00:07 +01:00
Lucas Sinn a99a626e69 moved dump_a_chip to debug output, minor code style fix 2022-03-14 12:48:47 +01:00
Lucas Sinn 564434297c readded get chipid parameters on print info 2022-03-14 12:47:23 +01:00
Lucas Sinn cb03d5c21d optimized processing of chipidfile
'moved chip dump to stdout instead of stderr'
'closing open fd after file is fully read'
'reduced file read buffer size'
2022-03-08 13:22:46 +01:00
Lucas Sinn a6939cb9d4 init chipids only when actually interacting with device 2022-03-08 11:22:01 +01:00
nightwalker-87 c4762e69a7
Merge pull request #1227 from AlexKlimaj/stm32wl_option_bytes
Added writing and reading for STM32WL option bytes
2022-02-16 21:23:48 +01:00
Alex Klimaj 77fff346aa Add writing and reading STM32WL option bytes 2022-02-16 12:34:37 -07:00
nightwalker-87 468b1d2daa [libusb] Added Security framework for macOS 2022-02-04 22:24:42 +01:00
nightwalker-87 978462d048 Updated libusb to v1.0.25 (macOS + Windows) 2022-02-04 21:53:00 +01:00
nightwalker-87 c2e74c2da3
Merge pull request #1221 from slyshykO/cstd
Set C standard through cmake variables
2022-02-04 19:38:56 +01:00
nightwalker-87 924e1ec93b
Merge pull request #1220 from hydroconstructor/chipid_cleanup-common-c-refactor
[refactoring] sourcefile 'common.c'
2022-02-04 19:37:25 +01:00
Oleksiy Slyshyk cf6bdbfe4b set C standart through cmake variables,
remove redundant -Ox options
2022-01-31 13:01:06 +02:00
nightwalker-87 0011064797 Rolled-back deletion of recent changes 2022-01-30 15:47:55 +01:00
nightwalker-87 a41dd17852 Merge branch 'develop' into chipid_cleanup-common-c-refactor 2022-01-30 15:10:00 +01:00
nightwalker-87 935c6af9b4 Updated description for F1 CL chip 2022-01-30 14:54:46 +01:00
nightwalker-87 849503b76b
Merge pull request #1218 from hydroconstructor/common-c-refactor
Refactoring for sourcefile 'common.c'
2022-01-29 19:40:11 +01:00
nightwalker-87 e2dcf074d5 Fixed defines (CHIPID + COREID) & duplicates 2022-01-29 19:33:19 +01:00
nightwalker-87 d98d3a50ed Minor formatting fixes & clean-up 2022-01-29 18:13:12 +01:00
nightwalker-87 5b320357a6 Minor formatting fixes & clean-up 2022-01-29 17:56:26 +01:00
nightwalker-87 d9e79fe295
Merge branch 'develop' into common-c-refactor 2022-01-28 22:07:34 +01:00
nightwalker-87 1ee98d76e9
Merge branch 'develop' into chipid_cleanup-common-c-refactor 2022-01-28 21:46:40 +01:00
nightwalker-87 e5cc884c7f
Merge pull request #1216 from stlink-org/chipid_cleanup
[refactoring] General maintenance for code structure
2022-01-28 21:39:00 +01:00
hydroconstructor 618a03a5df common c refactor
Try to resolve conflicts with chipid_cleanup branch
2022-01-29 00:36:16 +04:00
nightwalker-87 66f35d1331
Merge pull request #1210 from hydroconstructor/develop
Fix for libusb_kernel_driver_active & error handling for st.st_size
2022-01-23 21:22:15 +01:00
hydroconstructor d0ed1253ce
Update doc/man/st-util.1
Co-authored-by: Grzegorz Szymaszek <gszymaszek@short.pl>
2022-01-23 23:28:07 +04:00
hydroconstructor f6cfd1bfe3 user gszy comment
Comment was:
removing the MAX_FILE_SIZE ifdef/define/endif,
replacing the st.st_size > (off_t)SSIZE_MAX test with st.st_size > (intmax_t) SIZE_MAX,
perhaps removing the sizeof(st.st_size) != sizeof(size_t) test as well.
done here
2022-01-23 23:22:05 +04:00
nightwalker-87 3f5d9bd0f6 Bugfixes and minor additions
- Fixed wrong chip id for F42x_F43x boards.
- Added support note for STM32 clones.
- Minor formatting improvements.
- Updated libusb API_VERSION list.
2022-01-23 13:13:57 +01:00
nightwalker-87 da3d9e3f1e Formatting and whitespace clean-up 2022-01-21 21:31:54 +01:00
hydroconstructor fecd2baeae Refactoring common.c
Added forgotten defines
2022-01-21 23:26:44 +04:00
nightwalker-87 8d96e769f3 Updated device parametres
- Human-readable  FLASH_TYPE in .chip files
- Added enum for STM32_CORE_IDs
2022-01-20 23:19:10 +01:00
hydroconstructor 4ce20d07e0 stlink-org#1216 refactoring of common.c
File divided to some parts. Functions with "flash" in names extracted to common_flash.c, with "option" extracted to option.c etc.
Removed unnecessary headers.
Removed one single function which was used nowhere.
And so on.
Project built under Windows and seems to be working.
2022-01-20 13:46:42 +04:00
hydroconstructor e5ff479d48 #1216 refactoring of common.c
File divided to some parts. Functions with "flash" in names extracted to common_flash.c, with "option" extracted to option.c etc.
Removed unnecessary headers.
Removed one single function which was used nowhere.
And so on.
Project built under Windows and seems to be working.
2022-01-20 12:54:14 +04:00
hydroconstructor 6b229537f6
Merge branch 'stlink-org:develop' into develop 2022-01-20 11:02:12 +04:00
nightwalker-87 80b05c547e Updated MCU core-ids 2022-01-17 00:39:57 +01:00
nightwalker-87 a5d644160b Fixed define names and removed old include. 2022-01-16 20:28:53 +01:00
nightwalker-87 e90ad8c26b
Merge branch 'develop' into chipid_cleanup 2022-01-16 19:57:36 +01:00
nightwalker-87 7509295222 [refactoring] Clean-up for headers & defines
- Removed additional extern "C" linkage specs
- Removed commented sections
- Moved out further device specific defines
- Renamed defines STM32_CHIP_ID_*
2022-01-16 19:31:22 +01:00
nightwalker-87 3be2c70a67 General Project Update
- [doc] Updated system requirements
-> cmake >= 3.10.2
-> libusb >= 1.0.21 (except for FreeBSD)
-> gtk >= 3.22.30
- Updated CHANGELOG.md
- Updated list of contributors
2022-01-16 18:10:01 +01:00
nightwalker-87 c854df5edd Updated MCU core-ids 2022-01-15 01:58:42 +01:00
nightwalker-87 541ab17476
Merge pull request #1213 from antoinefaure/erase
Erase addr size / section of the flash memory with st-flash
2022-01-15 01:49:13 +01:00
Antoine Faure 74957efc9d Factorize address checks 2022-01-14 16:14:17 +13:00
nightwalker-87 2c62079ed1 Removed stlink/v1 support for macOS 10.14 2022-01-14 00:17:44 +01:00
Antoine Faure 8667990506 Allow to completely erase a page when size is not aligned 2022-01-13 11:41:14 +13:00
Antoine Faure a2a04dd1b7 Update log 2022-01-13 09:22:14 +13:00
Antoine Faure 77b3319fc9 Use stlink_erase_flash_section in stlink_write_flash 2022-01-13 09:12:39 +13:00
hydroconstructor 1e7d89fc13 Removing env. var. STLINK_DEVICE from docs
In #1210 from codebase was removed functionality to specify ST-LINK by environment variable. This still mentioned in documentation, so I updated it.
2022-01-10 20:24:29 +04:00
Antoine Faure f277fdb677 Make sure address and size are each aligned with a page 2022-01-10 12:53:44 +13:00
Antoine Faure 8a1535e2d2 Check parameters validity 2022-01-10 12:53:44 +13:00
Antoine Faure d3bf1453fd Get each page size before erasing 2022-01-10 12:53:44 +13:00
nightwalker-87 115f7c846a Transition to new enum stm32_chipids 2022-01-09 23:53:30 +01:00
nightwalker-87 9b07c1dc19 Transition to new enum stm32_flash_type 2022-01-09 22:55:56 +01:00
nightwalker-87 5cde863c03 Switch-over to new chip-files 2022-01-09 21:52:55 +01:00
nightwalker-87 14498bb3c0 Restructuring of STM32 definitions
- Moved enum stlink_stm32_chipids to stm32.h
- Moved additional MCU defines to stlink.h
- Minor formatting improvements
- Commented comparison for old/new chipid db
2022-01-09 16:39:54 +01:00
hydroconstructor b519c63e50 #1214 issue fix
Error in file size comparizon.
Due to type casting, instead of compare file size with max. singed int value, it compares with -1. Then function returns with error message.
2022-01-09 19:02:22 +04:00
Antoine Faure 42790f3f16 st-flash erase addr size 2022-01-07 10:44:31 +13:00
hydroconstructor 4132973ddf usb.c refactoring request: remove getenv("STLINK_DEVICE")
There is no enironment variable "STLINK_DEVICE" in user system, and program do not set it. So I removed all code which works with it.
2022-01-07 00:45:25 +04:00
nightwalker-87 f55dd8d08f [refactoring] Clean-up for chipid files (L1, L4) 2022-01-06 21:24:29 +01:00
nightwalker-87 e62b9e1f2a [refactoring] Clean-up & update for chipid files
- F0, F1, F2, F3, F4, F7
- G0, G4
- H7
- L0, L5, U5
- WB, WL
2022-01-06 19:30:49 +01:00
hydroconstructor ab5c47b6ce Update usb.c (correct typo)
There are 2 calls _stlink_usb_exit_dfu_mode In usb.c (at lines 1284 and 1293) and no single call _stlink_usb_exit_debug_mode. Apparently typo on line 1293
2022-01-06 20:19:01 +04:00
hydroconstructor 89f54e0884 Update usb.c 2022-01-05 13:51:47 +04:00
nightwalker-87 5c303b3165 Merge branch 'develop' into 'chipid_cleanup' 2022-01-02 22:54:07 +01:00
nightwalker-87 0d02a46a8f [refactoring] Clean-up for chipid files
- Spelling fix in tutorial.md
- REN param description --> dev_type
- ADD param ref_manual_id
- CHNG stlink_chipid_params
- MV old chipids to chipid_db_old.h
- Updated chipid files (F1, F2, WB, WLE)
2022-01-02 22:51:30 +01:00
nightwalker-87 7cc1fdae6b
Merge pull request #1207 from Crest/freebsd
Included SSIZE_MAX from limits.h in src/common.c
2022-01-01 20:26:18 +01:00
nightwalker-87 2b106912c9 Added user review to README.md 2022-01-01 20:24:59 +01:00
Crest da Zoltral 60edcf811b Include SSIZE_MAX from limits.h
The existing includes don't pull in limits.h on FreeBSD breaking
the build on FreeBSD.
2021-12-23 20:27:38 +01:00
nightwalker-87 cb0f91a4f9
Merge pull request #1202 from Crest/openbsd
Fixed compliation for OpenBSD 7.0
2021-12-01 12:17:53 +01:00
Jan Bramkamp 8dfebbe589 Define the MINIMUM_API_LEVEL for OpenBSD
Every platform has to declare the minimum libusb API level
required by libstlink on it.
2021-11-24 01:48:12 +01:00
Jan Bramkamp f95aec7994 Teach cmake to find libusb-1.0 port/pkg on OpenBSD
On OpenBSD libusb is provided by the libusb1 port/package.
2021-11-24 01:45:24 +01:00
nightwalker-87 e97f438075
Merge pull request #1197 from c-grant/develop
Updated gdb-server.c to allow external memory access on STM32H73xx
2021-11-06 22:23:15 +01:00
c-grant e94b5db1b4 Update gdb-server.c 2021-11-05 23:45:52 -04:00
c-grant ce8e1c4942 Update gdb-server.c 2021-11-04 21:50:12 -04:00
nightwalker-87 beffed4879
Merge pull request #1188 from andysan/chipid_checks
Improved chipid checks and printouts
2021-09-16 22:34:52 +02:00
nightwalker-87 4d556ce150
Update src/stlink-lib/chipid.c
Co-authored-by: Grzegorz Szymaszek <gszymaszek@short.pl>
2021-09-16 00:57:54 +02:00
Andreas Sandberg b29a740b15 Silence warning chipid files with STLINK_FLASH_TYPE_UNKNOWN
The chipid configuration parser currently emits a warning when it
encounters a file with the flash type set to
STLINK_FLASH_TYPE_UNKNOWN. In practice, this means that the warning
will always be printed since 'unknown_device.chip' uses this
value. Make STLINK_FLASH_TYPE_UNKNOWN a permitted value in the config
file parser.
2021-09-08 22:11:59 +01:00
Andreas Sandberg c676779988 Fix incorrect chipid params comparison
The current chipid params comparison code is based on a simple
memcmp. This doesn't work since the structure contains a string
pointer. Replace it with a simple field-by-field comparison.
2021-09-08 22:10:25 +01:00
Andreas Sandberg 478cf82aed Include flash_size_reg in chipid params dumps 2021-09-08 22:09:24 +01:00
nightwalker-87 deae7975e6
Merge pull request #1186 from pcnorden/patch-1
[doc] Corrected file path in tutorial
2021-09-08 19:50:04 +02:00
nightwalker-87 1c5446a91e
Merge pull request #1185 from andysan/stlink3_nomsd
Added support for STLINK-V3 devices with no MSD
2021-09-08 19:44:08 +02:00
nightwalker-87 32a80be93e
Merge pull request #1183 from slyshykO/msvc-ssize_max
Define 'SSIZE_MAX' if not defined
2021-09-08 19:41:53 +02:00
pcnorden 6471a60460
Changed broken link to new address of udev rules
Changed and checked that it should work with the new link.
Also changed the number of files to 4 since there are 4 udev rule files in the directory.
2021-09-08 17:20:58 +02:00
Andreas Sandberg 95ccd02207 Add support for V3 devices with no MSD
Add support for ST-Link V3 devices without MSD that identify using
USB PID 0x3754. This PID has been observed on a Nucleo board where MSD
was disabled.
2021-09-07 23:15:26 +01:00
Oleksiy Slyshyk 7c582b7526 define SSIZE_MAX if not defined 2021-09-01 07:55:26 +03:00
nightwalker-87 0489af7d4d General Project Update
- [doc] Updated version requirements
- Updated CHANGELOG.md
2021-08-29 18:08:18 +02:00
nightwalker-87 7c4ad1c14d
Merge pull request #1181 from gszy/chip-files
Updated chip config files from the library structs
2021-08-29 16:37:52 +02:00
Grzegorz Szymaszek e51309f842
Update chip config files from the library structs
In general, the chip config files should be kept in sync with the old
library structs. Regenerate the files (using an ad hoc script) from the
current library.

The file name is generated from the chip description, all
non-alphanumeric characters are replaced with underscores. It turns out
some files have to have their names changed.
2021-08-29 15:51:07 +02:00
nightwalker-87 c8fc6561fe Bugfixes
- Corrected paths for chip-id files (Closes #1180)
- Fixed 32-bit build (Closes #985) (Closes #1175)
- Patch for GitHub Actions Workflow (Ubuntu)
2021-08-29 15:08:54 +02:00
nightwalker-87 db8f789400 Merge branch 'develop' of https://github.com/stlink-org/stlink into develop 2021-08-15 15:14:48 +02:00
nightwalker-87 607d1d3b85 General Project Update
- Updated CHANGELOG.md
- Updated list of contributors
2021-08-15 15:14:45 +02:00
nightwalker-87 c758341d52
Merge pull request #1179 from slyshykO/fix-few-msvc-warn
Fixed few warnings for msvc about type conversion with possible lost data
2021-08-15 14:54:42 +02:00
Oleksiy Slyshyk 698b97bbdd fixes printf format formating 2021-08-15 12:30:09 +03:00
Oleksiy Slyshyk bef3321ea4 Fixes few warnings for msvc about type conversion with possible lost data. 2021-08-15 12:18:46 +03:00
nightwalker-87 b433200061
Merge pull request #1178 from slyshykO/fix-copypaste-issue
Removed redundant array
2021-08-14 14:12:10 +02:00
Oleksiy Slyshyk 03153d083c removed redundant array 2021-08-14 10:57:13 +03:00
nightwalker-87 a6d19d794e
Merge pull request #1176 from slyshykO/fix-msvc-build
Fixed compilation for MSVC
2021-08-13 23:15:44 +02:00
Oleksiy Slyshyk e5152c45c3 chipid.c: drop empty lines at end 2021-08-13 23:22:50 +03:00
Oleksiy Slyshyk 9ec951c008 uncrustify chipid.c 2021-08-13 23:18:46 +03:00
Oleksiy Slyshyk 274be86616
Update src/stlink-lib/chipid.c
Co-authored-by: Grzegorz Szymaszek <gszymaszek@short.pl>
2021-08-13 22:40:24 +03:00
nightwalker-87 af384e9693
Update src/stlink-lib/chipid.c
Co-authored-by: Grzegorz Szymaszek <gszymaszek@short.pl>
2021-08-13 21:23:00 +02:00
Oleksiy Slyshyk 41d7ca710e fix compilation for MSVC 2021-08-13 20:02:26 +03:00
nightwalker-87 165776ad41
Merge pull request #1173 from sambazley/stm32wle
Added support for STM32WLEx
2021-08-05 23:23:35 +02:00
nightwalker-87 a93160c784
Merge pull request #1172 from sambazley/pagesize_hex
Corrected flash_pagesize to use hex format
2021-08-05 23:18:44 +02:00
Sam Bazley fe48a98cb1 Add STM32WLEx support 2021-08-01 22:12:56 +01:00
Sam Bazley 1e674cff1a Correct flash_pagesize to use hex format 2021-08-01 22:11:23 +01:00
nightwalker-87 9605d21b5b
Merge pull request #1169 from gszy/fix-parsing-hexs
Fixed parsing hex numbers in chip config files
2021-08-01 13:04:40 +02:00
nightwalker-87 f58e536d43
Merge pull request #1168 from gszy/devices-boards-mkdn-hdrs
Use proper Markdown headers for supported MCUs
2021-08-01 13:03:33 +02:00
nightwalker-87 50069e3500
Merge pull request #1166 from gszy/prevent-segfault-on-null-params
Fixed segfault if chip was not found in chip config files
2021-08-01 13:01:34 +02:00
nightwalker-87 265b716b2b
Merge pull request #1167 from gszy/drop-exec-bit-where-unnecessary
Drop execute bits from source code files
2021-07-31 12:26:30 +02:00
Grzegorz Szymaszek ebac01c8d4
Warn if chip config file contains unrecognized flash type 2021-07-30 10:30:45 +02:00
Grzegorz Szymaszek 929af2b047
Add a constant for the valid flash types range
Add a STLINK_FLASH_TYPE_MAX constant that can be used to check if a
flash type (an integer) is in the range of valid enum stlink_flash_type
values.
2021-07-30 10:14:17 +02:00
Grzegorz Szymaszek e4b17475d1
Fix parsing hex numbers in chip config files
process_chipfile() used to improperly parse hex numbers in chip config
files (*.chip), because it used atoi(), which read all such numbers
as 0. This resulted, among other issues, in chip_id being set to 0 for
all read chips. Such chip id could not match any actual MCU.

Replace the atoi() calls with sscanf(…, "%i", …), where %i should match
integers in base 10, 8 and 16, depending on the number prefix.
2021-07-30 07:50:30 +02:00
Grzegorz Szymaszek b4245eadd0
Use proper Markdown headers for supported MCUs
Use actual level 2 headers[1] instead of emulating them with bold/strong
tags[2].

[1]: https://spec.commonmark.org/0.29/#atx-headings
[2]: https://spec.commonmark.org/0.29/#emphasis-and-strong-emphasis
2021-07-29 16:03:52 +02:00
nightwalker-87 26a63c11a4 [doc] Updated list of devices & boards
(Closes #1164)
2021-07-28 22:03:03 +02:00
Grzegorz Szymaszek 35156b186d
Drop execute bits from source code files 2021-07-28 18:47:25 +02:00
Grzegorz Szymaszek 1dd94a16a8
Do not segfault if cannot find chip in config files
stlink_chipid_get_params() used to segfault on memcmp() when
struct stlink_chipid_params *params was NULL. This could happen if
either:
- there were no chip config files (*.chip), or
- process_chipfile() failed to parse chip_id from the chip config files.
The latter case is caused by the usage of atoi() to parse the chip id.
Since the chip id is stored in hex, atoi() returns 0; such id cannot be
matched to any actual chip.

The segfault occurs on commit a52e1bc548,
in file src/stlink-lib/chipid.c:957
(a52e1bc548/src/stlink-lib/chipid.c (L957)).

Check if params is NULL, in such case, set it to p2, which should not be
NULL as long as struct stlink_chipid_params devices[] exists.

May fix (workaround) #1163.
2021-07-28 18:24:19 +02:00
nightwalker-87 a52e1bc548 Minor bugfixes 2021-07-16 16:00:27 +02:00
nightwalker-87 dc5388d94c Merge branch 'testing' into develop
- Moved chip-specific parameters into separate files (#1129)
- Aligned chip names & references
- General spelling & formatting fixes
- Set of fixes and improvements (#1154)

(Closes #237)
2021-07-16 15:01:13 +02:00
nightwalker-87 6e0dbfe972 Removed Travis CI integration
Free Trial plan is no longer usable as credits are used up.
2021-07-16 14:05:11 +02:00
nightwalker-87 f8b9bac4e5
Merge pull request #1162 from Ant-ON/l152re_fix
Fixed get_stm32l0_flash_base address for STM32L152RE
2021-07-16 11:36:47 +02:00
Anton 2a3c57747f Fixed get flash base address for STM32L152RE 2021-07-15 15:59:35 +05:00
nightwalker-87 61e7109b22
Merge pull request #1159 from c-grant/develop
[STM32H72X/3X]: Added full access to all device memory
2021-07-14 18:45:47 +02:00
c-grant 88398228a7 Update gdb-server.c 2021-07-13 22:10:04 -04:00
nightwalker-87 a2a687873b
Merge pull request #1157 from Ant-ON/l0_soft_loader_fix
Removed limit check for WRITEMEM_32BIT
2021-06-27 12:15:48 +02:00
anton aa70b89b6e WRITEMEM_32BIT: removed checks limit 2021-06-23 22:06:16 +05:00
nightwalker-87 c6ecdac78f
Merge pull request #1154 from Ant-ON/l0_soft_loader_fix
Set of fixes and improvements
2021-06-22 21:09:48 +02:00
nightwalker-87 01418b5666
Merge pull request #1150 from gustavolaureano/develop
Fix for 'libusb_devices were leaked' when no STLINK programmer was found
2021-06-16 12:55:24 +02:00
Gustavo ca896108ee fix for when the device list was not initialized 2021-06-15 20:45:19 +02:00
Gustavo 93db93a0ad fix for 'libusb_devices were leaked' when no stlink was found 2021-06-06 13:03:59 +02:00
nightwalker-87 e571908055 Merge branch 'develop' of https://github.com/stlink-org/stlink into develop 2021-06-03 11:53:32 +02:00
nightwalker-87 15bc572e3f
Merge pull request #1147 from Ant-ON/h7_db_fix
Fixed clearance of the H7 dual bank flag
2021-06-03 11:39:57 +02:00
nightwalker-87 007f39333e Corrected false character in some defines 2021-05-31 23:35:37 +02:00
nightwalker-87 98e0a75d74 Merge branch 'chipid_extend' into 'testing'
(Closes #1145)
2021-05-31 23:06:12 +02:00
nightwalker-87 2e6c909c3e General Project Update
- Removed GitHub-CI VE for Ubuntu 16.04 (deprecated)
- Minor fixes for some comments
2021-05-30 23:51:12 +02:00
Anton 4949c23771
Fixed clear the H7 dual bank flag 2021-05-28 09:04:57 +05:00
nightwalker-87 f7f750b642
Merge pull request #1129 from rewolff/chipid
[refactoring] Moved chip-specific parameters into separate files
2021-05-26 23:57:54 +02:00
nightwalker-87 1d35f95ae0 Updated chip-id descriptions 2021-05-26 23:16:59 +02:00
anton 9acf539c70 Optimizing the half page write fallback 2021-05-26 23:04:39 +05:00
anton 293db13e1d Changed the half page write fallback to 32 bit write mode 2021-05-25 22:25:29 +05:00
anton b93f8b2204 Added half page write fallback for stm32L0/L1 2021-05-24 23:10:26 +05:00
anton 9eb81e1e0a Expanded and revised list of chips 2021-05-24 21:35:02 +05:00
nightwalker-87 4cfbe08515 Merge branch 'chipid' into testing 2021-05-24 12:23:09 +02:00
nightwalker-87 f885091305 General Project Update
- Updated CHANGELOG.md
- Updated GitHub security policy
- [doc] Updated steps for release procedure
- [doc] Updated list of supported OS
- Removed old clang_analyze script
- Minor fix in travis build script
2021-05-24 12:13:56 +02:00
R.E. Wolff 157c587b93 cleanup integer handling in chipid and text flags 2021-05-23 10:50:43 +02:00
R.E. Wolff d5b901b899 removed filename-spaces 2021-05-23 08:52:36 +02:00
R.E. Wolff c87750bde0 merged 2021-05-23 08:49:17 +02:00
R.E. Wolff 90887edb2e removed debug dump 2021-05-23 08:42:36 +02:00
anton cab9fc4210 Improved command error messages 2021-05-22 23:40:36 +05:00
nightwalker-87 7167f7a421 Merge branch 'develop' into testing 2021-05-21 14:58:35 +02:00
nightwalker-87 dbcf4d6b9a Merge branch 'develop' into chipid 2021-05-21 14:56:32 +02:00
nightwalker-87 6405265696
Merge pull request #1144 from djix123/develop
Updated description of chip id 0x0457 to L01x/L02x
2021-05-21 14:53:58 +02:00
nightwalker-87 6923940634 Corrected CHANGELOG.md 2021-05-21 14:50:11 +02:00
Jonathan Giles eafb4d1792 Change description of chip id 0x0457 to L01x/L02x. 2021-05-19 10:40:40 -04:00
nightwalker-87 a9adf9cb29 General Project Update
- Updated CHANGELOG.md
- Updated CI configs for macOS 11 & 10.14
2021-05-18 22:53:33 +02:00
nightwalker-87 c7dd17368a
Merge pull request #1142 from Biswa96/fix-mingw-install
cmake: Install shared libraries in proper directories.
2021-05-18 21:45:44 +02:00
Biswapriyo Nath 553713d911 win32: Fix socket fd type. 2021-05-18 19:47:33 +05:30
Biswapriyo Nath 9d93531ac1 cmake: Install shared libraries in proper directories.
This fixes the installation of DLL file in mingw.
2021-05-18 19:46:45 +05:30
nightwalker-87 620b529956 Aligned naming scheme for chip-ID files 2021-05-16 22:27:14 +02:00
anton 03ad4a434d Added checking the command execution status 2021-05-17 00:20:54 +05:00
nightwalker-87 edc686c12b Merge branch 'develop' into testing 2021-05-16 18:42:05 +02:00
nightwalker-87 f040b2daf8 Merge branch 'develop' into chipid 2021-05-16 18:29:39 +02:00
nightwalker-87 f5ada9474c Merge branch 'testing' into develop 2021-05-16 18:28:44 +02:00
nightwalker-87 ebba0f35e2 General Project Update
- [doc] Updated steps for release procedure
- [doc] Removed outdated lists of supported devices
- [doc] Updated list of supported OS
- [doc] Updated version requirements
- Cleanup  for libusb installation routine on Windows
- Updated list of contributors
- Updated CHANGELOG.md
- Updated README.md
2021-05-16 18:26:52 +02:00
anton 22fba0249f Cleaned up code, made minor fixes 2021-05-15 22:32:57 +05:00
anton 616fd437d4 Removed warning that could mislead the user 2021-05-14 21:49:17 +05:00
anton aa5dd2ccd2 Reworked connection under reset 2021-05-13 23:06:02 +05:00
nightwalker-87 71d1dab620
Merge pull request #1141 from kristiesimpson/feature/stm32f411-optionbytes
Added option byte info for STM32F411XX
2021-05-12 22:24:45 +02:00
nightwalker-87 f96eb5df7d
Merge pull request #1140 from Ji-Peng/develop
Added chip-IDs for STM32G0B0/G0B1/G0C1/G050/G051/G061.
2021-05-11 20:20:53 +02:00
Kristie Simpson f02618c53c Adding option byte info for STM32F411XX 2021-05-11 08:45:05 -06:00
nightwalker-87 48ebad3513
Merge pull request #1112 from 2a17/option_bytes_for_stm32f0
Support for writing option bytes on STM32F0/F1/F3
2021-05-10 21:48:08 +02:00
nightwalker-87 7afa063843 Merge remote-tracking branch 'origin/master' into option_bytes_for_stm32f0 2021-05-10 21:34:14 +02:00
Jipeng Zhang df69dfa93c add chipids of STM32G0B0/G0B1/G0C1/G050/G051/G061 2021-05-09 23:42:00 -07:00
nightwalker-87 db9219be0d Merge branch 'master' into develop 2021-05-04 19:02:16 +02:00
nightwalker-87 afad37cc7e Added Travis CI build test for macOS 10.14 2021-05-03 22:27:27 +02:00
nightwalker-87 a06d13552d General Project Update
- [doc] Minor spelling fixes.
- [doc] Updated tool options in tutorial.md
- [doc] Clean-up in tutorial.md
- Corrected memory size supplements
- [doc] Addtional link on STM32 Clone MCUs
2021-05-02 20:38:40 +02:00
anton 7e7bd7403e Using localtime instead safe variant in case of compiler below C11 2021-04-29 22:47:18 +05:00
R.E. Wolff 7ee9fbcbd3 Added init to other programs 2021-04-28 18:52:43 +02:00
R.E. Wolff cb35f75b9a Merge branch 'chipid' of github.com:rewolff/stlink into chipid 2021-04-28 18:42:15 +02:00
R.E. Wolff 09157fa926 Moved the chips files to our own etc directory. 2021-04-28 18:41:16 +02:00
R.E. Wolff b652bc4854 Chips files in the right place in the sources 2021-04-28 17:31:34 +02:00
anton 939998de76 Fixed security warning 2021-04-27 19:46:28 +05:00
nightwalker-87 1e8333e8ac Fix for failed merge conflict resolve 2021-04-25 20:39:12 +02:00
nightwalker-87 d70f4ee28c
Merge branch 'develop' into chipid 2021-04-25 20:21:09 +02:00
nightwalker-87 eeaef981a5 Re-enabled GitHub Actions CI for Ubuntu 16.04 2021-04-25 19:58:09 +02:00
anton c959f34813 Added support for writing option bytes of F0/F1/F3 targets 2021-04-25 12:34:02 +05:00
anton 498d11b12b Moved the interrupt masking into flash loader init function 2021-04-25 12:25:45 +05:00
anton 2b3a31609c Moved set the PG flag from loader to code 2021-04-25 12:25:15 +05:00
nightwalker-87 c2fd5c6735 Merge remote-tracking branch 'origin/develop' into testing 2021-04-25 01:43:47 +02:00
nightwalker-87 80c31a15a4 General Project Update
- Updated issue templates
- Updated CONTRIBUTING.md (Closes #906)
- Updated changelogs for deb and rpm packages
- Updated CHANGELOG.md
2021-04-25 01:43:12 +02:00
R.E. Wolff e4078b118f removed unnecessary debug statement that didn't work on windows 2021-04-16 21:25:44 +02:00
R.E. Wolff 3279f5abd6 fixed a couple of warnings that macos compiler reports. 2021-04-16 21:15:22 +02:00
R.E. Wolff 9396e4ee1e Added chips.zip 2021-04-16 19:11:57 +02:00
R.E. Wolff 553590b31b chipid in files code 2021-04-16 19:09:06 +02:00
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