Skip to content
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

Flash application binary into specified partition #459

Closed
jnross opened this issue Aug 15, 2023 · 0 comments · Fixed by #461
Closed

Flash application binary into specified partition #459

jnross opened this issue Aug 15, 2023 · 0 comments · Fixed by #461
Labels
enhancement New feature or request

Comments

@jnross
Copy link
Contributor

jnross commented Aug 15, 2023

In our use of ESP32-S3, we specify three app partitions. One is a small factory partition that we use for factory reset and recovery, and the other two are OTA partitions we use for running our main application and updating in an A->B fashion.

By default cargo-espflash flash (and espflash flash) look at the provided partition table and flash the application from the provided (or built) ELF file into the first app partition found. This usually results in an error in our case because the application we are flashing doesn't fit into the factory app partition.

We're able to work around this by building separately, converting the ELF to a .bin, and then using write-bin, but it makes our tools more complicated and fragile.

I know not everyone is using three apps like this, but I bet there are others interested in targeting either the ota_0 or ota_1 partition when flashing a binary.

jnross added a commit to junelife/espflash that referenced this issue Aug 21, 2023
jnross added a commit to junelife/espflash that referenced this issue Aug 22, 2023
jnross added a commit to junelife/espflash that referenced this issue Aug 22, 2023
jnross added a commit to junelife/espflash that referenced this issue Aug 22, 2023
jnross added a commit to junelife/espflash that referenced this issue Aug 22, 2023
jnross added a commit to junelife/espflash that referenced this issue Aug 24, 2023
# Conflicts:
#	cargo-espflash/src/main.rs
#	espflash/src/bin/espflash.rs
#	espflash/src/cli/mod.rs
#	espflash/src/flasher/mod.rs
#	espflash/src/image_format/idf_bootloader.rs
#	espflash/src/targets/esp32.rs
#	espflash/src/targets/esp32c2.rs
#	espflash/src/targets/esp32c3.rs
#	espflash/src/targets/esp32c6.rs
#	espflash/src/targets/esp32h2.rs
#	espflash/src/targets/esp32s2.rs
#	espflash/src/targets/esp32s3.rs
#	espflash/src/targets/esp8266.rs
#	espflash/src/targets/mod.rs
jnross added a commit to junelife/espflash that referenced this issue Aug 25, 2023
# Conflicts:
#	cargo-espflash/src/main.rs
#	espflash/src/bin/espflash.rs
#	espflash/src/cli/mod.rs
#	espflash/src/flasher/mod.rs
#	espflash/src/image_format/idf_bootloader.rs
#	espflash/src/targets/esp32.rs
#	espflash/src/targets/esp32c2.rs
#	espflash/src/targets/esp32c3.rs
#	espflash/src/targets/esp32c6.rs
#	espflash/src/targets/esp32h2.rs
#	espflash/src/targets/esp32s2.rs
#	espflash/src/targets/esp32s3.rs
#	espflash/src/targets/esp8266.rs
#	espflash/src/targets/mod.rs
jnross added a commit to junelife/espflash that referenced this issue Sep 12, 2023
# Conflicts:
#	cargo-espflash/src/main.rs
#	espflash/src/bin/espflash.rs
#	espflash/src/cli/mod.rs
#	espflash/src/flasher/mod.rs
#	espflash/src/image_format/idf_bootloader.rs
#	espflash/src/targets/esp32.rs
#	espflash/src/targets/esp32c2.rs
#	espflash/src/targets/esp32c3.rs
#	espflash/src/targets/esp32c6.rs
#	espflash/src/targets/esp32h2.rs
#	espflash/src/targets/esp32s2.rs
#	espflash/src/targets/esp32s3.rs
#	espflash/src/targets/esp8266.rs
#	espflash/src/targets/mod.rs
@jessebraham jessebraham added the enhancement New feature or request label Sep 14, 2023
@SergioGasquez SergioGasquez linked a pull request Sep 18, 2023 that will close this issue
jnross added a commit to junelife/espflash that referenced this issue Nov 2, 2023
# Conflicts:
#	cargo-espflash/src/main.rs
#	espflash/src/bin/espflash.rs
#	espflash/src/cli/mod.rs
#	espflash/src/flasher/mod.rs
#	espflash/src/image_format/idf_bootloader.rs
#	espflash/src/targets/esp32.rs
#	espflash/src/targets/esp32c2.rs
#	espflash/src/targets/esp32c3.rs
#	espflash/src/targets/esp32c6.rs
#	espflash/src/targets/esp32h2.rs
#	espflash/src/targets/esp32s2.rs
#	espflash/src/targets/esp32s3.rs
#	espflash/src/targets/esp8266.rs
#	espflash/src/targets/mod.rs
SergioGasquez pushed a commit that referenced this issue Nov 4, 2023
* Add `--target-app-partition` argument to flash command. (For #459)

# Conflicts:
#	cargo-espflash/src/main.rs
#	espflash/src/bin/espflash.rs
#	espflash/src/cli/mod.rs
#	espflash/src/flasher/mod.rs
#	espflash/src/image_format/idf_bootloader.rs
#	espflash/src/targets/esp32.rs
#	espflash/src/targets/esp32c2.rs
#	espflash/src/targets/esp32c3.rs
#	espflash/src/targets/esp32c6.rs
#	espflash/src/targets/esp32h2.rs
#	espflash/src/targets/esp32s2.rs
#	espflash/src/targets/esp32s3.rs
#	espflash/src/targets/esp8266.rs
#	espflash/src/targets/mod.rs

* Update CHANGELOG.md
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants