From 13dbd0241e369af31f665794a0895da081713e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Mon, 22 Aug 2022 23:19:59 +0100 Subject: [PATCH] Fix discovery of booter and CLR path --- nanoFirmwareFlasher.Library/FirmwarePackage.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nanoFirmwareFlasher.Library/FirmwarePackage.cs b/nanoFirmwareFlasher.Library/FirmwarePackage.cs index 16ded79b..58d9d770 100644 --- a/nanoFirmwareFlasher.Library/FirmwarePackage.cs +++ b/nanoFirmwareFlasher.Library/FirmwarePackage.cs @@ -33,7 +33,7 @@ public abstract class FirmwarePackage : IDisposable private readonly bool _preview; private const string _readmeContent = "This folder contains nanoFramework firmware files. Can safely be removed."; - + /// /// Path with the base location for firmware packages. /// @@ -681,7 +681,13 @@ private void FindBooterStartAddress() { uint address; - // find out what's the CLR block start + if (string.IsNullOrEmpty(NanoClrFile)) + { + // nothing to do here + return; + } + + // find out what's the booter block start // do this by reading the HEX format file... var textLines = File.ReadAllLines(NanoBooterFile); @@ -730,6 +736,12 @@ private void FindClrStartAddress() { uint address; + if (string.IsNullOrEmpty(NanoClrFile)) + { + // nothing to do here + return; + } + // find out what's the CLR block start // do this by reading the HEX format file...