Skip to content

Commit 1eb4793

Browse files
committed
Fix "pare error in Defines" uvision error
1 parent 9f00a9b commit 1eb4793

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/export/uvision/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,12 @@ def valid_flag(x):
191191
return (
192192
x not in in_template or
193193
not x.startswith("-O") or
194-
not x.startswith("-std")
194+
not x.startswith("-std") or
195+
not x.startswith("-D")
195196
)
196197

197198
def is_define(s):
198-
return s.startswith("-D")
199+
return s.startswith("-D") and "(" not in s
199200

200201
flags['c_flags'] = " ".join(f.replace('"', '\\"') for f in c_flags
201202
if (valid_flag(f) and not is_define(f)))

0 commit comments

Comments
 (0)