瀏覽代碼

add compile_commands.json for cyd build

Thomas Buck 5 月之前
父節點
當前提交
41480f7e43
共有 4 個文件被更改,包括 11 次插入0 次删除
  1. 1
    0
      .gitignore
  2. 1
    0
      compile_commands.json
  3. 8
    0
      extra_script.py
  4. 1
    0
      platformio.ini

+ 1
- 0
.gitignore 查看文件

@@ -1 +1,2 @@
1 1
 .pio
2
+.cache

+ 1
- 0
compile_commands.json 查看文件

@@ -0,0 +1 @@
1
+.pio/build/cyd/compile_commands.json

+ 8
- 0
extra_script.py 查看文件

@@ -0,0 +1,8 @@
1
+import os
2
+Import("env")
3
+
4
+# include toolchain paths
5
+env.Replace(COMPILATIONDB_INCLUDE_TOOLCHAIN=True)
6
+
7
+# override compilation DB path
8
+env.Replace(COMPILATIONDB_PATH=os.path.join("$BUILD_DIR", "compile_commands.json"))

+ 1
- 0
platformio.ini 查看文件

@@ -16,6 +16,7 @@ upload_protocol = esptool
16 16
 upload_port = /dev/ttyUSB1
17 17
 monitor_port = /dev/ttyUSB1
18 18
 monitor_speed = 115200
19
+extra_scripts = pre:extra_script.py
19 20
 build_flags =
20 21
   -DSENSOR_HOSTNAME_PREFIX=\"cyd-\"
21 22
   "-DNAME_OF_FEATURE=\"Remote Control\""

Loading…
取消
儲存