Skip to content

Add erase flash option to Arduino IDE menu #7043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Aug 10, 2022

Conversation

PilnyTomas
Copy link
Contributor

@PilnyTomas PilnyTomas commented Jul 27, 2022

Description of Change

This PR is adding new option Erase Flash into Arduino IDE -> tools menu. This option can be used to erase all flash contents before uploading the sketch as it is possible for ESP8266.
Updated docs with the new tools menu option.

erase-flash-option

Tests scenarios

Tested on all chips.

Related links

Closes #5902

@PilnyTomas PilnyTomas added the Type: Feature request Feature request for Arduino ESP32 label Jul 27, 2022
@VojtechBartoska VojtechBartoska marked this pull request as draft July 27, 2022 09:11
@VojtechBartoska VojtechBartoska changed the title DRAFT: Add erase flash option to Arduino IDE menu Add erase flash option to Arduino IDE menu Jul 27, 2022
@VojtechBartoska
Copy link
Contributor

One question from discussion:
Do we need to add this to all boards? Taking into account the 3rd party boards.

@VojtechBartoska
Copy link
Contributor

@P-R-O-C-H-Y
Copy link
Member

UPDATE: Did not find possible solution for erasing only part of the flash. We can add support to erase all flash before upload as it does now in this PR.

@P-R-O-C-H-Y P-R-O-C-H-Y marked this pull request as ready for review August 3, 2022 09:49
@P-R-O-C-H-Y P-R-O-C-H-Y added this to the 2.0.5 milestone Aug 3, 2022
@P-R-O-C-H-Y
Copy link
Member

Add few lines about this options to: https://docs.espressif.com/projects/arduino-esp32/en/latest/guides/tools_menu.html

Done.

Copy link
Member

@pedrominatel pedrominatel left a comment

Choose a reason for hiding this comment

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

PTAL!

Copy link
Member

@pedrominatel pedrominatel left a comment

Choose a reason for hiding this comment

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

LGTM

@SuGlider SuGlider self-requested a review August 8, 2022 18:15
@SuGlider SuGlider self-requested a review August 8, 2022 18:20
Copy link
Collaborator

@SuGlider SuGlider left a comment

Choose a reason for hiding this comment

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

@PilnyTomas | @P-R-O-C-H-Y

Please read my comments and let me know if you agree.
Then just adjust the file board.txt as suggested.
Thanks.

@PilnyTomas
Copy link
Contributor Author

@SuGlider I agree that this would be more descriptive / easier to understand, but @P-R-O-C-H-Y did most of the work so I will leave the decision up to him and I will unassign myself.

@PilnyTomas PilnyTomas removed their assignment Aug 9, 2022
@SuGlider
Copy link
Collaborator

SuGlider commented Aug 9, 2022

@P-R-O-C-H-Y, my suggestion to keep the same style as the other IDE Menu Options would be:

"Erase All Flash Before Uploading:" --> "Enabled" | "Disabled"

@PilnyTomas
Copy link
Contributor Author

Even better!

@P-R-O-C-H-Y
Copy link
Member

P-R-O-C-H-Y commented Aug 9, 2022

@P-R-O-C-H-Y, my suggestion to keep the same style as the other IDE Menu Options would be:

"Erase All Flash Before Uploading:" --> "Enabled" | "Disabled"

@SuGlider @pedrominatel @PilnyTomas
I agree with the last variant, sounds to be like the best one :) I have done the change in boards.txt + in docs.
I just slightly changed the text to "Erase All Flash Before Sketch Upload:" --> "Enabled" | "Disabled"

@SuGlider
Copy link
Collaborator

SuGlider commented Aug 9, 2022

Hi @P-R-O-C-H-Y - I see some changes to WiFi code... is it correct? Maybe something that came along with a git add.

Please let me know.

@VojtechBartoska VojtechBartoska removed the Status: Pending Merge Pull Request is ready to be merged label Aug 9, 2022
@VojtechBartoska
Copy link
Contributor

Also it will make sense to squash commits here.

@P-R-O-C-H-Y
Copy link
Member

P-R-O-C-H-Y commented Aug 10, 2022

Hi @P-R-O-C-H-Y - I see some changes to WiFi code... is it correct? Maybe something that came along with a git add.

Please let me know.

@SuGlider
Should be fixed :) I bit of commit mess. Sorry guys

@PilnyTomas
Copy link
Contributor Author

I still don't understand why would anyone need this. What is the benefit? Why should someone use it? Maybe a short description in the docs, please?

@SuGlider
Copy link
Collaborator

I still don't understand why would anyone need this. What is the benefit? Why should someone use it? Maybe a short description in the docs, please?

I had a need for that in the past. In my case, I was using SPIFFS and I had to erase the whole FS.
The easiet way was erasing the whole flash.
Another need may be to erase NVS with WiFi data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature request Feature request for Arduino ESP32
Projects
Development

Successfully merging this pull request may close these issues.

Erase Flash options are missing from Tools menu for ESP32 Dev Module (and others?)
5 participants