Skip to content

Teensy 4: DMAMEM driver statics marked used survive LTO in sketches that never use the driver #4713

Closed

Description

@zackees

Part of #4709.

sLpUartBuffer (lpuart_driver.cpp.hpp:194) and sSpiBitPattern (objectfled_spi_mode) are 4 KB DMAMEM statics. Whether they end up in a typed-Channel sketch that doesn't use LPUART or SPI depends on how LTO partitions the build (observed +9.2 KB RAM2 between two otherwise-equivalent builds). Teensy's DMAMEM places them in .dmabuffers. Remove used (or confirm the macro adds it) so unused-driver buffers can be garbage-collected.

Activity

  1. added a commit that references this issue on Oct 6, 2026
    3675a52
  2. added a commit that references this issue on Oct 8, 2026
    2d15bc9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions