Teensy LC support in audio library?

Status
Not open for further replies.

bkurtz

New member
I am under the impression that the audio library should support most teensy boards, however I've been trying to compile for Teensy LC and keep getting the following error:

Code:
Arduino: 1.8.11 (Mac OS X), TD: 1.50, Board: "Teensy LC, Serial, 48 MHz, Smallest Code, US English"

/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Audio/input_adc.cpp: In static member function 'static void AudioInputAnalog::isr()':
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Audio/input_adc.cpp:119:2: warning: 'daddr' is used uninitialized in this function [-Wuninitialized]
  if (daddr < (uint32_t)analog_rx_buffer + sizeof(analog_rx_buffer) / 2) {
  ^
/var/folders/k8/n_4nwx1j5zvb5h0pp9838tqw0000gn/T//ccLGSCiI.s: Assembler messages:
/var/folders/k8/n_4nwx1j5zvb5h0pp9838tqw0000gn/T//ccLGSCiI.s:291: Error: selected processor does not support `smull r0,ip,r3,r5' in Thumb mode
/var/folders/k8/n_4nwx1j5zvb5h0pp9838tqw0000gn/T//ccLGSCiI.s:292: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov ip,ip,asl r6'
/var/folders/k8/n_4nwx1j5zvb5h0pp9838tqw0000gn/T//ccLGSCiI.s:293: Error: unshifted register required -- `orr r0,ip,r0,lsr r7'
Multiple libraries were found for "SD.h"
 Used: /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/SD
 Not used: /Applications/Teensyduino.app/Contents/Java/libraries/SD
Error compiling for board Teensy LC.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This is for a brand new sketch from the template (i.e. just an empty setup() and loop()) except for adding the audio library like so:
Code:
#include <Audio.h>

This seems a bit confusing to me, because (afaict) the compiler seems to be generating invalid assembly code, which isn't something I've encountered before.

I'm running on macOS 10.13, in case that's relevant. I accidentally stepped on my Teensy LC last night and need to order a replacement, so I figured this is a good time for me to make sure the LC is supported and buy something else if needed.
 
The Teensy LC processor does not have the needed instruction set support to run the PJRC Audio library
 
Seemed a bit unfortunate to me to just give this up, since I'd already bought the hardware, and since all I really wanted to do was move audio files from the serial flash chip (on the prop shield) to the DAC output, which is something that the Teensy-LC should have *plenty* of power for. Especially since it was clear that someone had *started* (if not finished) adding support for Teensy-LC in the audio library. I ended up hacking a solution by pulling the relevant files out of the Audio library into my project directory (to work around other parts of the Audio library that were causing compile errors). Then I needed to make a few tweaks to the DAC output to work on the Teensy-LC, and now it works great. I've submitted those updates in a PR on github in case anyone is interested, though I doubt many folks are playing with the LC anymore, now that Teensy 4.0 is out.
 
Status
Not open for further replies.
Back
Top