diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 20c732d12..96b15f64a 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -332,7 +332,7 @@ def _normalize_define(define_string): define, value = define_string.split("=", maxsplit=1) if any(char in value for char in (' ', '<', '>')): value = f'"{value}"' - elif any(char in value for char in ('"', '\'')): + elif '"' in value and not value.startswith("\\"): value = value.replace('"', '\\"') return (define, value) return define_string