@@ -138,6 +138,7 @@ def get_esptoolpy_reset_flags(resetmethod):
138
138
########################################################
139
139
140
140
env = DefaultEnvironment ()
141
+ env .SConscript ("compat.py" , exports = "env" )
141
142
platform = env .PioPlatform ()
142
143
143
144
env .Replace (
@@ -227,11 +228,11 @@ def get_esptoolpy_reset_flags(resetmethod):
227
228
target_firm = env .DataToBin (
228
229
join ("$BUILD_DIR" , env .get ("SPIFFSNAME" , "spiffs" )), "$PROJECTDATA_DIR" )
229
230
AlwaysBuild (target_firm )
230
- AlwaysBuild (env .Alias ("buildfs" , target_firm ))
231
231
else :
232
232
target_firm = env .ElfToBin (
233
233
join ("$BUILD_DIR" , "${PROGNAME}" ), target_elf )
234
234
235
+ env .AddPlatformTarget ("buildfs" , target_firm , None , "Build Filesystem Image" )
235
236
AlwaysBuild (env .Alias ("nobuild" , target_firm ))
236
237
target_buildprog = env .Alias ("buildprog" , target_firm , target_firm )
237
238
@@ -250,10 +251,13 @@ def get_esptoolpy_reset_flags(resetmethod):
250
251
# Target: Print binary size
251
252
#
252
253
253
- target_size = env .Alias (
254
- "size" , target_elf ,
255
- env .VerboseAction ("$SIZEPRINTCMD" , "Calculating size $SOURCE" ))
256
- AlwaysBuild (target_size )
254
+ target_size = env .AddPlatformTarget (
255
+ "size" ,
256
+ target_elf ,
257
+ env .VerboseAction ("$SIZEPRINTCMD" , "Calculating size $SOURCE" ),
258
+ "Program Size" ,
259
+ "Calculate program size" ,
260
+ )
257
261
258
262
#
259
263
# Target: Upload firmware or SPIFFS image
@@ -336,19 +340,24 @@ def get_esptoolpy_reset_flags(resetmethod):
336
340
else :
337
341
sys .stderr .write ("Warning! Unknown upload protocol %s\n " % upload_protocol )
338
342
339
- env .AlwaysBuild (env .Alias (["upload" , "uploadfs" ], target_firm , upload_actions ))
343
+ env .AddPlatformTarget ("upload" , target_firm , upload_actions , "Upload" )
344
+ env .AddPlatformTarget ("uploadfs" , target_firm , upload_actions , "Upload Filesystem Image" )
345
+ env .AddPlatformTarget (
346
+ "uploadfsota" , target_firm , upload_actions , "Upload Filesystem Image OTA" )
340
347
341
348
#
342
349
# Target: Erase Flash
343
350
#
344
351
345
- AlwaysBuild (
346
- env .Alias ("erase" , None , [
347
- env .VerboseAction (env .AutodetectUploadPort ,
348
- "Looking for serial port..." ),
352
+ env .AddPlatformTarget (
353
+ "erase" ,
354
+ None ,
355
+ [
356
+ env .VerboseAction (env .AutodetectUploadPort , "Looking for serial port..." ),
349
357
env .VerboseAction ("$ERASECMD" , "Erasing..." )
350
- ]))
351
-
358
+ ],
359
+ "Erase Flash" ,
360
+ )
352
361
353
362
#
354
363
# Information about obsolete method of specifying linker scripts
0 commit comments