Skip to content

Commit b3f9b1a

Browse files
author
bakacai
authored
docs: update project documentation (#17)
1 parent 9f10336 commit b3f9b1a

51 files changed

Lines changed: 742 additions & 104 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/deploy-docs.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- main
88
paths:
99
- 'docs/**'
10+
tags:
11+
- 'v*'
1012
workflow_dispatch:
1113

1214
permissions:
@@ -40,6 +42,12 @@ jobs:
4042
corepack enable
4143
pnpm install --frozen-lockfile
4244
45+
- name: Get version
46+
run: |
47+
RAW_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev")
48+
VERSION=${RAW_VERSION#v}
49+
echo "export const VERSION = '$VERSION'" > docs/src/.vuepress/version.ts
50+
4351
- name: Build documentation
4452
env:
4553
NODE_OPTIONS: --max_old_space_size=8192

‎docs/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules/
33
src/.vuepress/.cache/
44
src/.vuepress/.temp/
55
src/.vuepress/dist/
6+
src/.vuepress/version.ts

‎docs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sftool-gui-docs",
3-
"description": "一个界面友好的SIFLI系列芯片图形化烧录工具",
3+
"description": "一个界面友好的SiFli系列芯片图形化烧录工具",
44
"version": "1.1.3",
55
"license": "Apache-2.0",
66
"type": "module",

‎docs/src/.vuepress/config.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { defineUserConfig } from "vuepress";
2+
import { viteBundler } from "@vuepress/bundler-vite";
23

34
import theme from "./theme.js";
5+
import { VERSION } from "./version.js";
46

57
export default defineUserConfig({
68
base: "/projects/sftool/",
@@ -20,6 +22,14 @@ export default defineUserConfig({
2022

2123
theme,
2224

25+
bundler: viteBundler({
26+
viteOptions: {
27+
define: {
28+
__VERSION__: JSON.stringify(VERSION),
29+
},
30+
},
31+
}),
32+
2333
head: [
2434
[
2535
'script',

‎docs/src/.vuepress/navbar/en.ts‎

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,19 @@ import { navbar } from "vuepress-theme-hope";
22

33
export const enNavbar = navbar([
44
"/en/",
5-
"/en/portfolio",
6-
"/en/demo/",
75
{
8-
text: "Guide",
6+
text: "Getting Started",
97
icon: "lightbulb",
10-
prefix: "/en/guide/",
11-
children: [
12-
{
13-
text: "Bar",
14-
icon: "lightbulb",
15-
prefix: "bar/",
16-
children: ["baz", { text: "...", icon: "ellipsis", link: "#" }],
17-
},
18-
{
19-
text: "Foo",
20-
icon: "lightbulb",
21-
prefix: "foo/",
22-
children: ["ray", { text: "...", icon: "ellipsis", link: "#" }],
23-
},
24-
],
8+
link: "/en/get-started/",
259
},
2610
{
27-
text: "V2 Docs",
28-
icon: "book",
29-
link: "https://theme-hope.vuejs.press/",
11+
text: "Advanced Features",
12+
icon: "fa-solid fa-sitemap",
13+
link: "/en/Feature/",
14+
},
15+
{
16+
text: "FAQs",
17+
icon: "fa-solid fa-comment-dots",
18+
link: "/en/FAQs/",
3019
},
3120
]);

‎docs/src/.vuepress/navbar/zh.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,14 @@ export const zhNavbar = navbar([
77
icon: "lightbulb",
88
link: "/get-started/",
99
},
10-
{
11-
text: "故障排除",
12-
icon: "code",
13-
link: "/Troubleshooting/",
14-
},
1510
{
1611
text: "进阶功能",
1712
icon: "fa-solid fa-sitemap",
1813
link: "/Feature/",
1914
},
2015
{
2116
text: "常见问题",
22-
icon: "fa-solid fa-wrench",
17+
icon: "fa-solid fa-comment-dots",
2318
link: "/FAQs/",
2419
},
2520
]);

‎docs/src/.vuepress/sidebar/en.ts‎

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
11
import { sidebar } from "vuepress-theme-hope";
22

33
export const enSidebar = sidebar({
4-
"/en/": [
5-
"",
6-
"portfolio",
7-
{
8-
text: "Demo",
9-
icon: "laptop-code",
10-
prefix: "demo/",
11-
link: "demo/",
12-
children: "structure",
13-
},
14-
{
15-
text: "Docs",
16-
icon: "book",
17-
prefix: "guide/",
18-
children: "structure",
19-
},
20-
{
21-
text: "Slides",
22-
icon: "person-chalkboard",
23-
link: "https://ecosystem.vuejs.press/plugins/markdown/revealjs/demo.html",
24-
},
25-
],
4+
"/en/get-started/": "structure",
5+
"/en/source-build/": "structure",
6+
"/en/custom/": "structure",
267
});

‎docs/src/.vuepress/theme.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default hopeTheme({
2727
// sidebar
2828
sidebar: enSidebar,
2929

30-
footer: "Default footer",
30+
footer: "Apache-2.0 license | 2019 - 2026 SiFli Technologies(Nanjing) Co., Ltd",
3131

3232
displayFooter: true,
3333

@@ -46,7 +46,7 @@ export default hopeTheme({
4646
// sidebar
4747
sidebar: zhSidebar,
4848

49-
footer: "Apache-2.0 license | 2019 - 2025 思澈科技(南京)有限公司",
49+
footer: "Apache-2.0 license | 2019 - 2026 思澈科技(南京)有限公司",
5050

5151
displayFooter: true,
5252

‎docs/src/FAQs/README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: 常见问题
3-
icon: fa-solid fa-wrench
3+
icon: fa-solid fa-comment-dots
44
---
55

6-
## 敬请期待
6+
## 1. 日志提示“Connected success!”但是“Download stub failed!”
7+
8+
可能是芯片当前处于低功耗模式,此时芯片不会响应串口下载指令,请参考[进阶功能-行为设定](/Feature/README.md#行为设定)将连接前行为改为“软重启”

‎docs/src/Feature/README.md‎

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,77 @@
11
---
22
title: 进阶功能
3-
icon: fa-solid fa-wrench
3+
icon: fa-solid fa-sitemap
44
---
55

6-
## 即将呈现
6+
> sftool-gui 为高级用户提供了深度定制选项,支持自定义硬件驱动及复杂的连接行为控制。
7+
8+
## stub配置
9+
10+
::: info stub 机制说明
11+
sftool 在烧录过程中会先将一段 stub 程序下载至设备 RAM,随后由上位机与该 stub 进行交互,以完成 Flash 的读取、擦除与写入操作。
12+
:::
13+
14+
### 驱动注入与硬件初始化
15+
16+
stub 内置了主流 Flash 驱动。若您的硬件使用了非标准或较新的 Flash 颗粒,需通过此功能手动注入外部驱动:
17+
18+
- Flash 设备:支持额外添加最多 12 组自定义 Flash 驱动,参数配置[参考链接](https://wiki.sifli.com/tools/flash/Flash%E9%85%8D%E7%BD%AE%E6%8C%87%E5%8D%97.html
19+
)。
20+
21+
- SDIO 配置:支持 SDIO 接口配置,适用于 EMMC 或 TF 卡存储介质。
22+
23+
- GPIO 管理:支持定义最多 12 条 GPIO 的高低电平初始化状态。
24+
25+
- PMIC 管理:支持设置 SF30147 电压轨,确保硬件在烧录电压下稳定工作。
26+
27+
### 生效与校验
28+
29+
启用开关:完成配置后,必须在右侧勾选 `应用自定义设置`,否则软件将继续调用内置默认 stub。
30+
31+
配置导入/导出:支持 JSON 格式的配置文件,便于在不同设备间迁移参数。
32+
33+
校验机制:若填写的参数存在逻辑错误(如格式非法),`应用自定义设置` 开关将无法开启。
34+
35+
![](image-1.png)
36+
37+
## 行为设定
38+
39+
您可以根据硬件的实时状态,自定义工具在连接与断开时的特定动作。
40+
41+
![](image-2.png)
42+
43+
### 连接前行为
44+
45+
决定工具在尝试下载 stub 之前的动作:
46+
47+
1. 重启(默认选项)
48+
49+
- 逻辑:先发送复位指令,再执行 stub 下载。
50+
51+
- 场景:适用于设备处于低功耗模式(睡眠)的情况。此时芯片不响应串口下载指令,必须通过复位将其唤醒。
52+
53+
2. 不重启
54+
55+
逻辑:不执行复位动作,直接尝试下载 stub 并建立连接。
56+
57+
3. 不重启且不下载 stub
58+
59+
- 逻辑:直接与内存中已有的 stub 建立二次连接。
60+
61+
- 场景:极速连接模式。若上次断开连接时未重启设备,stub 仍驻留在 RAM 中,开启此项可大幅缩短连接耗时。
62+
63+
### 断开前行为
64+
65+
决定操作完成并点击“断开连接”后的设备状态:
66+
67+
1. 软重启
68+
69+
- 逻辑:断开后立即复位芯片。
70+
71+
- 结果:RAM 中的 stub 会丢失,芯片开始运行 Flash 中的用户程序。固件烧录后通常选择此项以立即生效。
72+
73+
2. 不重启(默认选项)
74+
75+
- 逻辑:断开后不发送复位信号。
76+
77+
- 结果:芯片继续保持在 stub 运行状态。此时新烧录的固件不会运行,方便您在不断电的情况下进行二次连接调试。

0 commit comments

Comments
 (0)