Eclipse spiffs

MPCEngineer
Posts: 3
Joined: Tue Jul 28, 2020 2:42 pm

Eclipse spiffs

Postby MPCEngineer » Tue Jul 28, 2020 3:02 pm

Hi,

I am using eclipse to debug the ESP32 and its working great.

My problem is when I try to use spiffs.

I have included the line

spiffs_create_partition_image(my_partition ./data FLASH_IN_PROJECT )

in the base project CMakeLists.txt and I also have a folder data in the base project folder.

I keep getting the error Failed to create SPIFFS image for partition 'my_partition' and also Check project configuration if using the correct partition table file.

Any ideas?

Thanks.

MPCEngineer
Posts: 3
Joined: Tue Jul 28, 2020 2:42 pm

Re: Eclipse spiffs

Postby MPCEngineer » Wed Jul 29, 2020 8:20 am

Hi.

I have changed the sdkconfig to use a custom partition table csv and have included a partitions.csv file in the project base directory.

When I build the project using eclipse the output shows the new partition table.

Then I debug the project openOCD flashes the project and it runs okay but I can see from the bootup messages that the partition table has not been changed to the new one.

Questions:
1) Can openOCD flash a new partition table. How can this be done from eclipse?
2) I changed the flash size in sdkconfig to 4Meg but the boot messages when debugging the project say the binary image header is set to 2048K

Many Thanks,

MPC

MPCEngineer
Posts: 3
Joined: Tue Jul 28, 2020 2:42 pm

Re: Eclipse spiffs

Postby MPCEngineer » Wed Jul 29, 2020 9:00 am

Hi,

Found how to use eclipse with spiffs.

You have to add the following two lines to the debug configuration, Startup

mon program_esp ${workspace_loc:Spiffs/build/partition_table/partition-table.bin} 0x8000 verify
mon program_esp ${workspace_loc:Spiffs/build/storage.bin} 0x110000 verify

Where Spiffs is your project name and storage.bin is the binary file created by the following line added to your CMakeLists.txt

spiffs_create_partition_image(storage ../spiffs_image FLASH_IN_PROJECT)

partition-table.bin is created from your partitions_example.csv provided you have changed the sdkconfig to use a custom partition table.


Enjoy.....

askpatrickw
Posts: 19
Joined: Tue Jun 30, 2020 12:32 am

Re: Eclipse spiffs

Postby askpatrickw » Thu Oct 01, 2020 7:57 pm

I have hit your original problem: "Failed to create SPIFFS image for partition 'storage'. "

In theory this project is building fine for other people so I'm not 100% sure what could be wrong in my settings (vsCode).
We do have a partitions.csv

Code: Select all

# 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,     0x9000,  0x6000,
phy_init, data, phy,     0xf000,  0x1000,
factory,  app,  factory, 0x10000, 1M,
storage,  data, spiffs,  ,        0xF0000,
and our ./main/CMakeLists.txt has the create partition line.

Code: Select all

spiffs_create_partition_image(storage ../data FLASH_IN_PROJECT)
But I'm still hitting the "Failed to create SPIFFS image for partition 'storage'. " failure.
Can you clarify the config you needed for

Code: Select all

idf.py build
to work?

Thanks!

askpatrickw
Posts: 19
Joined: Tue Jun 30, 2020 12:32 am

Re: Eclipse spiffs

Postby askpatrickw » Mon Oct 05, 2020 4:46 pm

I solved my own problem...

The .gitignore was excluding the sdkconfig. We verified this by running `idf.py menuconfig` and the partitions were not setup to us the particions.csv. Once we corrected that it built fine.

Who is online

Users browsing this forum: No registered users and 67 guests