Skip to content

Commit 9d9853f

Browse files
authored
Fix discovery of booter and CLR path (#152)
1 parent d0b9fbe commit 9d9853f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

nanoFirmwareFlasher.Library/FirmwarePackage.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class FirmwarePackage : IDisposable
3333
private readonly bool _preview;
3434

3535
private const string _readmeContent = "This folder contains nanoFramework firmware files. Can safely be removed.";
36-
36+
3737
/// <summary>
3838
/// Path with the base location for firmware packages.
3939
/// </summary>
@@ -681,7 +681,13 @@ private void FindBooterStartAddress()
681681
{
682682
uint address;
683683

684-
// find out what's the CLR block start
684+
if (string.IsNullOrEmpty(NanoClrFile))
685+
{
686+
// nothing to do here
687+
return;
688+
}
689+
690+
// find out what's the booter block start
685691

686692
// do this by reading the HEX format file...
687693
var textLines = File.ReadAllLines(NanoBooterFile);
@@ -730,6 +736,12 @@ private void FindClrStartAddress()
730736
{
731737
uint address;
732738

739+
if (string.IsNullOrEmpty(NanoClrFile))
740+
{
741+
// nothing to do here
742+
return;
743+
}
744+
733745
// find out what's the CLR block start
734746

735747
// do this by reading the HEX format file...

0 commit comments

Comments
 (0)