Skip to content

Arduino Release 3.3.9#502

Merged
Jason2866 merged 31 commits into
mainfrom
rel_339
Jun 4, 2026
Merged

Arduino Release 3.3.9#502
Jason2866 merged 31 commits into
mainfrom
rel_339

Conversation

@Jason2866
Copy link
Copy Markdown

@Jason2866 Jason2866 commented Jun 4, 2026

Description:

Related issue (if applicable): fixes #

Checklist:

  • The pull request is done against the latest develop branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR, more changes are allowed when changing boards.json
  • I accept the CLA

Summary by CodeRabbit

  • New Features

    • Added filesystem partition selection support via board_build.filesystem_partition option
    • Integrated pio-lock for dependency version locking via pio.lock.json
    • Added clangd intellisense engine support
  • Bug Fixes

    • Improved exception decoder with ESP32H4 support and enhanced backtrace detection
  • Documentation

    • New guides for filesystem partition selection and pio-lock integration
    • Updated VSCode extension setup instructions
    • Removed deprecated FatFS documentation
  • Chores

    • Updated Espressif Arduino to 3.3.9
    • Updated tools: debuggers, esptoolpy 5.3.0, OpenOCD 20260424
    • Enhanced PSRAM configuration for multiple boards

Jason2866 and others added 29 commits April 12, 2026 23:28
#468)

The double curly braces {{...}} around file paths in program_esp
commands produce literal brace characters in Tcl, which conflict with
the additional quoting in esp_common.cfg (line 453). This causes:
  Error: couldn't open {.pio/build/.../firmware.bin}

Single braces {...} are the correct Tcl quoting mechanism and properly
handle paths with spaces without conflicting with esp_common.cfg.

Fixes #466

Amp-Thread-ID: https://ampcode.com/threads/T-019d86a7-7c20-7398-9ca1-d1261af6d9d3

Co-authored-by: Amp <amp@ampcode.com>
Detect if platformio-core's FileDownloader already has a RETRY class
attribute (introduced in the upstream retry enhancement). When present,
the native implementation handles retries with urllib3.Retry for initial
connections and _stream_with_retry for mid-download failures, making the
monkey-patch redundant.

This avoids double-retry scenarios (up to 5x5 = 25 attempts) and
exception type mismatches (native code raises IOError, not
PackageException) when running against an enhanced platformio-core.

Amp-Thread-ID: https://ampcode.com/threads/T-019d8365-f1fd-713f-80df-fede9167d179

Co-authored-by: Amp <amp@ampcode.com>
Removed submodule checkout and updated dependency installation command.
The pioarduino IDE extension now exports PLATFORMIO_IDE_INTELLISENSE_ENGINE
as an environment variable. When the value is 'clangd', the platform
automatically installs tool-clangd-esp during configure_default_packages().

Espressif's clangd has native Xtensa and ESP RISC-V ISA extension support
(xespv, xesploop, xespdsp, etc.) that the upstream clangd lacks, which
eliminates unknown-flag errors and improves IntelliSense for ESP32 targets.

Amp-Thread-ID: https://ampcode.com/threads/T-019d8c25-963a-728c-8166-76efd9747d60

Co-authored-by: Amp <amp@ampcode.com>

* Strip and lowercase IntelliSense engine variable

---------

Co-authored-by: Amp <amp@ampcode.com>
* fix: add missing -DBOARD_HAS_PSRAM to boards/atd147_s3.json

* fix: add missing -DBOARD_HAS_PSRAM to boards/dfrobot_romeo_esp32s3.json

* fix: add missing -DBOARD_HAS_PSRAM to boards/lilygo-t-display-s3.json

* fix: add missing -DBOARD_HAS_PSRAM to boards/m5stack-atoms3u.json

* fix: add missing -DBOARD_HAS_PSRAM to boards/nebulas3.json

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Refactor PSRAM detection logic and configure PSRAM frequency only if supported.
* Add options for esp32 without PSRAM
* Include linker script for ESP32 without PSRAM
Updated README to indicate support has ended for standalone mode and provided links to the VSC extension.
Removed Python version requirements from README.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR migrates the pioarduino platform to use pioarduino as the core dependency, adds PSRAM detection and configuration across multiple boards, centralizes filesystem partition selection with named partition support, integrates pio-lock for dependency locking, refreshes platform tooling versions, and fixes exception decoder buffering.

Changes

Dependency bootstrap and framework infrastructure

Layer / File(s) Summary
Dependency migration to pioarduino and penv setup refactor
.github/workflows/examples.yml, builder/penv_setup.py
CI workflow installs pioarduino directly; penv setup removes URL-version pinning, switches to semantic versioning for pioarduino, and extends install_python_deps to merge additional dependencies.
Board PSRAM flags and framework PSRAM detection heuristics
boards/atd147_s3.json, boards/dfrobot_romeo_esp32s3.json, boards/lilygo-t-display-s3.json, boards/m5stack-atoms3u.json, boards/nebulas3.json, builder/frameworks/espidf.py
Five board configs add BOARD_HAS_PSRAM build flags; framework enforces build.mcu requirement and extends PSRAM detection with fallback heuristics checking memory_type, build.psram_type, and extra flags content.
Framework linker scripts and bootloader configuration
builder/frameworks/arduino.py, builder/frameworks/espidf.py
Linker wrap for log_printf is added to BUILD_UNFLAGS; esp32-specific libc-funcs linker script, PSRAM frequency gating, and bootloader SPI write-protect pin configuration are integrated into the build pipeline.
sdkconfig precedence and CLI target forwarding
builder/frameworks/espidf.py
New get_requested_cli_targets() helper parses CLI args with sys.argv fallback; sdkconfig replacement now prioritizes later custom flags; HybridCompile forwards filtered child targets and exits immediately.

