@@ -107,6 +107,7 @@ public static ExitCodes BackupFlash(
107107 /// <param name="massErase">If <see langword="true"/> perform mass erase on device before updating.</param>
108108 /// <param name="verbosity">Set verbosity level of progress and error messages.</param>
109109 /// <param name="partitionTableSize">Size of partition table.</param>
110+ /// <param name="noBackupConfig"><see langword="true"/> for skiping backup of configuration partition.</param>
110111 /// <returns>The <see cref="ExitCodes"/> with the operation result.</returns>
111112 public static async System . Threading . Tasks . Task < ExitCodes > UpdateFirmwareAsync (
112113 EspTool espTool ,
@@ -123,7 +124,8 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
123124 bool fitCheck ,
124125 bool massErase ,
125126 VerbosityLevel verbosity ,
126- PartitionTableSize ? partitionTableSize )
127+ PartitionTableSize ? partitionTableSize ,
128+ bool noBackupConfig )
127129 {
128130 ExitCodes operationResult = ExitCodes . OK ;
129131 uint address = 0 ;
@@ -511,8 +513,8 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
511513 int configPartitionSize = 0 ;
512514 string configPartitionBackup = Path . GetRandomFileName ( ) ;
513515
514- // if mass erase wasn't requested, backup config partitition
515- if ( ! massErase )
516+ // if mass erase wasn't requested or skip backup config partitition
517+ if ( ! massErase || ! noBackupConfig )
516518 {
517519 // check if the update file includes a partition table
518520 if ( File . Exists ( Path . Combine ( firmware . LocationPath , $ "partitions_nanoclr_{ Esp32DeviceInfo . GetFlashSizeAsString ( esp32Device . FlashSize ) . ToLowerInvariant ( ) } .csv") ) )
0 commit comments