Skip to content

ESP32: Take away "tbeam" boards PSRAM to reclaim iram#10036

Merged
thebentern merged 1 commit into
meshtastic:masterfrom
vidplace7:esp32-tbeam-psram
Mar 30, 2026
Merged

ESP32: Take away "tbeam" boards PSRAM to reclaim iram#10036
thebentern merged 1 commit into
meshtastic:masterfrom
vidplace7:esp32-tbeam-psram

Conversation

@vidplace7

Copy link
Copy Markdown
Member

You read that right! Disable PSRAM on the ttgo-tbeam board to reclaim iram.

ttgo-tbeam.json is a copy of https://github.com/platformio/platform-espressif32/blob/v6.13.0/boards/ttgo-t-beam.json with -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue removed.

PSRAM support on OG-ESP32 involves a lot of iram usage thanks to iram-heavy workarounds that have been added to address hardware bugs.

See https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32/api-guides/performance/ram-usage.html#optimizing-iram-usage

  • Fixes compiles on nano-g1-explorer
  • Fixes compiles on tbeam

@vidplace7 vidplace7 requested review from Copilot and thebentern March 30, 2026 16:42
@vidplace7 vidplace7 added the bugfix Pull request that fixes bugs label Mar 30, 2026
@github-actions github-actions Bot added the needs-review Needs human review label Mar 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a custom PlatformIO board definition for the TTGO T-Beam that disables PSRAM-related build flags to reduce IRAM pressure on OG ESP32 targets, and switches affected ESP32 variant environments to use that new board ID.

Changes:

  • Added a new ttgo-tbeam PlatformIO board JSON that omits PSRAM enablement/workaround flags.
  • Updated several ESP32 variant platformio.ini environments to use board = ttgo-tbeam.
  • Removed explicit PSRAM-related build flags from the tbeam environment (now implicitly disabled via the custom board).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
variants/esp32/tbeam_v07/platformio.ini Switch env to the new ttgo-tbeam board ID.
variants/esp32/tbeam/platformio.ini Switch board ID and remove explicit PSRAM-related flags.
variants/esp32/station-g1/platformio.ini Switch env to the new ttgo-tbeam board ID.
variants/esp32/nano-g1/platformio.ini Switch env to the new ttgo-tbeam board ID.
variants/esp32/nano-g1-explorer/platformio.ini Switch env to the new ttgo-tbeam board ID.
boards/ttgo-tbeam.json Add custom board definition with PSRAM disabled to reclaim IRAM.

Comment thread variants/esp32/station-g1/platformio.ini Outdated
You read that right! Disable PSRAM on the ttgo-tbeam board to reclaim *iram*.

ttgo-tbeam.json is a copy of https://github.com/platformio/platform-espressif32/blob/v6.13.0/boards/ttgo-t-beam.json with HAS_PSRAM removed.

PSRAM support on OG-ESP32 involves a lot of iram usage thanks to iram-heavy workarounds that have been added to address hardware bugs.

See https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32/api-guides/performance/ram-usage.html#optimizing-iram-usage
@thebentern thebentern merged commit 0abd3cd into meshtastic:master Mar 30, 2026
78 checks passed
@vidplace7 vidplace7 deleted the esp32-tbeam-psram branch March 30, 2026 18:57
@mrekin mrekin mentioned this pull request Apr 3, 2026
3 tasks
skrashevich pushed a commit to skrashevich/meshtastic-firmware that referenced this pull request Apr 4, 2026
You read that right! Disable PSRAM on the ttgo-tbeam board to reclaim *iram*.

ttgo-tbeam.json is a copy of https://github.com/platformio/platform-espressif32/blob/v6.13.0/boards/ttgo-t-beam.json with HAS_PSRAM removed.

PSRAM support on OG-ESP32 involves a lot of iram usage thanks to iram-heavy workarounds that have been added to address hardware bugs.

See https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32/api-guides/performance/ram-usage.html#optimizing-iram-usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes bugs needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants