wledmm_print_all_defines (optional)
for pio.ini debugging
This commit is contained in:
@@ -28,8 +28,9 @@ if 'basestring' not in globals():
|
|||||||
basestring = str
|
basestring = str
|
||||||
|
|
||||||
# WLEDMM : custom print function
|
# WLEDMM : custom print function
|
||||||
def print_my_item(items):
|
def print_my_item(items, flag = False):
|
||||||
print(" ", end='')
|
if flag: print(" -D", end='')
|
||||||
|
else: print(" ", end='')
|
||||||
if isinstance(items, basestring):
|
if isinstance(items, basestring):
|
||||||
# print a single string
|
# print a single string
|
||||||
print(items, end='')
|
print(items, end='')
|
||||||
@@ -93,6 +94,15 @@ def wledmm_print_build_info(env):
|
|||||||
found = True
|
found = True
|
||||||
if found: print("\n")
|
if found: print("\n")
|
||||||
|
|
||||||
|
def wledmm_print_all_defines(env):
|
||||||
|
all_flags = env["CPPDEFINES"]
|
||||||
|
found = False
|
||||||
|
for item in all_flags:
|
||||||
|
if not found: print("\nBuild Flags:")
|
||||||
|
print_my_item(item, True)
|
||||||
|
found = True
|
||||||
|
if found: print("\n")
|
||||||
|
|
||||||
|
|
||||||
def bin_rename_copy(source, target, env):
|
def bin_rename_copy(source, target, env):
|
||||||
_create_dirs()
|
_create_dirs()
|
||||||
@@ -128,6 +138,7 @@ def bin_rename_copy(source, target, env):
|
|||||||
print(f"Found linker mapfile {source_map}")
|
print(f"Found linker mapfile {source_map}")
|
||||||
shutil.copy(source_map, map_file)
|
shutil.copy(source_map, map_file)
|
||||||
|
|
||||||
|
# wledmm_print_all_defines(env)
|
||||||
wledmm_print_build_info(env)
|
wledmm_print_build_info(env)
|
||||||
|
|
||||||
def bin_gzip(source, target, env):
|
def bin_gzip(source, target, env):
|
||||||
|
|||||||
Reference in New Issue
Block a user