Skip to content

Reduce T-Echo firmware footprint to preserve future flash headroom - #11346

Closed
mviotti wants to merge 1 commit into
meshtastic:developfrom
mviotti:remove_BME68x_library_from_t-echo
Closed

Reduce T-Echo firmware footprint to preserve future flash headroom#11346
mviotti wants to merge 1 commit into
meshtastic:developfrom
mviotti:remove_BME68x_library_from_t-echo

Conversation

@mviotti

@mviotti mviotti commented Aug 3, 2026

Copy link
Copy Markdown

Remove the unused BME68x Sensor library from the T-Echo build. The T-Echo only supports the BME280 sensor, so including the BME68x library provides no functional benefit while consuming a significant amount of flash.

Results

Flash usage:

Before: 93.8% (764440 / 815104 bytes)
After: 88.6% (721792 / 815104 bytes)
This reclaims approximately 43 KB of flash (~5% of the available program memory), providing additional headroom for future features and reducing the risk of the T-Echo exceeding its flash limit as the firmware continues to evolve.

Build output before this change:

RAM:   [====      ]  37.5% (used 93212 bytes from 248832 bytes)
Flash: [========= ]  93.8% (used 764440 bytes from 815104 bytes)

Build output after this change:

RAM:   [====      ]  35.8% (used 89004 bytes from 248832 bytes)
Flash: [========= ]  88.6% (used 721792 bytes from 815104 bytes)

for the t-echo-inkhud version, there is also an improvement (this version was also tested):
Before the changes:

RAM:   [===       ]  33.9% (used 84372 bytes from 248832 bytes)
Flash: [========= ]  88.4% (used 720160 bytes from 815104 bytes)

After the changes:

RAM:   [===       ]  31.9% (used 79356 bytes from 248832 bytes)
Flash: [========  ]  82.7% (used 673904 bytes from 815104 bytes)

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)
    • LilyGo T-Echo

Summary by CodeRabbit

  • Chores
    • Improved T-Echo firmware build configuration.
    • Prevented unsupported sensor libraries from being included in T-Echo builds, helping ensure more reliable compilation and device firmware generation.

@CLAassistant

CLAassistant commented Aug 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d0cc1cb-3d32-40c5-bb37-57cf22c557a1

📥 Commits

Reviewing files that changed from the base of the PR and between 58657d4 and b8b9391.

📒 Files selected for processing (1)
  • variants/nrf52840/t-echo/platformio.ini

📝 Walkthrough

Walkthrough

The PlatformIO configuration adds inherited NRF52840 library exclusions and excludes bsec2 and the BME68x Sensor library from both T-Echo environments.

Changes

T-Echo library configuration

Layer / File(s) Summary
Configure T-Echo exclusions
variants/nrf52840/t-echo/platformio.ini
Both T-Echo environments inherit the NRF52840 ignore list and exclude BSEC2 and the BME68x Sensor library.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: vidplace7

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: reducing T-Echo firmware size to preserve flash capacity.
Description check ✅ Passed The description explains the change, reports measured results, and documents testing on the affected T-Echo hardware.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@mviotti, Welcome to Meshtastic!

Thanks for opening your first pull request. We really appreciate it.

We discuss work as a team in discord, please join us in the #firmware channel.
There's a big backlog of patches at the moment. If you have time,
please help us with some code review and testing of other PRs!

Welcome to the team 😄

@NomDeTom

NomDeTom commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

I don't think we are actually struggling for flash on this target - NRF pro-micro is at 98% and works.

Even if we were, this is not the way to recover flash - we would make a wider change than cherry picking specific devices.

@NomDeTom
NomDeTom self-requested a review August 3, 2026 19:53

@NomDeTom NomDeTom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This isn't the way to recover flash, and it's not causing a specific problem.

@mviotti

mviotti commented Aug 4, 2026

Copy link
Copy Markdown
Author

Hi @NomDeTom, thanks for the fedback. I will keep it in mind for further contributions.
I will close this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants