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

cargo-espflash not picking up partitions.csv? #402

Closed
weiying-chen opened this issue Mar 30, 2024 · 5 comments
Closed

cargo-espflash not picking up partitions.csv? #402

weiying-chen opened this issue Mar 30, 2024 · 5 comments

Comments

@weiying-chen
Copy link
Contributor

I cloned the repo and ran:

MCU=esp32c3 cargo espflash flash --target riscv32imc-esp-espidf --example wifi --monitor

And I got this error:

Error: espflash::image_too_big (link)

  × Supplied ELF image of 1799664B 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.

This is the current partitions.csv:

# Name,   Type, SubType, Offset,  Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs,      data, nvs,     ,        0x6000,
phy_init, data, phy,     ,        0x1000,
factory,  app,  factory, ,        3M,

The app partition seems to be set to 3M. And no matter how I change partitions.csv, I keep getting the same error.

@weiying-chen
Copy link
Contributor Author

weiying-chen commented Mar 30, 2024

I solved the issue by generating my own partitions-table.bin (in the repo's root folder):

espflash partition-table --to-binary --output partition-table.bin partitions.csv

Then passing it to cargo espflash as an argument:

MCU=esp32c3 cargo espflash flash --target riscv32imc-esp-espidf --example wifi --monitor --partition-table="partition-table.bin"

@Vollbrecht
Copy link
Collaborator

If you are using espflash than this is not a problem, but cargo espflash works a bit different. Because they made changes in the respected versions 3 of espflash and cargo espflash we now provide the partitions.csv in the root. Though with the extra espflash.toml file it should automatically pick it up.

What version of espflash are you using? It should working with a csv file and if not it may indicate a bug in espflash

@weiying-chen
Copy link
Contributor Author

weiying-chen commented Mar 30, 2024

Ah, I updated espflash and cargo-espflash (from 2.x.x to 3.x.x). The error is gone. Sorry, I should have done that before opening this issue.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Mar 31, 2024
@vult0306
Copy link

vult0306 commented Oct 13, 2024

image
My espflash is 3.1.1 but the issue is still there

@Vollbrecht
Copy link
Collaborator

image My espflash is 3.1.1 but the issue is still there

No it is not a problem. Please read the comments carefully. You are using espflash where you have to provide the partiton-table as an argument. Only cargo espflash has the capability to pick it up for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants