You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
teensy41: link fails on Ports/PJRCSpectrumAnalyzer — missing CMSIS-DSP (arm_cortexM7lfsp_math) in link args #257
After FastLED#2499 fixed the long-standing compile error in fl/channels/config.h (61+ consecutive teensy41 failures going back to mid-April), the teensy41 workflow now progresses through compile but still goes red on one example — Ports/PJRCSpectrumAnalyzer — which link-fails because fbuild's teensy41 toolchain isn't linking the ARM CMSIS-DSP math library that Teensy Audio's FFT classes depend on.
arm-none-eabi-gcc link failed:
<artificial>:(.text.startup+0x4ba): undefined reference to `arm_cfft_radix4_init_q15'
<artificial>:(.text+0x1cf6): undefined reference to `arm_cfft_radix4_q15'
collect2: error: ld returned 1 exit status
FAILED: Ports/PJRCSpectrumAnalyzer
Root cause
arm_cfft_radix4_init_q15 and arm_cfft_radix4_q15 are declared in CMSIS-DSP (arm_math.h) and live in libarm_cortexM7lfsp_math.a (shipped with the Teensy 4.x core under cores/teensy4/). The Teensy Audio library's FFT classes (AudioAnalyzeFFT256, etc.) require this library at link time. The Teensyduino IDE adds it via a -larm_cortexM7lfsp_math linker arg with the matching -L<core-dir> search path; fbuild's teensy41 toolchain config isn't emitting this for examples that pull in Teensy Audio FFT symbols.
Suggested fix
Either:
Add -larm_cortexM7lfsp_math (and the corresponding -L<framework>/cores/teensy4) unconditionally to fbuild's teensy41 link args — Teensyduino IDE does this for all sketches and the library is small enough that the overhead is negligible.
Or detect Teensy Audio usage and conditionally add the lib, mirroring whatever Audio-library linking heuristic Teensyduino uses internally.
Option 1 is simpler and matches Teensyduino's actual behavior.
Context
Last green teensy41 CI: I don't have one — failures go back at least 60 runs (mid-April).
The Teensyduino boards.txt entry for teensy41 specifies build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++, so this is mandatory for the platform, not example-specific.
Test plan
Compile examples/Ports/PJRCSpectrumAnalyzer for teensy41 via bash compile teensy41 --examples Ports/PJRCSpectrumAnalyzer — should link cleanly after the fix.
Activity
release: v2.2.4 (#259)
chore(deps): bump fbuild 2.2.4 -> 2.2.5 (fixes teensy41 multiple-defi…
chore(deps): bump fbuild 2.2.4 -> 2.2.5 (fixes teensy41 multiple-defi…
fix(teensy): auto-link Teensyduino CMSIS-DSP per-MCU (#300) (#313)