I am adapting the adafruit/nina-fw firmware for ESP32 to build with PlatformIO. I have the project compiling, but I’m unsure how to port over the construction of the firmware image binary.
The original code uses this partitions.csv file:
# Name, Type, SubType, Offset, Size nvs, data, nvs, 0x9000, 0x6000 phy_init, data, phy, 0xf000, 0x1000 certs, data, 0x04, 0x10000, 0x20000 factory, app, factory, 0x30000, 0x180000
The combine.py script merges together the boot loader, some certificate trust store data, and some other contents. At runtime, the code uses
esp_partition_find_first() to locate the certificate data.
It looks like PlatformIO embeds binary data differently using
board_build.embed_files. That being the case, I think I ought to be able to just use the default partitions_singleapp.csv layout. But this always errors with:
> Could not find the any filesystem section in the partitions table ~/.email@example.com/components/partition_table/partitions_singleapp.csv
My sdkconfig.nina-fw file is already set up for “Single factory app, no OTA”:
What’s missing? Why is PlatformIO being insistent on my having a SPIFFS partition?
Other questions: Is it possible to embed the certificate data using the named partition method (avoiding a code change)? And I don’t have to do anything to have the bootloader embedded into the firmware image, right?
My platformio.ini file so far:
[platformio] src_dir = main [env:nina-fw] platform = espressif32 @ 5.4.0 # for esp-idf 4.4.5 framework = espidf board = esp32-s3-devkitc-1 # board_build.partitions = partitions.csv