Skip to content

Commit ec2ec5c

Browse files
authored
Fix issues with skip of configuration backup (#302)
***NO_CI***
1 parent 6ab6323 commit ec2ec5c

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ nanoff --target ESP32_PSRAM_REV0 --update --serialport COM31 --deploy --image "c
186186
To skip backing up the configuration partition when updating the firmware of an ESP32 target connected to COM31.
187187

188188
```console
189-
nanoff --update --target ESP32_PSRAM_REV0 --serialport COM31 --noconfigbackup
189+
nanoff --update --target ESP32_PSRAM_REV0 --serialport COM31 --nobackupconfig
190190
```
191191

192192
## STM32 usage examples

README.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/main/CONTRIBUTING.md) [![Build Status](https://dev.azure.com/nanoframework/nanoFirmwareFlasher/_apis/build/status/nanoFirmwareFlasher?repoName=nanoframework%2FnanoFirmwareFlasher&branchName=main)](https://dev.azure.com/nanoframework/nanoFirmwareFlasher/_build/latest?definitionId=45&repoName=nanoframework%2FnanoFirmwareFlasher&branchName=main) [![NuGet](https://img.shields.io/nuget/v/nanoff.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoff/) [![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T)
1+
[![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/main/CONTRIBUTING.md) [![Build Status](https://dev.azure.com/nanoframework/nanoFirmwareFlasher/_apis/build/status/nanoFirmwareFlasher?repoName=nanoframework%2FnanoFirmwareFlasher&branchName=main)](https://dev.azure.com/nanoframework/nanoFirmwareFlasher/_build/latest?definitionId=45&repoName=nanoframework%2FnanoFirmwareFlasher&branchName=main) [![NuGet](https://img.shields.io/nuget/v/nanoff.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoff/) [![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T)
22

33
![nanoFramework logo](https://raw.githubusercontent.com/nanoframework/Home/main/resources/logo/nanoFramework-repo-logo.png)
44

@@ -166,7 +166,7 @@ nanoff --target ESP32_PSRAM_REV0 --update --serialport COM31 --deploy --image "c
166166
在更新连接到 COM31 的 ESP32 目标的固件时跳过备份配置分区。
167167

168168
```shell
169-
nanoff --update --target ESP32_PSRAM_REV0 --serialport COM31 --noconfigbackup
169+
nanoff --update --target ESP32_PSRAM_REV0 --serialport COM31 --nobackupconfig
170170
```
171171

172172
## STM32用法示例

nanoFirmwareFlasher.Library/Esp32Operations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync(
514514
string configPartitionBackup = Path.GetRandomFileName();
515515

516516
// if mass erase wasn't requested or skip backup config partitition
517-
if (!massErase || !noBackupConfig)
517+
if (!massErase && !noBackupConfig)
518518
{
519519
// check if the update file includes a partition table
520520
if (File.Exists(Path.Combine(firmware.LocationPath, $"partitions_nanoclr_{Esp32DeviceInfo.GetFlashSizeAsString(esp32Device.FlashSize).ToLowerInvariant()}.csv")))

nanoFirmwareFlasher.Tool/Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public class Options
139139
public bool CheckPsRam { get; set; }
140140

141141
[Option(
142-
"noconfigbackup",
142+
"nobackupconfig",
143143
Required = false,
144144
Default = false,
145145
HelpText = "Skip backup of configuration partition.")]

nanoFirmwareFlasher.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
99
ProjectSection(SolutionItems) = preProject
1010
NuGet.Config = NuGet.Config
1111
README.md = README.md
12+
README.zh-cn.md = README.zh-cn.md
1213
version.json = version.json
1314
EndProjectSection
1415
EndProject
@@ -67,7 +68,7 @@ Global
6768
HideSolutionNode = FALSE
6869
EndGlobalSection
6970
GlobalSection(ExtensibilityGlobals) = postSolution
70-
SolutionGuid = {AF6C2B32-984F-41C2-B0F7-B895E45A1BB5}
7171
SolutionGuid = {56E99FF7-1E34-4FB8-8E3C-F98890E741D0}
72+
SolutionGuid = {AF6C2B32-984F-41C2-B0F7-B895E45A1BB5}
7273
EndGlobalSection
7374
EndGlobal

0 commit comments

Comments
 (0)