Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy LC support in audio library?

  1. #1
    Junior Member
    Join Date
    Feb 2020

    Teensy LC support in audio library?

    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:

    Arduino: 1.8.11 (Mac OS X), TD: 1.50, Board: "Teensy LC, Serial, 48 MHz, Smallest Code, US English"
    /Applications/ In static member function 'static void AudioInputAnalog::isr()':
    /Applications/ 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/
     Not used: /Applications/
    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:
    #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.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    The Teensy LC processor does not have the needed instruction set support to run the PJRC Audio library

  3. #3
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Germany NRW
    Quote Originally Posted by defragster View Post
    The Teensy LC processor does not have the needed instruction set support to run the PJRC Audio library
    Yes, and if this weren't enough, the available memory is too less.

  4. #4
    Junior Member
    Join Date
    Feb 2020
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts