Option to reset EEPROM on first run (#23276)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
ellensp
2021-12-22 15:44:04 +13:00
committed by Scott Lahteine
parent d21fa25ab8
commit e0bed1e344
3 changed files with 68 additions and 20 deletions

View File

@ -81,10 +81,19 @@ if pioutil.is_pio_build():
#
# Give warnings on every build
#
warnfile = os.path.join(env['PROJECT_BUILD_DIR'], build_env, "src", "src", "inc", "Warnings.cpp.o")
srcpath = os.path.join(env['PROJECT_BUILD_DIR'], build_env, "src", "src")
warnfile = os.path.join(srcpath, "inc", "Warnings.cpp.o")
if os.path.exists(warnfile):
os.remove(warnfile)
#
# Rebuild 'settings.cpp' for EEPROM_INIT_NOW
#
if 'EEPROM_INIT_NOW' in env['MARLIN_FEATURES']:
setfile = os.path.join(srcpath, "module", "settings.cpp.o")
if os.path.exists(setfile):
os.remove(setfile)
#
# Check for old files indicating an entangled Marlin (mixing old and new code)
#