Files
ESPEasy/pre_custom_esp32.py
T
Gijs Noorlander 760765efb1 [Build] Fix use of flag BUILD_NO_DEBUG
The check in the code was for #ifndef BUILD_NO_DEBUG.
But even when it is defined as 0, it is still defined.
So the code was still included in the binary.
2019-09-26 13:42:00 +02:00

41 lines
930 B
Python

Import("env")
import os
# access to global construction environment
#print env
# Dump construction environment (for debug purpose)
#print env.Dump()
# append extra flags to global build environment
# which later will be used to build:
# - project source code
# - frameworks
# - dependent libraries
env.Append(CPPDEFINES=[
# ("WEBSERVER_RULES_DEBUG", "1")
])
if os.path.isfile('src/Custom.h'):
env['CPPDEFINES'].append("USE_CUSTOM_H")
else:
env['CPPDEFINES'].extend([
"CONTROLLER_SET_ALL",
"NOTIFIER_SET_NONE",
"PLUGIN_SET_ONLY_SWITCH",
"USES_P001", # Switch
"USES_P002", # ADC
"USES_P004", # Dallas DS18b20
"USES_P028", # BME280
"USES_P036", # FrameOLED
"USES_P049", # MHZ19
"USES_P052", # SenseAir
"USES_P056", # SDS011-Dust
"USES_P059", # Encoder
"USES_P082", # GPS
"USES_P087", # Serial Proxy
"USE_SETTINGS_ARCHIVE"
])
print(env['CPPDEFINES'])