Filesystem and build configuration

Layer / File(s) Summary
Filesystem partition selection and image handling
builder/main.py
Partition constants and allowlists are centralized; fetch_fs_size() prioritizes named user-configured partitions; LittleFS uses explicit format/mount sequence; partition download refactored to validate subtypes and alignment; subtype mapping updated.
Filesystem partition selection documentation
docs/FILESYSTEM_PARTITION_SELECTION.md
New guide documents board_build.filesystem_partition configuration, accepted partition type/subtype formats, selection behavior with fallback logic, and example partition tables.

Tooling and integration

Layer / File(s) Summary
pio-lock integration: install function and SCons registration
builder/penv_setup.py, builder/main.py, docs/PIO_LOCK_INTEGRATION.md
New install_pio_lock() helper installs pio-lock v0.2.0; conditional custom_pio_lock SCons targets are registered; comprehensive documentation covers usage, targets, CI workflows, and troubleshooting.
Platform package metadata, downloader resilience, and clangd configuration
platform.json, platform.py
Platform version advanced to 55.03.39; framework and tool versions updated (Arduino 3.3.9, debuggers, esptoolpy, OpenOCD, new tool-clangd-esp); FileDownloader patched with exponential backoff retry; clangd tool auto-configured based on IDE environment variable.

Documentation and monitoring

Layer / File(s) Summary
Documentation updates and cleanup
README.md, monitor/README_STANDALONE.md
README updates VSCode extension links and Arduino version to 3.3.9, removes FatFS Integration section; monitor README adds deprecation notice; FatFS and wear-leveling documentation files removed.
Exception decoder buffer handling and chip support
monitor/filter_exception_decoder.py
Buffered partial bytes are prepended to text stream before line-splitting; BACKTRACE_KEYWORDS regex updated with additional context triggers; esp32h4 chip support added to CHIP_NAME_MAP.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through pioarduino's land,
PSRAM flags planted across each board so grand,
Partitions are chosen with names in hand,
pio-lock captures versions, oh so grand,
Platform tools buffed, exceptions caught—
A release well-woven as nature has taught!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 79.31% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "Arduino Release 3.3.9" directly corresponds to the main objective of the pull request, which is a release PR for Arduino v3.3.9. This is the primary change across the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rel_339

Warning

Tools execution failed with the following error:

Failed to run tools: Ping-pong health check failed


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/PIO_LOCK_INTEGRATION.md`:
- Line 221: Update the example lockfile platform URL value so it matches the
released version: change the string value under the "platform" key from
".../55.03.38/platform-espressif32.zip" to
".../55.03.39/platform-espressif32.zip" in the docs example (the JSON line
containing the "platform" key).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3dc4db28-25b4-4dc3-8bd0-4bd24bd90fad

📥 Commits

Reviewing files that changed from the base of the PR and between 669bcf7 and 1761124.

📒 Files selected for processing (25)
  • .github/workflows/examples.yml
  • README.md
  • boards/atd147_s3.json
  • boards/dfrobot_romeo_esp32s3.json
  • boards/lilygo-t-display-s3.json
  • boards/m5stack-atoms3u.json
  • boards/nebulas3.json
  • builder/frameworks/arduino.py
  • builder/frameworks/espidf.py
  • builder/main.py
  • builder/penv_setup.py
  • docs/ARDUINO_RELINKER_INTEGRATION.md
  • docs/FATFS_INTEGRATION.md
  • docs/FILESYSTEM_PARTITION_SELECTION.md
  • docs/PIO_LOCK_INTEGRATION.md
  • docs/RELINKER_INTEGRATION.md
  • docs/WEAR_LEVELING.md
  • examples/arduino-fatfs/FATFS_INTEGRATION.md
  • examples/arduino-fatfs/WEAR_LEVELING.md
  • misc/svd/esp32c5.svd
  • misc/svd/esp32c61.svd
  • monitor/README_STANDALONE.md
  • monitor/filter_exception_decoder.py
  • platform.json
  • platform.py
💤 Files with no reviewable changes (2)
  • examples/arduino-fatfs/WEAR_LEVELING.md
  • examples/arduino-fatfs/FATFS_INTEGRATION.md

"packages": {
"tool-esptoolpy": "5.2.0"
},
"platform": "https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38/platform-espressif32.zip"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the lockfile platform URL example to the current release version.

Line 221 still shows 55.03.38, but this PR publishes 55.03.39 in platform.json. Keeping the example aligned avoids copy/paste drift.

📝 Suggested doc fix
-      "platform": "https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38/platform-espressif32.zip"
+      "platform": "https://github.com/pioarduino/platform-espressif32/releases/download/55.03.39/platform-espressif32.zip"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"platform": "https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38/platform-espressif32.zip"
"platform": "https://github.com/pioarduino/platform-espressif32/releases/download/55.03.39/platform-espressif32.zip"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/PIO_LOCK_INTEGRATION.md` at line 221, Update the example lockfile
platform URL value so it matches the released version: change the string value
under the "platform" key from ".../55.03.38/platform-espressif32.zip" to
".../55.03.39/platform-espressif32.zip" in the docs example (the JSON line
containing the "platform" key).

@Jason2866 Jason2866 merged commit cbc3349 into main Jun 4, 2026
1 check passed
@Jason2866 Jason2866 deleted the rel_339 branch June 4, 2026 15:27
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.

1 participant