Skip to content

Commit deaabf3

Browse files
committed
uvision exporter: Escape double quote in flags.
Without this fix macro defined as -DFOO="BAR" won't be correctly handled by uvision.
1 parent da9b8f3 commit deaabf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/export/uvision/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def format_flags(self):
166166
# Flag is invalid if set in template
167167
# Optimizations are also set in the template
168168
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
169-
flags['c_flags'] = [flag for flag in c_flags if not invalid_flag(flag)]
169+
flags['c_flags'] = [flag.replace('"','\\"') for flag in c_flags if not invalid_flag(flag)]
170170
flags['c_flags'] = " ".join(flags['c_flags'])
171171
return flags
172172

0 commit comments

Comments
 (0)