Skip to content

Commit 3873045

Browse files
authored
Improve flashing with J-Link (#196)
***NO_CI***
1 parent 413287b commit 3873045

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

nanoFirmwareFlasher.Library/JLinkCli.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,26 +248,26 @@ public ExitCodes ExecuteFlashBinFiles(
248248
// OK to delete the JLink command file
249249
File.Delete(jlinkCmdFilePath);
250250

251-
if (cliOutput.Contains("Programming failed."))
252-
{
253-
ShowCLIOutput(cliOutput);
254-
255-
return ExitCodes.E5006;
256-
}
257-
258251
if (Verbosity >= VerbosityLevel.Normal
259252
&& cliOutput.Contains("Skipped. Contents already match"))
260253
{
261254
Console.ForegroundColor = ConsoleColor.Yellow;
262255

263256
Console.WriteLine("");
264-
Console.WriteLine("********************* WARNING **********************");
265-
Console.WriteLine("Skipped flashing. Contents already match the update.");
266-
Console.WriteLine("****************************************************");
257+
Console.WriteLine("******************* WARNING *********************");
258+
Console.WriteLine("Skip flashing. Contents already match the update.");
259+
Console.WriteLine("*************************************************");
267260
Console.WriteLine("");
268261

269262
Console.ForegroundColor = ConsoleColor.White;
270263
}
264+
else if (!(cliOutput.Contains("Flash download: Program & Verify")
265+
&& cliOutput.Contains("O.K.")))
266+
{
267+
ShowCLIOutput(cliOutput);
268+
269+
return ExitCodes.E5006;
270+
}
271271

272272
ShowCLIOutput(cliOutput);
273273
}

0 commit comments

Comments
 (0)