General Project Update

- Updated CHANGELOG.md
- Updated README.md
- Minor fixes & updates in documentation.
pull/1332/head
nightwalker-87 2023-09-02 17:18:09 +02:00
rodzic 682ec389b7
commit 7475ec7f30
5 zmienionych plików z 22 dodań i 123 usunięć

Wyświetl plik

@ -37,6 +37,7 @@ Updates & changes:
- [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))
@ -51,9 +52,13 @@ Updates & changes:
- [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))
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))
@ -84,9 +89,11 @@ Fixes:
- 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))
- 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))
- 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))
# v1.7.0
@ -98,7 +105,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), [#1184](https://github.com/stlink-org/stlink/pull/1184))
- 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))

Wyświetl plik

@ -78,7 +78,12 @@ We recommend to install `stlink-tools` from the package repository of the used d
- Alpine Linux: [(Link)](https://pkgs.alpinelinux.org/packages?name=stlink)
- Fedora: [(Link)](https://src.fedoraproject.org/rpms/stlink)
- FreeBSD: Users can install from [freshports](https://www.freshports.org/devel/stlink)
- MacOS: **Support for macOS will end with v1.8.0.** Please use v1.7.0 (current ***master*** branch) and the related documentation instead.
**macOS**:
**Support for macOS will be 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)

Wyświetl plik

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

Wyświetl plik

@ -202,4 +202,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

@ -36,9 +36,9 @@ Copy data from source to destination, after which trigger a breakpint to exit. B
Before every copy, read a word from FLASH_CR, set the PG bit to 1 and write back. Copy one half word each time.
How to wait for the write process: read a word from FLASH_SR, loop until the busy bit is reset. After that, FLASH_SR is check. The process is interrupted if the error bit (0x04) is set.
How to wait for the write process: Read a word from FLASH_SR, loop until the busy bit is reset. After that, FLASH_SR is checked. The process is interrupted if the error bit (0x04) is set.
Exit: after the copying process and before triggering the breakpoint, clear the PG bit in FLASH_CR.
Exit: After the copying process and before triggering the breakpoint, clear the PG bit in FLASH_CR.
## stm32f4.s
@ -54,7 +54,7 @@ Exit: after the copying process and before triggering the breakpoint, clear the
Copy one word each time.
How to wait for the write process: read a word from FLASH_SR, loop until the busy bit is reset.
How to wait for the write process: Read a word from FLASH_SR, loop until the busy bit is reset.
## stm32f4lv.s
@ -103,121 +103,6 @@ Copy one word each time. No wait for write.
**Special Requirements**:
Copy one double word each time (More than one registers are allowed).
Copy one double word each time (More than one register is allowed).
How to wait for the write process: read a half word from `FLASH_BSY`, loop until the busy bit is reset.
# 净室工程文档-原始中文版 (out of date)
代码位于的section`.text`
编译制导添加`.syntax unified`
传入参数约定:
参数全部通过寄存器传递
`r0`: 拷贝源点起始地址
`r1`: 拷贝终点起始地址
`r2`: 拷贝word4字节数(存在例外)
程序功能:将数据从源点拷贝到终点,在拷贝完毕后触发断点以结束执行,结束时`r2`值需清零表明传输完毕。
限制:不可使用栈,可自由使用的临时寄存器为`R3`到`R12`。`R13`为`sp`stack pointer`R14`为lr一般用于储存跳转地址`R15`为`pc`program counter
要求每完成一次拷贝需等待flash完成写入单次拷贝宽度、检查写入完成的方式见每个文件的具体要求。
特殊地址`flash_base`存放地址需2字节对齐。
## stm32f0.s
特殊地址定义:`flash_base`:定义为0x40022000
`FLASH_CR`: 相对`flash_base`的offset为16
`FLASH_SR`: 相对`flash_base`的offset为12
参考:[https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f0.h](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f0.h)
[https://www.st.com/resource/en/reference_manual/dm00031936-stm32f0x1stm32f0x2stm32f0x8-advanced-armbased-32bit-mcus-stmicroelectronics.pdf](https://www.st.com/resource/en/reference_manual/dm00031936-stm32f0x1stm32f0x2stm32f0x8-advanced-armbased-32bit-mcus-stmicroelectronics.pdf)
特殊要求:
每次拷贝开始前需要读出FLASH_CR处的4字节内容将其最低bit设置为1写回FLASH_CR。
每次写入数据宽度为2字节半字
每完成一次写入需等待flash完成写入检查方式为读取FLASH_SR处4字节内容若取值为1则说明写入尚未完成需继续轮询等待否则需要检查FLASH_SR处值是否为4若非4则应直接准备退出。
退出全部拷贝执行完毕后触发断点前将FLASH_CR处4字节内容最低bit清为0写回FLASH_CR。
## stm32f4.s
特殊地址定义: `flash_base`定义为0x40023c00
`FLASH_SR`:相对flash_base的offset为0xe14
参考:[https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f4.h](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f4.h)
[https://www.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf](https://www.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf)
特殊要求:
每次写入的数据宽度为4字节
每完成一次写入需等待flash完成写入检查方式为读取FLASH_SR处2字节内容若取值为1则说明写入尚未完成需继续轮询等待。
## stm32f4lv.s
特殊地址定义:`flash_base`定义为0x40023c00
`FLASH_SR`:相对`flash_base`的offset为0xe (14)
参考:[https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f4.h](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f4.h)
[https://www.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf](https://www.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf)
特殊要求:
每次写入的数据宽度为1字节1/4字
每完成一次写入需等待flash完成写入检查方式为读取FLASH_SR处2字节内容若取值为1则说明写入尚未完成需继续轮询等待。
## stm32f7.s
参考:[https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f7.h](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f7.h)
[https://www.st.com/resource/en/reference_manual/dm00124865-stm32f75xxx-and-stm32f74xxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf](https://www.st.com/resource/en/reference_manual/dm00124865-stm32f75xxx-and-stm32f74xxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf)
要求同stm32f4.s额外要求在每次拷贝执行完毕、flash写入成功检测前执行`dsb sy`指令以建立内存屏障。
## stm32f7lv.s
参考:[https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f7.h](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32f7.h)
[https://www.st.com/resource/en/reference_manual/dm00124865-stm32f75xxx-and-stm32f74xxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf](https://www.st.com/resource/en/reference_manual/dm00124865-stm32f75xxx-and-stm32f74xxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf)
要求基本同stm32f7.s差异要求为每次写入的数据宽度为1字节1/4字
## stm32l0x.s
特殊要求:
每次写入的数据宽度为4字节
无需实现检查flash写入完成功能
## stm32l4.s
例外:`r2` 拷贝双字8字节
特殊地址定义:`flash_base`: 0x40022000
`FLASH_BSY`相对flash_base的offset为0x12
参考:[https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32l4.h](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/chip/stm32/registers-stm32l4.h)
[https://www.st.com/resource/en/reference_manual/dm00310109-stm32l4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf](https://www.st.com/resource/en/reference_manual/dm00310109-stm32l4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf)
拷贝方式一次性拷贝连续的8个字节使用两个连续寄存器作中转并写入
每完成一次写入需等待flash完成写入检查方式为读取FLASH_BSY处半字2字节若其最低位非1可继续拷贝。
## stm32lx.s
要求与stm32l0x.s相同
How to wait for the write process: read a half word from `FLASH_BSY`, loop until the busy bit is reset.