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

image_too_big error when using espflash v3.0.0 #617

Open
armandas opened this issue Mar 20, 2024 · 4 comments
Open

image_too_big error when using espflash v3.0.0 #617

armandas opened this issue Mar 20, 2024 · 4 comments

Comments

@armandas
Copy link

I tried to upgrade to v3.0.0, but it produces the following error:

[2024-03-20T08:04:58Z INFO ] Serial port: '/dev/ttyACM0'
[2024-03-20T08:04:58Z INFO ] Connecting...
[2024-03-20T08:04:58Z INFO ] Using flash stub
Chip type:         esp32s3 (revision v0.2)
Crystal frequency: 40 MHz
Flash size:        8MB
Features:          WiFi, BLE
MAC address:       48:27:e2:82:7d:58
Error: espflash::image_too_big (link)

  × Supplied ELF image of 1114592B is too big, and doesn't fit configured app partition of 1048576B
  help: Reduce the size of the binary or increase the size of the app partition.

V2.1.0 works fine:

[2024-03-20T07:58:18Z INFO ] 🚀 A new version of espflash is available: v3.0.0
[2024-03-20T07:58:18Z INFO ] Serial port: '/dev/ttyACM0'
[2024-03-20T07:58:18Z INFO ] Connecting...
[2024-03-20T07:58:18Z INFO ] Using flash stub
Chip type:         esp32s3 (revision v0.2)
Crystal frequency: 40MHz
Flash size:        8MB
Features:          WiFi, BLE
MAC address:       48:27:e2:82:7d:58
App/part. size:    1,114,592/8,323,072 bytes, 13.39%
[00:00:00] [========================================]      14/14      0x0                                                                                                                                                                    [00:00:00] [========================================]       1/1       0x8000                                                                                                                                                                 [00:00:08] [========================================]     650/650     0x10000                                                                                                                                                                [2024-03-20T07:58:28Z INFO ] Flashing has completed!
@SergioGasquez
Copy link
Member

Hi! Mind giving some more details? Are you using espflash or cargo-espflash? Is it a std or no_std app? Also, mind trying using --no-stub and --flash-size arguments?

@armandas
Copy link
Author

Sure. I am using the espflash command, as described here. My project is using std, but how does that affect the flashing tool?

--no-stub didn't help, but it did work with --flash-size 8mb. From the output in my previous post, however, we can see that the tool already knows there's 8MB of flash.

@armandas
Copy link
Author

armandas commented Mar 25, 2024

Also just want to add that I haven't explicitly configured the partitions, but V2 tool had no problem with it, so from usability perspective, the new tool should not break either.

@empirephoenix
Copy link

empirephoenix commented Apr 2, 2024

Hi, I'm running into the same issue since the last update of espflash

× Supplied ELF image of 1582768B is too big, and doesn't fit configured app partition of 1048576B
  help: Reduce the size of the binary or increase the size of the app partition.

My goal is to convert the binary, so I can use it OTA as before.
If I understand correctly, --merged is not correct for my use case, as it will contain the whole flash, not just the new image for the ota partition, but without merged, I cannot use --partition-table. I tried settings --flash-size, but it did not have any apparent change.

My actual partition table is:

nvs,      data, nvs,     ,        16k,
otadata,  data, ota,     ,        8k,
phy_init, data, phy,     ,        4k,
ota_0,    app,  ota_0,   ,        1792K,
ota_1,    app,  ota_1,   ,        1792K,
storage,  data, spiffs,  ,        400K, 

Failed command
cargo espflash save-image --chip esp32 image.bin

Workaround

cargo install espflash --version 2.1.0 cargo-espflash
cargo install espflash --version 2.1.0 espflash

After this the same command returns:

[2024-04-02T09:31:18Z INFO ] 🚀 A new version of cargo-espflash is available: v3.0.0
   Compiling plant-ctrl2 v0.1.0 (/home/empire/workspace/PlantCtrl/rust)
    Finished dev [optimized + debuginfo] target(s) in 7.33s
Chip type:         esp32
Merge:             false
Skip padding:      false
App/part. size:    1,582,768/4,128,768 bytes, 38.34%

empirephoenix pushed a commit to empirephoenix/espflash that referenced this issue May 2, 2024
empirephoenix pushed a commit to empirephoenix/espflash that referenced this issue May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants