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
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
63f915d
Removed virtual + moved socketOptions ot read/write
P-R-O-C-H-Y May 2, 2022
4d8e7de
Removed no needed code + edit
P-R-O-C-H-Y May 2, 2022
b5d5219
removed Client::getTimeout
P-R-O-C-H-Y May 2, 2022
38c8ab4
removed setTimeout from WifiClient - read/write timeouts in construct…
P-R-O-C-H-Y May 2, 2022
25b2062
Changed seconds to miliseconds in other classes relaed + examples
P-R-O-C-H-Y May 2, 2022
28e727d
Applied same changes for WifiClientSecure
P-R-O-C-H-Y May 2, 2022
6f5886b
Added 0 init values to constructor
P-R-O-C-H-Y May 2, 2022
1c7116b
Seconds are not rounded now
P-R-O-C-H-Y May 2, 2022
17adb9d
removed +500 for previous rounding
P-R-O-C-H-Y May 2, 2022
9a3461f
Initial commit
PilnyTomas Jul 27, 2022
53d0e35
Erase command change + added cmd to most common variants
P-R-O-C-H-Y Jul 27, 2022
caacfe6
Updated docs with erase flash option
P-R-O-C-H-Y Aug 3, 2022
dcfad8e
Merge branch 'master' into erase_flash
P-R-O-C-H-Y Aug 3, 2022
8161e78
docs update + tool menu name
P-R-O-C-H-Y Aug 3, 2022
6a584ef
Merge commit 'refs/pull/6676/head' of https://github.com/espressif/ar…
P-R-O-C-H-Y Aug 4, 2022
bf24e4b
Merge branch 'master' into erase_flash
SuGlider Aug 8, 2022
3f47a0c
Merge branch 'erase_flash' of https://github.com/PilnyTomas/arduino-e…
P-R-O-C-H-Y Aug 9, 2022
6f0cb63
Merge branch 'master' into erase_flash
P-R-O-C-H-Y Aug 9, 2022
31d0b73
Merge branch 'erase_flash' of https://github.com/PilnyTomas/arduino-e…
P-R-O-C-H-Y Aug 9, 2022
bbf8d48
Edit typo in boards.txt + docs
P-R-O-C-H-Y Aug 9, 2022
55d2a29
Revert "Merge branch 'erase_flash' of https://github.com/PilnyTomas/a…
P-R-O-C-H-Y Aug 10, 2022
5d97507
Revert "Merge commit 'refs/pull/6676/head' of https://github.com/espr…
P-R-O-C-H-Y Aug 10, 2022
c1d8859
Revert "Revert "Merge branch 'erase_flash' of https://github.com/Piln…
P-R-O-C-H-Y Aug 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ menu.LoRaWanDebugLevel=LoRaWan Debug Level
menu.LoopCore=Arduino Runs On
menu.EventsCore=Events Run On
menu.MemoryType=Memory Type
menu.EraseFlash=Erase Flash

##############################################################
### DO NOT PUT BOARDS ABOVE THE OFFICIAL ESPRESSIF BOARDS! ###
Expand Down Expand Up @@ -224,6 +225,11 @@ esp32s3.menu.DebugLevel.debug.build.code_debug=4
esp32s3.menu.DebugLevel.verbose=Verbose
esp32s3.menu.DebugLevel.verbose.build.code_debug=5

esp32s3.menu.EraseFlash.none=Only Sketch
esp32s3.menu.EraseFlash.none.upload.erase_cmd=
esp32s3.menu.EraseFlash.all=All Flash Contents
esp32s3.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

esp32c3.name=ESP32C3 Dev Module
Expand Down Expand Up @@ -374,6 +380,11 @@ esp32c3.menu.DebugLevel.debug.build.code_debug=4
esp32c3.menu.DebugLevel.verbose=Verbose
esp32c3.menu.DebugLevel.verbose.build.code_debug=5

esp32c3.menu.EraseFlash.none=Only Sketch
esp32c3.menu.EraseFlash.none.upload.erase_cmd=
esp32c3.menu.EraseFlash.all=All Flash Contents
esp32c3.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

esp32s2.name=ESP32S2 Dev Module
Expand Down Expand Up @@ -550,6 +561,11 @@ esp32s2.menu.DebugLevel.debug.build.code_debug=4
esp32s2.menu.DebugLevel.verbose=Verbose
esp32s2.menu.DebugLevel.verbose.build.code_debug=5

esp32s2.menu.EraseFlash.none=Only Sketch
esp32s2.menu.EraseFlash.none.upload.erase_cmd=
esp32s2.menu.EraseFlash.all=All Flash Contents
esp32s2.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

esp32.name=ESP32 Dev Module
Expand Down Expand Up @@ -715,6 +731,11 @@ esp32.menu.DebugLevel.debug.build.code_debug=4
esp32.menu.DebugLevel.verbose=Verbose
esp32.menu.DebugLevel.verbose.build.code_debug=5

esp32.menu.EraseFlash.none=Only Sketch
esp32.menu.EraseFlash.none.upload.erase_cmd=
esp32.menu.EraseFlash.all=All Flash Contents
esp32.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

esp32da.name=ESP32-WROOM-DA Module
Expand Down
8 changes: 8 additions & 0 deletions docs/source/guides/tools_menu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ Events Run On

This function is also used to select the core that runs the Arduino events. This is only valid if the target SoC has 2 cores.

Erase Flash
***********

This function is used to select if the flash memory should be erased before uploading the sketch.

* **Only Sketch** - Upload the sketch without erasing all flash contents. (default)
* **All Flash Contents** - Erase all flash contents before uploading the sketch.

Port
****

Expand Down
2 changes: 1 addition & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pluggable_monitor.required.serial=builtin:serial-monitor
tools.esptool_py.upload.protocol=serial
tools.esptool_py.upload.params.verbose=
tools.esptool_py.upload.params.quiet=
tools.esptool_py.upload.pattern_args=--chip {build.mcu} --port "{serial.port}" --baud {upload.speed} {upload.flags} --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size {build.flash_size} {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin" {upload.extra_flags}
tools.esptool_py.upload.pattern_args=--chip {build.mcu} --port "{serial.port}" --baud {upload.speed} {upload.flags} --before default_reset --after hard_reset write_flash {upload.erase_cmd} -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size {build.flash_size} {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin" {upload.extra_flags}
tools.esptool_py.upload.pattern="{path}/{cmd}" {upload.pattern_args}
tools.esptool_py.upload.pattern.linux=python3 "{path}/{cmd}" {upload.pattern_args}

Expand Down