Skip to content

Commit 42e7805

Browse files
committed
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.
1 parent eb3200b commit 42e7805

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

pio-scripts/output_bins.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,41 @@ def _create_dirs(dirs=["firmware", "map"]):
2222
if not os.path.isdir("{}{}".format(OUTPUT_DIR, d)):
2323
os.mkdir("{}{}".format(OUTPUT_DIR, d))
2424

25+
26+
# WLEDMM : dump out buildflags : usermods, disable, enable, use_..
27+
def wledmm_print_build_info(env):
28+
first = True
29+
30+
for item in env["CPPDEFINES"]:
31+
if 'USERMOD_' in item or 'UM_' in item:
32+
if first: print("\nUsermods and Features:")
33+
print(" " + item, end='')
34+
first = False
35+
if not first: print("")
36+
37+
for item in env["CPPDEFINES"]:
38+
if 'WLED_DISABLE' in item or 'NET_DEBUG_' in item or 'WIFI_FIX' in item:
39+
if first: print("\nUsermods and Features:")
40+
print(" " + item, end='')
41+
first = False
42+
if not first: print("")
43+
44+
for item in env["CPPDEFINES"]:
45+
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:
46+
if first: print("\nUsermods and Features:")
47+
print(" " + item, end='')
48+
first = False
49+
if not first: print("")
50+
51+
first = True
52+
for item in env["CPPDEFINES"]:
53+
if 'WLEDMM_' in item or 'O2' in item or 'O3' in item or 'fast_' in item:
54+
if first: print("\nWLEDMM Features:")
55+
print(" " + item, end='')
56+
first = False
57+
if not first: print("\n")
58+
59+
2560
def bin_rename_copy(source, target, env):
2661
_create_dirs()
2762
variant = env["PIOENV"]
@@ -56,6 +91,8 @@ def bin_rename_copy(source, target, env):
5691
print(f"Found linker mapfile {source_map}")
5792
shutil.copy(source_map, map_file)
5893

94+
wledmm_print_build_info(env)
95+
5996
def bin_gzip(source, target, env):
6097
_create_dirs()
6198
variant = env["PIOENV"]

0 commit comments

Comments
 (0)