Skip to content

Commit 0b69b1b

Browse files
Frank Robijnjosesimoes
authored andcommitted
After PR review no. 1
1 parent 89d201c commit 0b69b1b

File tree

7 files changed

+869
-882
lines changed

7 files changed

+869
-882
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -506,17 +506,7 @@ nanoff --clearcache
506506

507507
## Firmware archive
508508

509-
By default, *nanoff* is designed to work with the latest version of the tool itself and of the firmware packages published in the online firmware repository. Command line arguments like
510-
511-
```console
512-
nanoff --nanodevice --update --serialport COM9
513-
```
514-
515-
will cause *nanoff* to check whether an update of the tool is available, download and deploy the latest version of the firmware for the connected device. This firmware has to match the NuGet packages used in the .NET **nanoFramework** applications, that may have to be updated to the latest version as well.
516-
517-
For some projects auto-updating of tools, firmware and NuGet packages is not desirable, and a more controlled transition to new versions of the framework components is required. This can be done by downloading the firmware packages to a firmware archive location first, and then updating a nanoDevice's firmware from that archive. See the [documentation](https://docs.nanoframework.net/content/getting-started-guides/getting-started-versioning.html) for a more detailed description.
518-
519-
Firmware can be archived via the *--updatefwarchive* option, e.g.:
509+
By default, *nanoff* uses the online repository to look for firmware packages. It is also possible to use a local directory as the source of firmware. The firmware archive can be populated via the *--updatefwarchive* option:
520510

521511
```console
522512
nanoff --updatefwarchive --target ESP32_S3_ALL --fwarchivepath c:\...\firmware
@@ -527,14 +517,17 @@ For a list of archived firmware:
527517
```console
528518
nanoff --listtargets --fromfwarchive --fwarchivepath c:\...\firmware
529519
```
530-
where the option *--suppressnanoffversioncheck* can be added to suppress the check for an update of *nanoff*.
531520

532-
To install firmware on a device, use the same command line arguments as usual, but add *--fromfwarchive*, *--fwarchivepath* and optionally *--suppressnanoffversioncheck*, e.g.:
521+
To install firmware on a device, use the same command line arguments as usual, but add *--fromfwarchive* and *--fwarchivepath*:
533522

534523
```console
535524
nanoff --nanodevice --update --serialport COM9 --fromfwarchive --fwarchivepath c:\...\firmware
536525
```
537526

527+
## Bypass version check
528+
529+
By default nanoff checks whether a new version of the tool has been published. If that is not necessary, the option *--suppressnanoffversioncheck* can be added to suppress the check.
530+
538531
## Exit codes
539532

540533
The exit codes can be checked in [this source file](https://github.com/nanoframework/nanoFirmwareFlasher/blob/main/nanoFirmwareFlasher.Library/ExitCodes.cs).

nanoFirmwareFlasher.Library/FirmwareArchiveManager.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@
1010
namespace nanoFramework.Tools.FirmwareFlasher
1111
{
1212
/// <summary>
13-
/// The manager of a firmware archive directory. By default, all firmware is downloaded from the online
14-
/// CloudSmith repository or obtained from a global cache. In general the latest version is used. As a result,
15-
/// subsequent executions of the nanoFirmwareFlasher may yield different versions of the firmware.
16-
/// The nanoFirmwareFlasher can be used to create a snapshot of firmware packages at a particular moment
17-
/// and use the snapshot as were it the online repository, by storing the snapshot in the firmware archive directory.
18-
/// The <see cref="FirmwareArchiveManager"/> implements listing, storing and retrieving of firmware in that directory.
13+
/// The manager of a firmware archive directory. It supports downloading firmware packages and the runtimes
14+
/// for the Virtual Device to a local directory from the online archive. That directory can then be used as
15+
/// a source for list and deployment operations instead of the online archive.
1916
/// </summary>
2017
public sealed class FirmwareArchiveManager
2118
{
22-
#region Fields
2319
private readonly string _archivePath;
24-
#endregion
20+
private const string INFOFILE_EXTENSION = ".json";
2521

2622
#region Construction
2723
/// <summary>
@@ -189,7 +185,6 @@ private sealed class PersistedPackageInformation : CloudSmithPackageDetail
189185
/// </summary>
190186
public bool IsPreview { get; set; }
191187
}
192-
private const string INFOFILE_EXTENSION = ".json";
193188
#endregion
194189

195190
#region Firmware package

0 commit comments

Comments
 (0)