diff --git a/pio-tools/add_c_flags.py b/pio-tools/add_c_flags.py index 40d8a3937..0c39e777f 100644 --- a/pio-tools/add_c_flags.py +++ b/pio-tools/add_c_flags.py @@ -2,6 +2,3 @@ Import("env") # General options that are passed to the C compiler (C only; not C++). env.Append(CFLAGS=["-Wno-discarded-qualifiers", "-Wno-implicit-function-declaration"]) - -# General options that are passed to the C++ compiler -env.Append(CXXFLAGS=["-Wno-volatile"]) diff --git a/pio-tools/add_c_flags_ard3.py b/pio-tools/add_c_flags_ard3.py new file mode 100644 index 000000000..2871ac5ce --- /dev/null +++ b/pio-tools/add_c_flags_ard3.py @@ -0,0 +1,4 @@ +Import("env") + +# General options that are passed to the C++ compiler +env.Append(CXXFLAGS=["-Wno-volatile"]) diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini index 4d19fe40a..b87a42fbf 100644 --- a/platformio_tasmota32.ini +++ b/platformio_tasmota32.ini @@ -80,6 +80,8 @@ lib_ignore = ${esp32_defaults.lib_ignore} [core32_30_flags] build_unflags = ${core32_30.build_unflags} build_flags = ${core32_30.build_flags} +extra_scripts = pre:pio-tools/add_c_flags_ard3.py + ${esp32_defaults.extra_scripts} lib_extra_dirs = lib/lib_ssl, lib/lib_basic, lib/lib_i2c, lib/lib_div, lib/lib_audio, lib/lib_display, lib/lib_rf, lib/libesp32, lib/libesp32_div, lib/libesp32_lvgl lib_ignore = HTTPUpdateServer diff --git a/platformio_tasmota_core3_env_sample.ini b/platformio_tasmota_core3_env_sample.ini index 8f938f847..7349dfc47 100644 --- a/platformio_tasmota_core3_env_sample.ini +++ b/platformio_tasmota_core3_env_sample.ini @@ -8,7 +8,7 @@ custom_unpack_dir = ${common.custom_unpack_dir} board = esp32 monitor_speed = 115200 upload_resetmethod = ${common.upload_resetmethod} -extra_scripts = ${esp32_defaults.extra_scripts} +extra_scripts = ${core32_30_flags.extra_scripts} build_unflags = ${core32_30_flags.build_unflags} build_flags = ${core32_30_flags.build_flags} lib_ldf_mode = ${common.lib_ldf_mode}