Skip to content

fix: use PlatformIO platform API to locate boot_app0.bin#347

Draft
Copilot wants to merge 4 commits intomdevfrom
copilot/update-ci-build-script
Draft

fix: use PlatformIO platform API to locate boot_app0.bin#347
Copilot wants to merge 4 commits intomdevfrom
copilot/update-ci-build-script

Conversation

Copy link

Copilot AI commented Mar 18, 2026

FRAMEWORK_DIR is not exposed as a SCons env variable in post-build scripts — it's internal to the platform builder. The previous fix always resolved to "", so boot_app0.bin was never copied and remained absent from CI artifact zips.

Changes

  • pio-scripts/output_bins.py: Replace env.get("FRAMEWORK_DIR", "") with env.PioPlatform().get_package_dir("framework-arduinoespressif32") — the correct PlatformIO API, consistent with how obj-dump.py already resolves platform paths. ESP8266 builds return None from get_package_dir() and are silently skipped; old arduino-esp32 1.0.x (no tools/partitions/boot_app0.bin) is skipped by the isfile() guard.
_ARDUINO_ESP32_PACKAGE = "framework-arduinoespressif32"
try:
    framework_dir = env.PioPlatform().get_package_dir(_ARDUINO_ESP32_PACKAGE)
    if framework_dir:
        boot_app0_src = os.path.join(str(framework_dir), "tools", "partitions", "boot_app0.bin")
        if os.path.isfile(boot_app0_src):
            shutil.copy(boot_app0_src, os.path.join(builddir, "boot_app0.bin"))
except Exception as e:
    print(f"Warning: could not copy boot_app0.bin ({e})")
  • .github/workflows/build.yml: Updated stale comment to reflect the platform API approach.

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…ware artifact zips

Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GitHub CI build script to include additional binaries CI: bundle partitions.bin, bootloader.bin, and boot_app0.bin into firmware artifact zips Mar 18, 2026
Copilot AI requested a review from softhack007 March 18, 2026 15:04
Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
…Cons env variable

Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
Copilot AI changed the title CI: bundle partitions.bin, bootloader.bin, and boot_app0.bin into firmware artifact zips fix: use PlatformIO platform API to locate boot_app0.bin Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants