Fix more code which appears copied from CcrxCompiler.
@@ -106,9 +106,9 @@ class C2000Compiler(Compiler):
result = []
for i in args:
if i.startswith('-D'):
- i = '-define=' + i[2:]
+ i = '--define=' + i[2:]
if i.startswith('-I'):
- i = '-include=' + i[2:]
+ i = '--include_path=' + i[2:]
if i.startswith('-Wl,-rpath='):
continue
elif i == '--print-search-dirs':
@@ -120,8 +120,10 @@ class C2000Compiler(Compiler):
def compute_parameters_with_absolute_paths(self, parameter_list: T.List[str], build_dir: str) -> T.List[str]:
for idx, i in enumerate(parameter_list):
- if i[:9] == '-include=':
- parameter_list[idx] = i[:9] + os.path.normpath(os.path.join(build_dir, i[9:]))
+ if i[:14] == '--include_path':
+ parameter_list[idx] = i[:14] + os.path.normpath(os.path.join(build_dir, i[14:]))
+ if i[:2] == '-I':
+ parameter_list[idx] = i[:2] + os.path.normpath(os.path.join(build_dir, i[2:]))
return parameter_list
