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

Thread: Library problems

  1. #1
    Junior Member
    Join Date
    Sep 2022
    Posts
    3

    Library problems

    Hi allo,
    finally I decided to program my T4.0. I use Arduino 1.8.19 with last teensyduino 1.57.

    My problem is that a got various errors, related to libraries. They involve SD, SdFat, play_sd_raw and play_sd_wav. But I got also an error related to kinetis.h.

    I read in some forum that teensyduino set librarys fo teensy 3.2, but I cannot compile teensy audio examples.

    Please could you suggest how to solve this problem?

    Thanks in advance
    Alessandro

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,359
    With indicated software properly installed and in use. The IDE would require using BOARD=T_4.0.

    Then the Audio examples should compile - noting any details in the sketch where there is some option specific to the T_4.0 and setup at hand.

    Using this unchanged: {local install}\hardware\teensy\avr\libraries\Audio\examp les\MemoryAndCpuUsage\MemoryAndCpuUsage.ino

    Just built that here in TD 1.57 and 1.58b1 with No Issue.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,275
    Quote Originally Posted by acorrias View Post
    Hi allo,
    finally I decided to program my T4.0. I use Arduino 1.8.19 with last teensyduino 1.57.

    My problem is that a got various errors, related to libraries. They involve SD, SdFat, play_sd_raw and play_sd_wav. But I got also an error related to kinetis.h.

    I read in some forum that teensyduino set librarys fo teensy 3.2, but I cannot compile teensy audio examples.

    Please could you suggest how to solve this problem?

    Thanks in advance
    Alessandro
    Generally, you should copy + paste the error messages involved so that people can help you fix the problem. If you are compiling one of the examples without modification, then just tell us what example you are using, along with what processor you have selected, and any processor specific options enabled.

    If you have your own code, then you need to copy + paste that code as well.

    When you copy + paste either the error messages or the code, please use the hash toolbar option, and put the pasted text inside of the CODE and /CODE blocks.

    At a guess, either you have the wrong processor enabled or you have older versions of the libraries in your Arduino directory.

    Note at the audio level, while the Teensy 3.x series and the Teensy 4.x series use the same functions, the low level pinouts are completely different. Not all of the examples have been updated to use the appropriate pinout for Teensy 4.0.

    Unfortunately, the Teensy 4.0 does not have 1 or 2 pins that can emit audio directly. Most of the audio work on the Teensy 4.0 uses the separate audio shield (or other alternative external boards), while on the Teensy 3.2, you could produce sounds by hooking up a speaker and amplifier to pin A14.

    But it is hard to make suggestions of how to proceed without more information.

  4. #4
    Junior Member
    Join Date
    Sep 2022
    Posts
    3
    Quote Originally Posted by defragster View Post
    With indicated software properly installed and in use. The IDE would require using BOARD=T_4.0.

    Then the Audio examples should compile - noting any details in the sketch where there is some option specific to the T_4.0 and setup at hand.

    Using this unchanged: {local install}\hardware\teensy\avr\libraries\Audio\examp les\MemoryAndCpuUsage\MemoryAndCpuUsage.ino

    Just built that here in TD 1.57 and 1.58b1 with No Issue.
    HI.
    I am certain to have set arduino ide to teensy 4.0. I have fresh new installation. and examples are taken from teensyduino installation

  5. #5
    Junior Member
    Join Date
    Sep 2022
    Posts
    3

    Error detail

    Hi
    I got a teensy 4.0 card with audioshiels.
    The programm is pulsewitdh, taken from example
    I have fresh new enviroment (new installation)with last version of arduino ide and last version of teensyduino.

    When I compile I got this errors (I omit safe compiler error messages:

    1) Error while detecting libraries included by C:\Users\ALESSA~1\AppData\Local\Temp\arduino_build _755605\sketch\pulseWidth.ino.cpp
    2) Error while detecting libraries included by C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\ play_sd_raw.cpp
    3) Error while detecting libraries included by C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\ play_sd_wav.cpp
    4) Error while detecting libraries included by C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\src \SD.cpp

    and at last

    Alternatives for kinetis.h: []
    ResolveLibrary(kinetis.h)ents\Arduino\libraries\Sd Fat\src\SdSpiCard\SdSpiTeensy3.cpp:23:21: fatal error: kinetis.h: No such file or directory

    -> candidates: []compilation terminated.

    Multiple libraries were found for "SD.h"
    Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
    Not used: C:\Program Files (x86)\Arduino\libraries\SD
    Multiple libraries were found for "SdFat.h"
    Used: C:\Users\Alessandro\Documents\Arduino\libraries\Sd Fat
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat
    Using library Audio at version 1.3 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio
    Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
    Using library SD at version 2.0.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
    Using library SdFat at version 2015.4.26 in folder: C:\Users\Alessandro\Documents\Arduino\libraries\Sd Fat
    Using library SerialFlash at version 0.5 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Serial Flash
    Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire
    Error compiling for board Teensy 4.0.


    I hope this description would be right to let you help me.
    I read in a forum that Audio library refers to old teensy 3.X and the old kinetis.h would have been replaced by imxrt and that kinetis.h would have been replaced by imxrt.h. But the library is installed by teensyduino by default, and there is not way to install teensyduifo for teensy 4.0

    thanks in advance for your help
    alessandro

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,359
    Quote Originally Posted by acorrias View Post
    HI.
    I am certain to have set arduino ide to teensy 4.0. I have fresh new installation. and examples are taken from teensyduino installation
    Tested here to work as noted with a working 1.8.19 and TD 1.57 build for Teensy 4.0.

    As noted by @MichaelMeissner - showing the Verbose Console output will provide exact error/warning list and also the paths and other build information that might indicate the source of the trouble needed to provide direction to a solution.

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,359
    Good timing on the CROSSPOST

    This line shows the trouble:
    Code:
    Using library SdFat at version 2015.4.26 in folder: C:\Users\Alessandro\Documents\Arduino\libraries\Sd Fat
    There is a LOCAL SKETCHBOOK copy of this "Sd Fat" library that is not compatible with SD.h in TeensyDuino

    Removed that library folder and it should use one from the Teensy install.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,799
    This is probably at least part of your problem.

    Multiple libraries were found for "SdFat.h"
    Used: C:\Users\Alessandro\Documents\Arduino\libraries\Sd Fat
    Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SdFat
    Looks like you have a copy of SdFat in Documents\Arduino\libraries which is overriding the copy meant for Teensy in Arduino\hardware\teensy\avr\libraries.

    Delete or move that SdFat from Documents\Arduino\libraries, so Arduino will use the SdFat which is meant for Teensy.


    If this wasn't the only problem, try showing us a more complete picture. Sometimes we solve problems with guesswork, but we're able to help you much better if you give us enough info to actually reproduce the problem. Or even just see all the error messages. Often parts that are initially believed to be unimportant can have some key detail. By withholding details, you're only lowering the chance we'll be able to blindly diagnose your problem over the internet.

Posting Permissions

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