Commit 431eee9
fix(teensy41): link libarm_cortexM7lfsp_math (CMSIS-DSP)
Closes #257.
`Ports/PJRCSpectrumAnalyzer` and any other Teensy Audio FFT example
fails to link on teensy41 with:
undefined reference to `arm_cfft_radix4_init_q15'
undefined reference to `arm_cfft_radix4_q15'
These symbols live in `libarm_cortexM7lfsp_math.a`, shipped by the
Teensy 4.x core. Teensyduino's `boards.txt` specifies
`build.flags.libs=-larm_cortexM7lfsp_math -lm -lstdc++` mandatorily
for the platform — it's not example-specific.
fbuild's teensy4x.json `linker_libs` was missing the CMSIS-DSP entry.
Add `-larm_cortexM7lfsp_math` to the front of the list so it precedes
the standard libs (libgcc / libstdc++ / libm / libc). The `-L<core_dir>`
search path is already emitted via `LinkerScripts::single(core_dir, ...)`
in teensy/orchestrator.rs:244 (the same dir that holds the .ld script
also holds the lib), so no additional path config is required.
Regression test `teensy4x_links_cmsis_dsp_math` added to
`teensy/mcu_config.rs`.
Note: the PlatformIO reference JSON for teensy41
(crates/fbuild-build/src/teensy/configs/reference/teensy41.json) also
omits this lib — PlatformIO appears to have the same gap. Following
Teensyduino's boards.txt rather than PlatformIO's reference is the
correct call per the issue analysis.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9f0a0f9 commit 431eee9
2 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
202 | 222 | | |
203 | 223 | | |
204 | 224 | | |
| |||
0 commit comments