Browse Source

add compile_commands.json for cyd build

Thomas Buck 6 months ago
parent
commit
41480f7e43
4 changed files with 11 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 1
    0
      compile_commands.json
  3. 8
    0
      extra_script.py
  4. 1
    0
      platformio.ini

+ 1
- 0
.gitignore View File

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

+ 1
- 0
compile_commands.json View File

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

+ 8
- 0
extra_script.py View File

@@ -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 View File

@@ -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…
Cancel
Save