diff --git a/README.md b/README.md index fbb4cea3..e90115f0 100644 --- a/README.md +++ b/README.md @@ -332,7 +332,7 @@ To update the firmware of a nano device with a local firmware file (for example This file has to be a binary file with a valid nanoCLR from a build. No checks or validations are performed on the file content. ```console -nanoff --nanodevice --serialport COM9 --binfile "C:\nf-interpreter\build\nanoclr.bin" +nanoff --nanodevice --update --serialport COM9 --clrfile "C:\nf-interpreter\build\nanoclr.bin" ``` ### Get details from a nano device diff --git a/nanoFirmwareFlasher.Library/NanoDeviceOperations.cs b/nanoFirmwareFlasher.Library/NanoDeviceOperations.cs index b1a57894..4086ddf3 100644 --- a/nanoFirmwareFlasher.Library/NanoDeviceOperations.cs +++ b/nanoFirmwareFlasher.Library/NanoDeviceOperations.cs @@ -372,7 +372,7 @@ public async Task UpdateDeviceClrAsync( if (attemptToLaunchBooter) { // try to reboot target - if (verbosity > VerbosityLevel.Normal) + if (verbosity >= VerbosityLevel.Normal) { Console.ForegroundColor = ConsoleColor.White; Console.Write("Rebooting..."); @@ -380,7 +380,7 @@ public async Task UpdateDeviceClrAsync( nanoDevice.DebugEngine.RebootDevice(RebootOptions.NormalReboot); - if (verbosity > VerbosityLevel.Normal) + if (verbosity >= VerbosityLevel.Normal) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("OK"); @@ -697,6 +697,23 @@ public ExitCodes DeployApplication( { Console.WriteLine(""); } + + // try to reboot target + if (verbosity >= VerbosityLevel.Normal) + { + Console.ForegroundColor = ConsoleColor.White; + Console.Write("Rebooting..."); + } + + // reboot device + nanoDevice.DebugEngine.RebootDevice(RebootOptions.NormalReboot); + + if (verbosity >= VerbosityLevel.Normal) + { + Console.ForegroundColor = ConsoleColor.Green; + Console.WriteLine("OK"); + Console.ForegroundColor = ConsoleColor.White; + } } // all good here