Skip to content

Commit

Permalink
Revert changes with esptool (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Sep 5, 2022
1 parent 27cda01 commit fdc326a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 18 deletions.
Binary file modified lib/esptool/esptoolLinux/esptool
Binary file not shown.
Binary file modified lib/esptool/esptoolMac/esptool
Binary file not shown.
Binary file modified lib/esptool/esptoolWin/esptool.exe
Binary file not shown.
18 changes: 2 additions & 16 deletions nanoFirmwareFlasher.Library/EspTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ internal ExitCodes WriteFlash(
var regexPattern = new StringBuilder();
int counter = 1;
var regexGroupNames = new List<string>();
string flashFreqParam;

foreach (var part in partsToWrite)
{
Expand All @@ -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,
Expand Down Expand Up @@ -637,7 +623,7 @@ private bool RunEspTool(
if (!espTool.Start())
{
throw new EspToolExecutionException("Error starting esptool!");
}
}

var messageBuilder = new StringBuilder();

Expand Down
4 changes: 2 additions & 2 deletions nanoFirmwareFlasher.Tool/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down

0 comments on commit fdc326a

Please sign in to comment.