mirror of https://github.com/ARMmbed/mbed-os.git
Add c_cpp_properties file to gen_files for zipping
parent
e65722262c
commit
49ab2b83bd
|
@ -30,26 +30,6 @@ class VSCode(Makefile):
|
|||
"""Generate Makefile and VSCode launch and task files
|
||||
"""
|
||||
super(VSCode, self).generate()
|
||||
ctx = {
|
||||
'name': self.project_name,
|
||||
'elf_location': join('BUILD', self.project_name)+'.elf',
|
||||
'c_symbols': self.toolchain.get_symbols(),
|
||||
'asm_symbols': self.toolchain.get_symbols(True),
|
||||
'target': self.target,
|
||||
'include_paths': self.resources.inc_dirs,
|
||||
'load_exe': str(self.LOAD_EXE).lower()
|
||||
}
|
||||
|
||||
if not exists(join(self.export_dir, '.vscode')):
|
||||
makedirs(join(self.export_dir, '.vscode'))
|
||||
|
||||
config_files = ['launch', 'settings', 'tasks']
|
||||
for file in config_files:
|
||||
if not exists('.vscode/%s.json' % file):
|
||||
self.gen_file('vscode/%s.tmpl' % file, ctx,
|
||||
'.vscode/%s.json' % file)
|
||||
else:
|
||||
print('Keeping existing %s.json' % file)
|
||||
|
||||
# So.... I want all .h and .hpp files in self.resources.inc_dirs
|
||||
all_directories = []
|
||||
|
@ -96,8 +76,27 @@ class VSCode(Makefile):
|
|||
]
|
||||
}
|
||||
|
||||
with open(join(self.export_dir, '.vscode', 'c_cpp_properties.json'), 'w') as outfile:
|
||||
json.dump(cpp_props, outfile, indent=4, separators=(',', ': '))
|
||||
ctx = {
|
||||
'name': self.project_name,
|
||||
'elf_location': join('BUILD', self.project_name)+'.elf',
|
||||
'c_symbols': self.toolchain.get_symbols(),
|
||||
'asm_symbols': self.toolchain.get_symbols(True),
|
||||
'target': self.target,
|
||||
'include_paths': self.resources.inc_dirs,
|
||||
'load_exe': str(self.LOAD_EXE).lower(),
|
||||
'cpp_props': json.dumps(cpp_props, indent=4, separators=(',', ': '))
|
||||
}
|
||||
|
||||
if not exists(join(self.export_dir, '.vscode')):
|
||||
makedirs(join(self.export_dir, '.vscode'))
|
||||
|
||||
config_files = ['launch', 'settings', 'tasks', 'c_cpp_properties']
|
||||
for file in config_files:
|
||||
if not exists('.vscode/%s.json' % file):
|
||||
self.gen_file('vscode/%s.tmpl' % file, ctx,
|
||||
'.vscode/%s.json' % file)
|
||||
else:
|
||||
print('Keeping existing %s.json' % file)
|
||||
|
||||
@staticmethod
|
||||
def clean(_):
|
||||
|
@ -116,5 +115,3 @@ class VSCodeArmc5(VSCode, Armc5):
|
|||
class VSCodeIAR(VSCode, IAR):
|
||||
LOAD_EXE = True
|
||||
NAME = "VSCode-IAR"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue