recreating partition table from scratch

nrg-fv
Posts: 2
Joined: Sat Jan 14, 2023 6:24 pm

recreating partition table from scratch

Postby nrg-fv » Sat Jan 14, 2023 6:46 pm

Hello everyone,

This is my first post on this forum so I hope someone can help me or at least advise if what I'm trying to do is at all possible.

I do have two already compiled, binary files for esp32 without access to the actual code (app portion and spiffs) but what I'm lacking is all the rest of necessary parts. I'm looking into possibility of recreating complete structure of flash content to see if I'm able to run the application. Reading https://docs.espressif.com/projects/esp ... table-type this seems like it may be possible but I would like for someone with better understanding of the platform to tell me if this is actually possible as I'm just starting my adventure with esp33 and don't know much about it.

Please correct me if I'm wrong but what I believe I need as a minimum is to get bootloader.bin and partitions.bin correctly edited with correct offsets for each partition. I believe bootloader is exactly the same regardless of the application so this binary can be taken from any compiled program but when it comes to partitions.bin this needs to be carefully recreated. Is there an easy way to do that?

Please let me know if what I'm thinking is correct or if this won't be at all possible due to some other reason.

Thank you in advance

nrg-fv

nrg-fv
Posts: 2
Joined: Sat Jan 14, 2023 6:24 pm

Re: recreating partition table from scratch

Postby nrg-fv » Mon Jan 16, 2023 12:47 pm

OK I've found the answer to my own question, so just recording this here if anyone else needs something similar in the future :)

Creating a partition table can be done manually using the gen_esp32part.py script located in esp-idf/components/partition_table.

There are several example CSV files with different partition layouts to get an idea of how this can be done. The syntax is self-explanatory and once we have our own CSV file with desired partition layout all we need to do is this:

Code: Select all

gen_esp32part.py --flash-size 4MB --verify test.csv table.bin
where test.csv is the file with partition layout details and table.bin is the result

Who is online

Users browsing this forum: No registered users and 106 guests