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

Thread: SerialFlash compilation error

  1. #1
    Senior Member
    Join Date
    Dec 2014
    Posts
    134

    SerialFlash compilation error

    I keep getting an error that it can not find serialflash.h even when I am not using it. however if I open a serialflash library example I can compile just fine.

    Arduino: 1.6.5 (Mac OS X), TD: 1.25, Board: "Teensy 3.2 / 3.1, Serial, 72 MHz, US English"

    Using library Bounce in folder: /Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/Bounce (1.0.x format)
    Using library Audio in folder: /Users/AxiomCrux/Dropbox/Sketchbook/libraries/Audio
    Using library Wire in folder: /Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/Wire (1.0.x format)
    Using library SPI in folder: /Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/SPI (1.0.x format)
    Using library SD in folder: /Users/AxiomCrux/Dropbox/Sketchbook/libraries/SD (1.0.x format)

    /Applications/Arduino1.6.5.app/Contents/Java/hardware/tools/arm/bin/arm-none-eabi-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=125 -DARDUINO=10605 -DF_CPU=72000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/cores/teensy3 -I/Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/Bounce -I/Users/AxiomCrux/Dropbox/Sketchbook/libraries/Audio -I/Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/Wire -I/Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/SPI -I/Users/AxiomCrux/Dropbox/Sketchbook/libraries/SD /var/folders/d7/xc0znywx505859ckwd37gbkm0000gn/T/build5681288589455448009.tmp/Teensy_Sampler_v19.cpp -o /var/folders/d7/xc0znywx505859ckwd37gbkm0000gn/T/build5681288589455448009.tmp/Teensy_Sampler_v19.cpp.o
    In file included from /Users/AxiomCrux/Dropbox/Sketchbook/libraries/Audio/Audio.h:95:0,
    from Teensy_Sampler_v19.ino:8:
    /Users/AxiomCrux/Dropbox/Sketchbook/libraries/Audio/play_serialflash_raw.h:32:25: fatal error: SerialFlash.h: No such file or directory
    #include <SerialFlash.h>
    ^
    compilation terminated.
    Multiple libraries were found for "SD.h"
    Used: /Users/AxiomCrux/Dropbox/Sketchbook/libraries/SD
    Not used: /Applications/Arduino1.6.5.app/Contents/Java/hardware/teensy/avr/libraries/SD
    Error compiling.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,023
    Parts of the audio library use SerialFlash. If you're using Arduino 1.6.5 or older, you must add #include "SerialFlash.h" to your sketch. This is required, even if you never use any of the objects which use SerialFlash, just like how you have to include SD.h, even if you never use the objects which access the SD card.

    Older versions of the audio library did not use SerialFlash. If you wrote a sketch with an older version and now you're using a newer version, you have to add the extra include. It's a requirement of Arduino....

    Or upgrade to Arduino 1.6.7. Arduino now automatically discovers that Audio uses SerialFlash (and others), so you only need to include Audio.h in your sketch. But 1.6.5 doesn't have that feature.

  3. #3
    Senior Member
    Join Date
    Dec 2014
    Posts
    134
    Ok, thank you that is helpful as I was starting to go insane flipping between different versions of files and different versions of arduino for hours trying to figure out why some worked fine and some didn't. The errors were very inconsistent. I got loads of errors saying the mixer class had no gain method, and then would open another doc with mixer and it would work fine... so many different errors that were completely irrelevant and only helped to confuse. I did end up getting 1.6.7 and it seems to be working, I also reverted my old 1.0.6 as best I could figure out to have the old files work. I think I am ok now.

    Is there any way to make known issues like this apparent? the arduino IDE could have a "possible issue" suggestion by auto searching a database of known issues on github and send you a link if something is relevant, and maybe search the various forums if that doesn't have any results?. a way to at least give a path for the many beginners and hobbyists to track down these esoteric problems without having to post their own issue to the forum if it is something already known and solved?

Posting Permissions

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