2021-06-28 19:19:46 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import json
|
|
|
|
import sys
|
|
|
|
|
|
|
|
with open("compile_commands.json", "r") as f:
|
|
|
|
data = json.load(f)
|
|
|
|
|
|
|
|
include = " -I/usr/arm-none-eabi/include"
|
|
|
|
|
|
|
|
for i in range(len(data)):
|
|
|
|
if include not in data[i]["command"]:
|
|
|
|
data[i]["command"] += include
|
|
|
|
|
|
|
|
with open("compile_commands.json", "w") as f:
|
|
|
|
json.dump(data, f)
|
2021-06-28 19:39:19 +00:00
|
|
|
|