From 42e7805e5f71733cef86ff33e851078885312ed8 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 23 May 2024 20:03:53 +0200 Subject: [PATCH] dump important build_flags after compile Usermods and Features: USERMOD_AUDIOREACTIVE UM_AUDIOREACTIVE_USE_NEW_FFT USERMOD_AUTO_PLAYLIST WLED_DISABLE_LOXONE WLED_DISABLE_ALEXA WLED_DISABLE_HUESYNC WLED_DISABLE_MQTT WLED_DISABLE_INFRARED WLED_DISABLE_ADALIGHT WLED_DISABLE_ESPNOW WLED_ENABLE_DMX_INPUT WLED_USE_PSRAM_JSON WLEDMM Features: WLEDMM_FASTPATH note1: I have no idea about specialties of python - it could surely be done in a "more elegant" way. note2: the lists sometimes contain duplicates. --- pio-scripts/output_bins.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/pio-scripts/output_bins.py b/pio-scripts/output_bins.py index 4df40ed4..caf40bf9 100644 --- a/pio-scripts/output_bins.py +++ b/pio-scripts/output_bins.py @@ -22,6 +22,41 @@ def _create_dirs(dirs=["firmware", "map"]): if not os.path.isdir("{}{}".format(OUTPUT_DIR, d)): os.mkdir("{}{}".format(OUTPUT_DIR, d)) + +# WLEDMM : dump out buildflags : usermods, disable, enable, use_.. +def wledmm_print_build_info(env): + first = True + + for item in env["CPPDEFINES"]: + if 'USERMOD_' in item or 'UM_' in item: + if first: print("\nUsermods and Features:") + print(" " + item, end='') + first = False + if not first: print("") + + for item in env["CPPDEFINES"]: + if 'WLED_DISABLE' in item or 'NET_DEBUG_' in item or 'WIFI_FIX' in item: + if first: print("\nUsermods and Features:") + print(" " + item, end='') + first = False + if not first: print("") + + for item in env["CPPDEFINES"]: + if 'WLED_' in item and not 'WLED_USE_MY_CONFIG' in item and not 'WLED_RELEASE_NAME' in item and not 'WLED_VESION' in item and not 'WLED_WATCHDOG_TIMEOUT' in item and not 'WLED_DISABLE' in item and not 'ARDUINO_PARTITION' in item: + if first: print("\nUsermods and Features:") + print(" " + item, end='') + first = False + if not first: print("") + + first = True + for item in env["CPPDEFINES"]: + if 'WLEDMM_' in item or 'O2' in item or 'O3' in item or 'fast_' in item: + if first: print("\nWLEDMM Features:") + print(" " + item, end='') + first = False + if not first: print("\n") + + def bin_rename_copy(source, target, env): _create_dirs() variant = env["PIOENV"] @@ -56,6 +91,8 @@ def bin_rename_copy(source, target, env): print(f"Found linker mapfile {source_map}") shutil.copy(source_map, map_file) + wledmm_print_build_info(env) + def bin_gzip(source, target, env): _create_dirs() variant = env["PIOENV"]