diff --git a/lib/esptool/esptoolLinux/esptool b/lib/esptool/esptoolLinux/esptool index 6f68f5d8..ed76da6a 100644 Binary files a/lib/esptool/esptoolLinux/esptool and b/lib/esptool/esptoolLinux/esptool differ diff --git a/lib/esptool/esptoolMac/esptool b/lib/esptool/esptoolMac/esptool index 96f45b20..d46bea83 100755 Binary files a/lib/esptool/esptoolMac/esptool and b/lib/esptool/esptoolMac/esptool differ diff --git a/lib/esptool/esptoolWin/esptool.exe b/lib/esptool/esptoolWin/esptool.exe index 31bb3539..242f2297 100644 Binary files a/lib/esptool/esptoolWin/esptool.exe and b/lib/esptool/esptoolWin/esptool.exe differ diff --git a/nanoFirmwareFlasher.Library/EspTool.cs b/nanoFirmwareFlasher.Library/EspTool.cs index a8ba74b6..7fb898c8 100644 --- a/nanoFirmwareFlasher.Library/EspTool.cs +++ b/nanoFirmwareFlasher.Library/EspTool.cs @@ -466,7 +466,6 @@ internal ExitCodes WriteFlash( var regexPattern = new StringBuilder(); int counter = 1; var regexGroupNames = new List(); - string flashFreqParam; foreach (var part in partsToWrite) { @@ -486,22 +485,9 @@ internal ExitCodes WriteFlash( _ => "detect", }; - // process flash frequency - if (_flashFrequency == -1) - { - // no flash frequency was requested on the CLI options - // defaulting to 'keep' to make this work with image files with checksum - flashFreqParam = "keep"; - } - else - { - // compose option for flash freq para - flashFreqParam = $"{_flashFrequency}m"; - } - // execute write_flash command and parse the result; progress message can be found be searching for linefeed if (!RunEspTool( - $"write_flash --flash_mode {_flashMode} --flash_freq {flashFreqParam} --flash_size {flashSize} {partsArguments.ToString().Trim()}", + $"write_flash --flash_mode {_flashMode} --flash_freq {_flashFrequency}m --flash_size {flashSize} {partsArguments.ToString().Trim()}", false, useStandardBaudrate, true, @@ -637,7 +623,7 @@ private bool RunEspTool( if (!espTool.Start()) { throw new EspToolExecutionException("Error starting esptool!"); - } + } var messageBuilder = new StringBuilder(); diff --git a/nanoFirmwareFlasher.Tool/Options.cs b/nanoFirmwareFlasher.Tool/Options.cs index b9f63623..2c4a9679 100644 --- a/nanoFirmwareFlasher.Tool/Options.cs +++ b/nanoFirmwareFlasher.Tool/Options.cs @@ -108,14 +108,14 @@ public class Options [Option( "flashmode", Required = false, - Default = "keep", + Default = "dio", HelpText = "Flash mode to use.")] public string Esp32FlashMode { get; set; } [Option( "flashfreq", Required = false, - Default = -1, + Default = 40, HelpText = "Flash frequency to use [MHz].")] public int Esp32FlashFrequency { get; set; }