Skip to content

Instantly share code, notes, and snippets.

@wizhippo
wizhippo / c_cpp_properties.py
Created May 7, 2020 16:28 — forked from davidji/c_cpp_properties.py
Use the output from Chibios build to generate a VSCode configuration file
import subprocess, argparse, sys, pprint, json
from os import path
# Read the output of Chibios build to generate .vscode/c_cpp_properties.json
# E.g. make | python c_cpp_properties.py -C arm-none-eabi-g++ > .vscode/c_cpp_properties.json
parser = argparse.ArgumentParser()
parser.add_argument('-C', '--compiler', dest='compiler', default='arm-none-eabi-gcc')
parser.add_argument('-x', '--language', dest='language', default='c++')