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

Thread: Teensy 4.1 Adafruit TinyUSB Support

  1. #1
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727

    Teensy 4.1 Adafruit TinyUSB Support

    I've made some minor changes to the existing libraries to let it work with a Teensy 4.1 since the imxrt1060 processor already had support just not with the Teensy defines, I've also modified two of the MSC examples to work with the Teensy since they won't work straight out of the box because the Teensy Core doesn't make calls to some of the functions like the Adafruit one would.

    This requires the use of USB Type: No USB which is supported in Teensyduino 1.54 beta 5 but boards.txt needs to be edited to enable it for selection.

    After that you can load up the example "Adafruit_TinyUSB_Teensy_MSC_SD" and put an SD card into the Teensy and it'll show up in your computer and I've verified read and write works, I'm getting about 9MB/s write and 7.5MB/s read with the Black Magic Design Disk Speed Test with a 16GB Sandisk Ultra.

    I've briefly test it's usb midi and I at least know receiving works, as for usb serial it works for receiving and sending with one exception is that it won't send anything until either the entire buffer is full or you can USBSerial.flush after printing. I'm not familiar enough with TinyUSB to try and fix that particular issue as of right now so I'll leave it how it is for the time being.

    I haven't tested WebUSB or HID, but theoretically they should work if you use one of the examples and follow the MSC examples to add the same functions to init the Teensy USB hardware.

    This is mainly a proof of concept since it started as just wanting to see if I could make it work, mainly the MSC part of it because for those of us on MacOS it's the easiest way to access the SD card since MTP isn't natively supported.

    Click image for larger version. 

