-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
41 lines (33 loc) · 896 Bytes
/
Taskfile.yml
File metadata and controls
41 lines (33 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# https://taskfile.dev
version: '3'
vars:
BUILD_DIR: build
tasks:
# 清理:调用 cmake 的 clean target
clean:
desc: "Clean build files using cmake"
cmds:
- cmake --build {{.BUILD_DIR}} --target clean || true
# 配置:生成 build 目录和 Ninja 构建文件
configure:
desc: "Run cmake configure"
cmds:
- cmake -B {{.BUILD_DIR}} -G Ninja
# 编译
build:
desc: "Build project"
deps: [configure]
cmds:
- cmake --build {{.BUILD_DIR}} -j
# 完整重建:先 clean 再 build
rebuild:
desc: "Clean and rebuild project"
deps: [clean]
cmds:
- task: build
flash:
desc: "Flash ELF to target using J-Link"
cmds:
- '"D:\SEGGER\JLink_V840\JLink.exe" -device STM32F105 -if SWD -speed 4000 -autoconnect 1 -CommanderScript flash.jlink'
# 永远执行,不检查时间戳
status: ["false"]