Arduino 1.6.5 IDE with the teensy extension is not finding a library

Status
Not open for further replies.

wolfv

Well-known member
I recently migrated from Windows to Linux (Fedora 22).
I installed two Arduino IDEs on my system:
  • Arduino 1.6.5 IDE without teensy extension
  • Arduino 1.6.5 IDE with the teensy extension
I created a small library.
Arduino 1.6.5 IDE without the teensy extension is finding the library.
Arduino 1.6.5 IDE with the teensy extension is not finding the library.

This is the test_sketch.ino:
Code:
#include <test_file.h>

void setup() { }
void loop() { }

This is in my sketchbook directory: /home/wolfv/Documents/Arduino/test_sketch/test_sketch.ino

This is in my library directory: /home/wolfv/Documents/Arduino/libraries/test_file/test_file.h

The Arduino 1.6.5 IDE without the teensy extension compiles the test_sketch.ino as expected.
Non-teensy Ardunio IDE > Tools > Board > Adruino Nano
Restart the non-teensy Ardunio IDE, and click Verify. It compiled.​

The Arduino 1.6.5 IDE with the teensy extension does not compile the test_sketch.ino.
Ardunio IDE with teensy extension > Tools > Board > Teensy 2.0
Restart the teensy Ardunio IDE, and click Verify. It got this compile error:​
Code:
Arduino: 1.6.5 (Linux), TD: 1.24, Board: "Teensy 2.0, Serial, 16 MHz, US English"

/home/wolfv/Downloads/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wolfv/Downloads/arduino-1.6.5/hardware/teensy/avr/cores/teensy /tmp/build8812658720315613176.tmp/test_sketch.cpp -o /tmp/build8812658720315613176.tmp/test_sketch.cpp.o 
test_sketch.ino:1:23: fatal error: test_file.h: No such file or directory
compilation terminated.
Error compiling.

The Blink program compiles on the Arduino IDE and runs on teensy 2.0.

bperrybap said (on http://forum.arduino.cc/index.php?topic=343189 > post #7):
It is possible that the latest 1.6.5 header searching is not working correctly in the Teensy environment when there are no other source code modules.

I didn't find any posts describing this problem, so maybe something is wrong with my setup.
Is there a way for Arduino 1.6.5 IDE with the teensy extension to find the library?

Thank you.
 
I just tried it here on Ubuntu 14.04, but I could not reproduce the problem. It compiles without error.

sc.png

Here's the full output I get. This is with File > Preferences set to show verbose info while compiling. Notice the line near the top, where it says it's using the library.


Code:
Build options changed, rebuilding all
Using library test_file in folder: /home/paul/teensy/sketch/libraries/test_file (1.0.x format)

/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy -I/home/paul/teensy/sketch/libraries/test_file /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp -o /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/wiring.c -o /tmp/build2428019482903012848.tmp/wiring.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/WInterrupts.c -o /tmp/build2428019482903012848.tmp/WInterrupts.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/usb.c -o /tmp/build2428019482903012848.tmp/usb.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/pins_teensy.c -o /tmp/build2428019482903012848.tmp/pins_teensy.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/malloc.c -o /tmp/build2428019482903012848.tmp/malloc.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/keylayouts.c -o /tmp/build2428019482903012848.tmp/keylayouts.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/WMath.cpp -o /tmp/build2428019482903012848.tmp/WMath.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/yield.cpp -o /tmp/build2428019482903012848.tmp/yield.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/IPAddress.cpp -o /tmp/build2428019482903012848.tmp/IPAddress.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/WString.cpp -o /tmp/build2428019482903012848.tmp/WString.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/Stream.cpp -o /tmp/build2428019482903012848.tmp/Stream.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/main.cpp -o /tmp/build2428019482903012848.tmp/main.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/usb_api.cpp -o /tmp/build2428019482903012848.tmp/usb_api.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/HardwareSerial.cpp -o /tmp/build2428019482903012848.tmp/HardwareSerial.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/Tone.cpp -o /tmp/build2428019482903012848.tmp/Tone.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/new.cpp -o /tmp/build2428019482903012848.tmp/new.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-g++ -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -fno-exceptions -felide-constructors -std=c++0x -mmcu=atmega32u4 -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=16000000L -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy /home/paul/teensy/arduino-1.6.5/hardware/teensy/avr/cores/teensy/Print.cpp -o /tmp/build2428019482903012848.tmp/Print.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/wiring.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/WInterrupts.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/usb.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/pins_teensy.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/malloc.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/keylayouts.c.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/WMath.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/yield.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/IPAddress.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/WString.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/Stream.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/main.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/usb_api.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/HardwareSerial.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/Tone.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/new.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-ar rcs /tmp/build2428019482903012848.tmp/core.a /tmp/build2428019482903012848.tmp/Print.cpp.o 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega32u4 -o /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.elf /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.o /tmp/build2428019482903012848.tmp/core.a -L/tmp/build2428019482903012848.tmp -lm 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.elf /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.eep 
/home/paul/teensy/arduino-1.6.5/hardware/tools/avrteensy/bin/avr-objcopy -O ihex -R .eeprom /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.elf /tmp/build2428019482903012848.tmp/sketch_aug19a.cpp.hex 
/home/paul/teensy/arduino-1.6.5/hardware/tools/teensy_post_compile -file=sketch_aug19a.cpp -path=/tmp/build2428019482903012848.tmp -tools=/home/paul/teensy/arduino-1.6.5/hardware/tools -board=TEENSY2 

Sketch uses 1,886 bytes (5%) of program storage space. Maximum is 32,256 bytes.
Global variables use 22 bytes (0%) of dynamic memory, leaving 2,538 bytes for local variables. Maximum is 2,560 bytes.
 
Here's what my File > Preferences looks like.

prefs.png
(click for full size)

A key point is the Sketchbook location must be set properly. I can't see how yours could be wrong and still have things compile with the nano board.... really, I'm guessing here, as I just don't know what's different on your system that's causing it to fail.

In my test, I just created an empty file called "test_file.h". I had no other files in the "test_file" directory.

Something must be different in your test.... I know don't know what....
 
You are right Paul.
The Sketchbook Location was /home/wolfv/Arduino (I did not notice the missing "Documents").
I change the Sketchbook Location to /home/wolfv/Documents/Arduino and everything compiles nice.

Thanks again for your help.
 
Status
Not open for further replies.
Back
Top