Name:	Screen Shot 2020-11-21 at 9.24.14 PM.jpg 
Views:	46 
Size:	71.1 KB 
ID:	22566

    Here's the TeensyCore library: https://github.com/vjmuzik/Adafruit_TinyUSB_TeensyCore
    Here's the Common library: https://github.com/vjmuzik/Adafruit_TinyUSB_Arduino

  2. #2
    Senior Member blackketter's Avatar
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    316
    Neat! Will you be trying to merge this upstream?

  3. #3
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727
    I don’t have plans to merge this or if I’ll continue it further than what it is now, like I said I only wanted see if it was feasible.

  4. #4
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,096
    Very cool. Just downloaded to give it a try and also downloaded latest core files + Adafruit SPIFlash library.

    Just one question what is the mod to the board.txt file to select NO USB

    EDIT: Never mind just found my answer;
    Add support to T4 core to use USB Type: No USB, corresponding lines in boards.txt also need to be uncommented for the option to show up in the menu. This is really a copy and paste from the T3 core implementation of this so nothing major has been changed.

  5. #5
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,096
    Getting requirement to set a couple things in sdfat, sdconfig.h. So you need to download the Adafruit version of SDFat but this is going to be a problem. 1 It will conflict with the one in the core and 2 the adafruit version doesn't appear to be configured for the T4.x

  6. #6
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727
    Use the “Adafruit_TinyUSB_Teensy_MSC_SD” example, it just uses the SD wrapper Paul made with the beta.

  7. #7
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,096
    Quote Originally Posted by vjmuzik View Post
    Use the “Adafruit_TinyUSB_Teensy_MSC_SD” example, it just uses the SD wrapper Paul made with the beta.
    Just tested the SD version using Builtin_sdcard and a cardreader on pin4. Both worked and identified the existing files on the sd cards. This is on a windows 10 x64 pc.

    Tried the ramdisk version as well and it worked with your default config and no issue - had to format first then it worked no issue Only drawback is that I don't see an easy way to tell it to use say EXTMEM or say DMAMEM.

    Both cases was able to copy and past files as well as delete them.

    EDIT
    Wanted to say this again - very cool that you got it working.

  8. #8
    Wow – huge thank you!!
    I've been working toward this for a long time with no success. Truly appreciate you figuring it out and taking the time to share it!

    Is it possible to adapt it for Teensy 4.0? What would I need to change?

    I can compile it for Teensy 4.1, but when I try to compile for Teensy 4.0 – I get these errors:

    Code:
    /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src/Adafruit_TinyUSB_Core.cpp: In function 'void Adafruit_TinyUSB_Core_init()':
    /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src/Adafruit_TinyUSB_Core.cpp:83:19: error: 'USB_VID' was not declared in this scope
       USBDevice.setID(USB_VID, USB_PID);
                       ^
    /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src/Adafruit_TinyUSB_Core.cpp:83:28: error: 'USB_PID' was not declared in this scope
       USBDevice.setID(USB_VID, USB_PID);
                                ^
    Multiple libraries were found for "SD.h"
     Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD
     Not used: /Applications/Arduino.app/Contents/Java/libraries/SD
    Multiple libraries were found for "SdFat.h"
     Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat
     Not used: /Users/isaacjacobson/Documents/Arduino/libraries/SdFat_-_Adafruit_Fork
    Using library SD at version 2.0.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD 
    Using library SdFat at version 2.0.0-beta.8 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat 
    Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI 
    Using library Adafruit_TinyUSB_Arduino-master at version 0.10.0 in folder: /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master 
    Using library Adafruit_TinyUSB_TeensyCore-master at version 0.10.0 in folder: /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master 
    Error compiling for board Teensy 4.0.

    Using the TeensyCore and Common library you attached;
    Using “Adafruit_TinyUSB_Teensy_MSC_SD” example;
    Using Teensyduino 1.54 beta 5;
    Using "No USB" after editing the board.txt file.

  9. #9
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,921
    Quote Originally Posted by isaacjacobson View Post
    Wow – huge thank you!!
    I've been working toward this for a long time with no success. Truly appreciate you figuring it out and taking the time to share it!

    Is it possible to adapt it for Teensy 4.0? What would I need to change?

    I can compile it for Teensy 4.1, but when I try to compile for Teensy 4.0 – I get these errors:
    If you look in the code (such as src/Adafruit_TinyUSB_TeensyCore.h), there are places that have:
    Code:
    #if defined(ARDUINO_TEENSY41)
    You would need to change these lines to:
    Code:
    #if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41)
    Or possibly:
    Code:
    #if defined(__IMXRT1062__) && defined(CORE_TEENSY)
    The later will allow future Teensy products that also use the IMXRT 1062 to be compiled (such as the rumored Teensy that will support Sparkfun's Micromod carriers).

    However, since the Teensy 4.0 doesn't have the pads underneath the Teensy to support additional flash memory, you might have to modify other places that assume the flash memory should be used.

  10. #10
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727
    I would recommend adding a #elif statement instead so that you can use the Teensy 4.0’s normal VID and PID. This way when you select the serial port in Arduino it shows up as a Teensy 4.0.

  11. #11
    Junior Member
    Join Date
    Sep 2020
    Posts
    8
    wow nice
    Ive successfully used upstream TinyUSB on a recent 4.1 project.
    Just needed to pass these defines to the build and add the necessary include dirs for MIMXRT1062
    Code:
    CPU_MIMXRT1062DVL6A
    CFG_TUSB_MCU=OPT_MCU_MIMXRT10XX
    In setup() I replace the IRQ_USB1 with TinyUSB's. Something like this
    Code:
    attachInterruptVector(IRQ_USB1, &tinyusb_irq);
    No changes upstream

    I normally use PlatformIO which makes this a bit easier. ArduinoIDE might be a bit trickier.

    Full example here: https://github.com/Ryzee119/ogx360_t4
    Last edited by Ryzee119; 11-26-2020 at 01:47 AM.

  12. #12
    Would anyone have any ideas as to why I am getting really slow read write speeds with a Teensy 4.0?

    Blackmagic Disk Speed Test is giving me 0.3 MB/s Write, and 0.9 MB/s Read.

    Details:
    - Teensy 4.0
    - Using Audio Adapter's microSD socket (CS 10)
    - Running the "Adafruit_TinyUSB_Teensy_MSD_SD" example
    - I got this same slow read/write speed with a Sandisk Ultra Plus 64GB, Sandisk Ultra 32GB, and a Kingston HC Class 10 16GB.

    In "src/Adafruit_TinyUSB_TeensyCore.h" .... I swapped this:
    Code:
    #if defined(ARDUINO_TEENSY41)
    ...with this:
    Code:
    #if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41)
    ... in order to run the example and Library on a Teensy 4.0

    Is @vjmuzik's 9MB/s write and 7.5MB/s read speed a result of being a Teensy 4.1 and/or bypassing the audio adapter? Or is the problem probably in adapting the code for a Teensy 4.0?

    Any thoughts would be greatly appreciated!

  13. #13
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727
    You may not be using the Teensy beta which has a wrapper for the SD library to use the SdFat-beta library instead which is a whole lot faster.

  14. #14
    Thanks for the response!

    I'm using Teensyduino 1.54 Beta #5 installed on Arduino 1.8.13

    Is there something I would need to edit or write in order to take advantage of those updated libraries?

    Here's the relevant library compiling data if that helps (sorry it's so long):
    Code:
    /Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/isaacjacobson/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/isaacjacobson/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/isaacjacobson/Documents/Arduino/libraries -fqbn=teensy:avr:teensy40:usb=disable,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438 -warnings=none -build-cache /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_cache_699033 -verbose /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_modified_sketch_329490/Adafruit_TinyUSB_Teensy_MSC_SD.ino
    /Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/isaacjacobson/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/isaacjacobson/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/isaacjacobson/Documents/Arduino/libraries -fqbn=teensy:avr:teensy40:usb=disable,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438 -warnings=none -build-cache /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_cache_699033 -verbose /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_modified_sketch_329490/Adafruit_TinyUSB_Teensy_MSC_SD.ino
    Using board 'teensy40' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr
    Using core 'teensy4' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr
    Detecting libraries used...
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for SD.h: [SD@1.2.4 SD@2.0.0]
    ResolveLibrary(SD.h)
      -> candidates: [SD@1.2.4 SD@2.0.0]
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for SdFat.h: [SdFat@2.0.0-beta.8 SdFat_-_Adafruit_Fork@1.2.3]
    ResolveLibrary(SdFat.h)
      -> candidates: [SdFat@2.0.0-beta.8 SdFat_-_Adafruit_Fork@1.2.3]
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for SPI.h: [SPI@1.0]
    ResolveLibrary(SPI.h)
      -> candidates: [SPI@1.0]
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for Adafruit_TinyUSB.h: [Adafruit_TinyUSB_Arduino-master@0.10.0]
    ResolveLibrary(Adafruit_TinyUSB.h)
      -> candidates: [Adafruit_TinyUSB_Arduino-master@0.10.0]
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for Adafruit_TinyUSB_TeensyCore.h: [Adafruit_TinyUSB_TeensyCore-master@0.10.0]
    ResolveLibrary(Adafruit_TinyUSB_TeensyCore.h)
      -> candidates: [Adafruit_TinyUSB_TeensyCore-master@0.10.0]
    
    
    . . .
    
    
    Generating function prototypes...
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/preproc/ctags_target_for_gcc_minus_e.cpp -DARDUINO_LIB_DISCOVERY_PHASE
    /Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/preproc/ctags_target_for_gcc_minus_e.cpp
    Compiling sketch...
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/precompile_helper /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438 /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch/Arduino.h -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch/Arduino.h.gch
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp.o
    Adafruit_TinyUSB_Teensy_MSC_SD: In function 'void setup()':
    Adafruit_TinyUSB_Teensy_MSC_SD:55: warning: large integer implicitly truncated to unsigned type 
       if ( !card.init(SPI_FULL_SPEED, chipSelect) )
                                                 ^
    Compiling libraries...
    Compiling library "SD"
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src/SD.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SD/SD.cpp.o
    Compiling library "SdFat"
    
    
    . . .
    
    
    Compiling library "SPI"
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI/SPI.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SPI/SPI.cpp.o
    Compiling library "Adafruit_TinyUSB_Arduino-master"
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src/Adafruit_USBD_MSC.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_MSC.cpp.o
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src/Adafruit_USBD_MIDI.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_MIDI.cpp.o
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src/Adafruit_USBD_HID.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_HID.cpp.o
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src/Adafruit_USBD_WebUSB.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_WebUSB.cpp.o
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src/Adafruit_TinyUSB.cpp -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_TinyUSB.cpp.o
    Compiling library "Adafruit_TinyUSB_TeensyCore-master"
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_DISABLED -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat/src -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master/src -I/Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master/src/tusb.c -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/tusb.c.o
    
    
    . . . 
    
    
    Compiling core...
    Using precompiled core: /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_cache_699033/core/core_9b480a10374ef0a5d429b72ad3f992fa.a
    Linking everything together...
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc -O2 -Wl,--gc-sections,--relax -T/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4/imxrt1062.ld -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.elf /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/sketch/Adafruit_TinyUSB_Teensy_MSC_SD.ino.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SD/SD.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FreeStack.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/MinimumSerial.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatDbg.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatFile.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatFilePrint.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatFileWrite.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatFormatter.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatPartition.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/ExFatVolume.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/ExFatLib/upcase.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatDbg.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatFile.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatFileLFN.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatFilePrint.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatFileSFN.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatFormatter.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatPartition.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FatLib/FatVolume.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FsLib/FsFile.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FsLib/FsNew.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/FsLib/FsVolume.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SdCard/SdCardInfo.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SdCard/SdSpiCard.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SdCard/SdioTeensy.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiArtemis.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiChipSelect.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiDue.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiESP.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiParticle.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiSTM32.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/SpiDriver/SdSpiTeensy3.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/common/FmtNumber.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/common/FsDateTime.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/common/FsStructs.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/common/PrintBasic.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/common/SysCallBareUno.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/iostream/StdioStream.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/iostream/StreamBaseClass.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/iostream/istream.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SdFat/iostream/ostream.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/SPI/SPI.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_TinyUSB.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_HID.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_MIDI.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_MSC.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_Arduino-master/Adafruit_USBD_WebUSB.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/tusb.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/Adafruit_TinyUSB_Core.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/Adafruit_USBD_CDC.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/Adafruit_USBD_Device.cpp.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/bth/bth_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/cdc/cdc_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/dfu/dfu_rt_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/hid/hid_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/midi/midi_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/msc/msc_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/net/net_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/usbtmc/usbtmc_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/class/vendor/vendor_device.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/common/tusb_fifo.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/device/usbd.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/device/usbd_control.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/dialog/da146xx/dcd_da146xx.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/espressif/esp32s2/dcd_esp32s2.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/microchip/samd/dcd_samd.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/microchip/samg/dcd_samg.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nordic/nrf5x/dcd_nrf5x.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nuvoton/nuc120/dcd_nuc120.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nuvoton/nuc121/dcd_nuc121.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nuvoton/nuc505/dcd_nuc505.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nxp/lpc17_40/dcd_lpc17_40.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nxp/lpc17_40/hcd_lpc17_40.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nxp/lpc18_43/hcd_lpc18_43.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/nxp/transdimension/dcd_transdimension.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/sony/cxd56/dcd_cxd56.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/st/stm32_fsdev/dcd_stm32_fsdev.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/st/synopsys/dcd_synopsys.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/ti/msp430x5xx/dcd_msp430x5xx.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/libraries/Adafruit_TinyUSB_TeensyCore-master/portable/valentyusb/eptri/dcd_eptri.c.o /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/../arduino_cache_699033/core/core_9b480a10374ef0a5d429b72ad3f992fa.a -L/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438 -larm_cortexM7lfsp_math -lm -lstdc++
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.elf /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.eep
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy -O ihex -R .eeprom /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.elf /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.hex
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/stdout_redirect /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.lst /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -d -S -C /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.elf
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/stdout_redirect /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.sym /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -t -C /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.elf
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/teensy_post_compile -file=Adafruit_TinyUSB_Teensy_MSC_SD.ino -path=/var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438 -tools=/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/ -board=TEENSY40
    Opening Teensy Loader...
    Multiple libraries were found for "SD.h"
     Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD
     Not used: /Applications/Arduino.app/Contents/Java/libraries/SD
    Multiple libraries were found for "SdFat.h"
     Used: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat
     Not used: /Users/isaacjacobson/Documents/Arduino/libraries/SdFat_-_Adafruit_Fork
    Using library SD at version 2.0.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD 
    Using library SdFat at version 2.0.0-beta.8 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SdFat 
    Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI 
    Using library Adafruit_TinyUSB_Arduino-master at version 0.10.0 in folder: /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_Arduino-master 
    Using library Adafruit_TinyUSB_TeensyCore-master at version 0.10.0 in folder: /Users/isaacjacobson/Documents/Arduino/libraries/Adafruit_TinyUSB_TeensyCore-master 
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /var/folders/v6/65mwbpdd61ddd8xlqs5mgvh40000gn/T/arduino_build_584438/Adafruit_TinyUSB_Teensy_MSC_SD.ino.elf
    Sketch uses 82984 bytes (4%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 126708 bytes (24%) of dynamic memory, leaving 397580 bytes for local variables. Maximum is 524288 bytes.

  15. #15
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727
    It looks like yours is using the new libraries so there shouldn’t be any difference, the T4.0 and 4.1 are functionally identical.

  16. #16
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,141
    Quote Originally Posted by isaacjacobson View Post
    Would anyone have any ideas as to why I am getting really slow read write speeds with a Teensy 4.0?

    Blackmagic Disk Speed Test is giving me 0.3 MB/s Write, and 0.9 MB/s Read.

    Details:
    - Teensy 4.0
    - Using Audio Adapter's microSD socket (CS 10)
    - Running the "Adafruit_TinyUSB_Teensy_MSD_SD" example
    - I got this same slow read/write speed with a Sandisk Ultra Plus 64GB, Sandisk Ultra 32GB, and a Kingston HC Class 10 16GB.

    ...
    ... in order to run the example and Library on a Teensy 4.0

    Is @vjmuzik's 9MB/s write and 7.5MB/s read speed a result of being a Teensy 4.1 and/or bypassing the audio adapter? Or is the problem probably in adapting the code for a Teensy 4.0?

    Any thoughts would be greatly appreciated!
    Teensy 4.1 onboard SD adapter is connected with 4 bit SDIO transfer - this indicates the similar underside SDIO pins are not in use but rather a normal 1 bit SPI interface : "Using Audio Adapter's microSD socket (CS 10)"

    The SD socket should not normally be that much slower perhaps - but it shouldn't be expected to match the performance of Native T_4.1 SDIO card.

    Is there anything else on the SPI bus on that T_4.0? Not sure how much testing the SPI route has gotten with the TD 1.54 beta update to the SD code?

  17. #17
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    727
    Yeah that would be it, I overlooked the Audio Adapter microSD socket and just assumed he was using the bottom pins of the T4.0.

  18. #18
    Quote Originally Posted by defragster View Post
    Is there anything else on the SPI bus on that T_4.0? Not sure how much testing the SPI route has gotten with the TD 1.54 beta update to the SD code?
    There isn't anything else actively using SPI to my knowledge. I was only running the “Adafruit_TinyUSB_Teensy_MSC_SD” example with the only edit being...

    Code:
    const uint8_t chipSelect = 10;
    ...in order to use the Audio Adapter's SD socket.

  19. #19
    Quote Originally Posted by defragster View Post
    Teensy 4.1 onboard SD adapter is connected with 4 bit SDIO transfer - this indicates the similar underside SDIO pins are not in use but rather a normal 1 bit SPI interface : "Using Audio Adapter's microSD socket (CS 10)"

    The SD socket should not normally be that much slower perhaps - but it shouldn't be expected to match the performance of Native T_4.1 SDIO card.

    Is there anything else on the SPI bus on that T_4.0? Not sure how much testing the SPI route has gotten with the TD 1.54 beta update to the SD code?

    You're right... there definitely are reduced speeds for the microSD via SPI in these updated versions with Teensyduino 1.54 beta 5.

    I have a sketch that essentially crossfades two WAV files by using two instances of "playSdWav" (Same Teensy 4.0 w/ Audio Adapter).

    Running this sketch on Teensyduino 1.51 & 1.53 I have no issues. However, running this same sketch on Teensyduino 1.54 beta 5, I can clearly hear a blip/pop/stutter each time I crossfading between two WAV files. This further leads me to believe that there are reduced speeds with using the microSD via SPI.

  20. #20
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,141
    Saw the TD 1.54 b5 results post - good notes @isaacjacobson. Hopefully some tweaks can get it back to where it was ... or better ...

    Too many of 'us' regulars have gone to desk full of T_4.1's for testing other new stuff and miss checks on that - though I do have a T_4.0 with Audio board on my desk ... using it to test SPI FLASH and LittleFS code.

    I can say from that: the SPI to FLASH test isn't that as much slower than QSPI FLASH as might be expected - so the SPI bus is working through Audio board - so hopefully 'tweaks' will win the day for SPI SD with new SdFat code.

Posting Permissions

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