File tree Expand file tree Collapse file tree 5 files changed +4
-18
lines changed
nanoFirmwareFlasher.Library Expand file tree Collapse file tree 5 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -466,7 +466,6 @@ internal ExitCodes WriteFlash(
466466 var regexPattern = new StringBuilder ( ) ;
467467 int counter = 1 ;
468468 var regexGroupNames = new List < string > ( ) ;
469- string flashFreqParam ;
470469
471470 foreach ( var part in partsToWrite )
472471 {
@@ -486,22 +485,9 @@ internal ExitCodes WriteFlash(
486485 _ => "detect" ,
487486 } ;
488487
489- // process flash frequency
490- if ( _flashFrequency == - 1 )
491- {
492- // no flash frequency was requested on the CLI options
493- // defaulting to 'keep' to make this work with image files with checksum
494- flashFreqParam = "keep" ;
495- }
496- else
497- {
498- // compose option for flash freq para
499- flashFreqParam = $ "{ _flashFrequency } m";
500- }
501-
502488 // execute write_flash command and parse the result; progress message can be found be searching for linefeed
503489 if ( ! RunEspTool (
504- $ "write_flash --flash_mode { _flashMode } --flash_freq { flashFreqParam } --flash_size { flashSize } { partsArguments . ToString ( ) . Trim ( ) } ",
490+ $ "write_flash --flash_mode { _flashMode } --flash_freq { _flashFrequency } m --flash_size { flashSize } { partsArguments . ToString ( ) . Trim ( ) } ",
505491 false ,
506492 useStandardBaudrate ,
507493 true ,
@@ -637,7 +623,7 @@ private bool RunEspTool(
637623 if ( ! espTool . Start ( ) )
638624 {
639625 throw new EspToolExecutionException ( "Error starting esptool!" ) ;
640- }
626+ }
641627
642628 var messageBuilder = new StringBuilder ( ) ;
643629
Original file line number Diff line number Diff line change @@ -108,14 +108,14 @@ public class Options
108108 [ Option (
109109 "flashmode" ,
110110 Required = false ,
111- Default = "keep " ,
111+ Default = "dio " ,
112112 HelpText = "Flash mode to use." ) ]
113113 public string Esp32FlashMode { get ; set ; }
114114
115115 [ Option (
116116 "flashfreq" ,
117117 Required = false ,
118- Default = - 1 ,
118+ Default = 40 ,
119119 HelpText = "Flash frequency to use [MHz]." ) ]
120120 public int Esp32FlashFrequency { get ; set ; }
121121
You can’t perform that action at this time.
0 commit comments