Exporting for esp-web-tools

I’m going to build a [github action][1] which will build a project with PlatformIO and release the pieces of data to allow a web-based install direct to an ESP32/EDP8266 from the browser using esp-web-tools. (It may also be useful for me to extend PlatformIO’s pio run to produce a file/folder which holds the data needed for this, as others in this forum also use it for the [ESP32 download tool][2]

I’m looking for where I can find all the information I need for a [Manifest Definition][3], and would appreciate your help in finding the authoritative place to get it after running a pio run:

  • parts: The list of firmware parts to upload. The .pio/builds/{target}/idedata.json has the .extra.flash_images object which holds the standard parts for my ESP32 (bootloader_dio_40m.bin, partitions.bin, boot_app0.bin) — is this all the parts I’d need? (is the esp32.bin listed on the [example][3] necessary? The [answer here][2] implies I’m missing a part)
  • chipFamily: I can take a guess at this by looking at the same idedata.json in .defines and look for things that look like chip type, but is this more accurately defined elsewhere?
  • name: (ie. the name of the project) doesn’t appear to be [defined in platformio.ini][4], so use the name of the folder the platformio.ini is located in?

Any other advice here? I’m all for automating the build process as much as possible; I’d love to make it so people working with PlatformIO can help other people install their apps directly from websites with the addition of a single yaml file to their Github project!


Links, broken apart, because I’m new here and can’t post them all inline :pensive::
[1]: Github Actions: https:// docs .github.com/en/actions
[2]: Relevant post here: https:// community .platformio.org/t/export-of-binary-firmware-files-for-esp32-download-tool/9253)
[3]: Manifest Definition example: https:// github .com/esphome/esp-web-tools/#esp-web-tools
[4]: Relevant PlatformIO docs: https:// docs .platformio.org/en/latest/projectconf/section_platformio.html

Hi @jphastings, did you ever get anywhere on this? Trying to find similar details!

I’m trying to move project from ArudinoIDE to PlatformIO.

Arduino project had default partitions table, so, I used arduino-esp32/tools/partitions/default.csv at master · espressif/arduino-esp32 · GitHub as my partitions.csv for PlatformIO project.
(board_build.partitions = partitions.csv, when partitions.csv contains lines from default.csv)

My arduino project worked with esp-web-tools, so, I just put platformIO build artifacts instead of ArduinoIDE build artifacts, all of them except boot_app0.bin.

{
    "name": "The best firmware ever",
    "version": "36",
    "funding_url": "",
    "new_install_prompt_erase": true,
    "builds": [
      {
        "chipFamily": "ESP32",
        "improv": false,
        "parts": [
            { "path": "boot_app0.bin", "offset":  0},
            { "path": "bootloader.bin", "offset":  4096},
            { "path": "partitions.bin", "offset":  32768},
            { "path": "firmware.bin", "offset":  65536},
            { "path": "firmware.bin", "offset":  1376256},
            { "path": "littlefs.bin", "offset": 2686976}
        ]
      }
    ]
  }

Addresses here corresponds to partitions.csv.

bootleader.bin, partitions.bin, firmware.bin, firmware.bin (the same file) and littlefs.bin I got from .pio/build/esp32eev directory of my PlatformIO project.

boot_app0.bin I got from build artifacts in arduino IDE.

It works.
The question is: wtf boot_app0.bin and how can I get it from PlatformIO build.

boot_app0.bin is always the same. Take from wherever you find it