Skip to content

Make the default flashing frequency target specific - #389

Merged
jessebraham merged 5 commits into
esp-rs:mainfrom
SergioGasquez:feature/flash-freq
Apr 18, 2023
Merged

Make the default flashing frequency target specific#389
jessebraham merged 5 commits into
esp-rs:mainfrom
SergioGasquez:feature/flash-freq

Conversation

@SergioGasquez

@SergioGasquez SergioGasquez commented Apr 17, 2023

Copy link
Copy Markdown
Member

I've implemented the third solution proposed by @maxwase in #375:

  • Add flash_freq to Esp32Params so we can define a default flashing frequency per target.
  • Specify the default flashing frequency for all the targets.

@maxwase maxwase left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think FlashFrequency::default() usage is better (as in esp8266 module) and more future-proof (if this code will ever be refactored to use ..Esp32Params::default()), but it's up to decide :)

@SergioGasquez

SergioGasquez commented Apr 17, 2023 via email

Copy link
Copy Markdown
Member Author

@maxwase

maxwase commented Apr 17, 2023

Copy link
Copy Markdown
Contributor

Oh, sorry for unclarity 😄, I mean replacing of FlashFrequency::_40Mhz with FlashFrequency::default() as it is a default frequency

@SergioGasquez

Copy link
Copy Markdown
Member Author

Oh, sorry for unclarity smile, I mean replacing of FlashFrequency::_40Mhz with FlashFrequency::default() as it is a default frequency

Ahh! I've tried this yesterday, but since PARAMS is a const, it fails:

`~const std::default::Default` is not implemented for `FlashFrequency`

And I don't know/couldn't find any easy solution to this

@maxwase

maxwase commented Apr 18, 2023

Copy link
Copy Markdown
Contributor

Oh, sorry for unclarity smile, I mean replacing of FlashFrequency::_40Mhz with FlashFrequency::default() as it is a default frequency

Ahh! I've tried this yesterday, but since PARAMS is a const, it fails:

`~const std::default::Default` is not implemented for `FlashFrequency`

And I don't know/couldn't find any easy solution to this

Oh, didn't spot that, hope we will get it someday! Other than that, LGTM

@jessebraham jessebraham left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing this!

@jessebraham
jessebraham merged commit 327f8d4 into esp-rs:main Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The ESP32-C2/H2 do not support 40MHz flash frequency, which is the default, resulting in poor UX

3 participants