ESP32: Take away "tbeam" boards PSRAM to reclaim iram#10036
Merged
Conversation
Contributor
There was a problem hiding this comment.
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-tbeamPlatformIO board JSON that omits PSRAM enablement/workaround flags. - Updated several ESP32 variant
platformio.inienvironments to useboard = ttgo-tbeam. - Removed explicit PSRAM-related build flags from the
tbeamenvironment (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. |
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
e65d060 to
9202e8e
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You read that right! Disable PSRAM on the ttgo-tbeam board to reclaim iram.
ttgo-tbeam.jsonis 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-issueremoved.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
nano-g1-explorertbeam