File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,12 @@ def _update_max_upload_size(env):
184
184
SIZECHECKCMD = "$SIZETOOL -A -d $SOURCES" ,
185
185
SIZEPRINTCMD = '$SIZETOOL -B -d $SOURCES' ,
186
186
187
+ ERASEFLAGS = [
188
+ "-cp" , "$UPLOAD_PORT" ,
189
+ "-cd" , "$UPLOAD_RESETMETHOD"
190
+ ],
191
+ ERASECMD = 'esptool $ERASEFLAGS -ce' ,
192
+
187
193
PROGSUFFIX = ".elf"
188
194
)
189
195
@@ -376,6 +382,17 @@ def _update_max_upload_size(env):
376
382
env .VerboseAction ("$UPLOADCMD" , "Uploading $SOURCE" )])
377
383
env .AlwaysBuild (target_upload )
378
384
385
+ #
386
+ # Target: Erase Flash
387
+ #
388
+
389
+ AlwaysBuild (
390
+ env .Alias ("erase" , None , [
391
+ env .VerboseAction (env .AutodetectUploadPort ,
392
+ "Looking for serial port..." ),
393
+ env .VerboseAction ("$ERASECMD" , "Ready for erasing" )
394
+ ]))
395
+
379
396
380
397
#
381
398
# Default targets
You can’t perform that action at this time.
0 commit comments