Repository navigation
Description
Summary
master is red. The drift-check job fails on teensy40 with a C++ section type conflict, blocking CI for every open PR.
src/platforms/arm/teensy/audio/pjrc_input_i2s2.cpp.hpp:23:61: error:
'buffer' causes a section type conflict with
'fl::detail::objectfled_spi_internal::sSpiBitPattern' in section '.dmabuffers'
ERROR: Compilation failed for board teensy40
!!! Compile failed for backend=platformio board=teensy40 (rc=1)
Regression window
The build workflow on master:
| Commit | Result |
|---|---|
3de8d4f8 |
failure |
54107f0b |
success |
f10a1e77 |
success |
ed3ca38d |
success |
3de8d4f8 is fix(sdfat): route Teensy 3.x/LC SdFat SPI transport onto a FastLED DSPI bus (#3972).
Root cause
Two objects want .dmabuffers, but with incompatible section semantics.
File-scope static — src/platforms/arm/teensy/teensy4_common/drivers/objectfled/objectfled_spi_mode.cpp.hpp:128:
static DMAMEM u32 sSpiBitPattern[kSpiMaxOutputWords] __attribute__((used, aligned(32)));Function-local static inside an inline function — src/platforms/arm/teensy/audio/pjrc_input_i2s2.cpp.hpp:22-25:
inline fl::u32* i2s2_rx_buffer() {
static DMAMEM __attribute__((aligned(32))) I2S2RxBuffer buffer;
return buffer.data;
}A static local in an inline function must live in a COMDAT / linkonce section so duplicate instantiations across translation units can be merged. DMAMEM expands to a fixed __attribute__((section(".dmabuffers"))), which is a plain (non-COMDAT) section. GCC cannot satisfy both, so it reports the conflict against whichever other object already claimed .dmabuffers — here sSpiBitPattern.
This only surfaces when both headers land in the same translation unit, which is why it appears on teensy40 builds that pull in ObjectFLED SPI and the PJRC I2S2 audio input.
Suggested fix
Give the buffer external linkage at namespace scope instead of function-local-static-in-inline, so it gets one definition in a plain section:
// header
extern I2S2RxBuffer g_i2s2_rx_buffer;
// single .cpp.hpp translation unit
DMAMEM __attribute__((aligned(32))) I2S2RxBuffer g_i2s2_rx_buffer;
inline fl::u32* i2s2_rx_buffer() { return g_i2s2_rx_buffer.data; }Alternatives worth weighing: make i2s2_rx_buffer() non-inline and define it in exactly one TU, or drop DMAMEM from the audio buffer if it does not actually require uncached OCRAM2 (the ObjectFLED comment at objectfled_spi_mode.cpp.hpp:90-91 says DMAMEM is chosen there specifically to avoid per-show cache flushes; the audio path may not have the same constraint).
Impact
Blocks merging every open PR, including comment-only changes. Verified against PR #3989 (a pure comment edit) which fails identically.
Separate, also-failing job
build / build fails for an unrelated infrastructure reason on the same commit — a missing toolchain binary:
Error: failed to spawn [".../toolchains/tasmota-esptool/.../esptool-linux-amd64/esptool", ...]:
No such file or directory (os error 2)
build error: selected esptool executable could not be launched — cannot convert firmware.elf to firmware.bin
That looks like a corrupt or partially-restored toolchain cache rather than a code defect, but it also reproduces on the comment-only PR, so it is not caused by any open change.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Merge origin/master into feat/littlefs-backend
zackees commentedon Sep 3, 2026
Resolved on master. The function-local
static DMAMEMinside the inlinei2s2_rx_buffer()was replaced by a namespace-scopeDMAMEM static I2S2RxBuffer gI2S2RxBufferin #4057 (src/platforms/arm/teensy/audio/pjrc_input_i2s2.cpp.hpp), so it no longer needs a COMDAT section and cannot conflict with.dmabuffers. Theteensy40workflow has been green on master since (e.g. 9219a5e, 8d2a841, a1f30ff).