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

Thread: TEENSY LC Failing to Compile- "False" File Location Error

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    4

    TEENSY LC Failing to Compile- "False" File Location Error

    Using the Arduino_debug (1.8.5) app with a Teensy LC board and have received this error message:

    Arduino: 1.8.5 (Windows 10), TD: 1.44, Board: "Teensy LC, Serial, 48 MHz, Smallest Code, US English"

    C:\Users\Gary\Documents\arduino-1.8.5\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\Gary\Documents\arduino-1.8.5\hardware -tools C:\Users\Gary\Documents\arduino-1.8.5\tools-builder -tools C:\Users\Gary\Documents\arduino-1.8.5\hardware\tools\avr -built-in-libraries C:\Users\Gary\Documents\arduino-1.8.5\libraries -libraries C:\Users\Gary\Documents\Arduino\libraries -fqbn=teensy:avr:teensyLC:usb=serial,speed=48,opt=o sstd,keys=en-us -ide-version=10805 -build-path C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139 -warnings=none -build-cache C:\Users\Gary\AppData\Local\Temp\arduino_cache_904 727 -verbose C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited\HealthySole_Rangefinder_Final_e dited.ino
    C:\Users\Gary\Documents\arduino-1.8.5\arduino-builder -compile -logger=machine -hardware C:\Users\Gary\Documents\arduino-1.8.5\hardware -tools C:\Users\Gary\Documents\arduino-1.8.5\tools-builder -tools C:\Users\Gary\Documents\arduino-1.8.5\hardware\tools\avr -built-in-libraries C:\Users\Gary\Documents\arduino-1.8.5\libraries -libraries C:\Users\Gary\Documents\Arduino\libraries -fqbn=teensy:avr:teensyLC:usb=serial,speed=48,opt=o sstd,keys=en-us -ide-version=10805 -build-path C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139 -warnings=none -build-cache C:\Users\Gary\AppData\Local\Temp\arduino_cache_904 727 -verbose C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited\HealthySole_Rangefinder_Final_e dited.ino
    Using board 'teensyLC' from platform in folder: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr
    Using core 'teensy3' from platform in folder: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr
    Detecting libraries used...
    "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=144 -DARDUINO=10805 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\cores\teensy3" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\sketch\HealthySole_Rangefinder_Final_edited.i no.cpp" -o "nul"
    "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=144 -DARDUINO=10805 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\cores\teensy3" "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\sketch\HealthySole_Rangefinder_Final_edited.i no.cpp" -o "nul"
    Using cached library dependencies for file: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire\Wire.cpp
    Using cached library dependencies for file: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire\WireKinet is.cpp
    Using cached library dependencies for file: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire\utility\t wi.c
    Generating function prototypes...
    "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=144 -DARDUINO=10805 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\cores\teensy3" "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\sketch\HealthySole_Rangefinder_Final_edited.i no.cpp" -o "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\preproc\ctags_target_for_gcc_minus_e.cpp"
    "C:\Users\Gary\Documents\arduino-1.8.5\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\preproc\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/precompile_helper" "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr/cores/teensy3" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139" "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=144 -DARDUINO=10805 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr/cores/teensy3" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139/pch/Arduino.h" -o "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139/pch/Arduino.h.gch"
    Using previously compiled file: C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\pch\Arduino.h.gch

    "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=144 -DARDUINO=10805 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139/pch" "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\cores\teensy3" "-IC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\sketch\HealthySole_Rangefinder_Final_edited.i no.cpp" -o "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\sketch\HealthySole_Rangefinder_Final_edited.i no.cpp.o"
    Compiling libraries...
    Compiling library "Wire"
    Using previously compiled file: C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\libraries\Wire\Wire.cpp.o
    Using previously compiled file: C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\libraries\Wire\WireKinetis.cpp.o
    Using previously compiled file: C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\libraries\Wire\utility\twi.c.o
    Compiling core...
    Using precompiled core
    Linking everything together...
    "C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy/../tools/arm/bin/arm-none-eabi-gcc" -Os --specs=nano.specs -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1546888311 "-TC:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\cores\teensy3/mkl26z64.ld" -lstdc++ -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -o "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139/HealthySole_Rangefinder_Final_edited.ino.elf" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\sketch\HealthySole_Rangefinder_Final_edited.i no.cpp.o" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\libraries\Wire\Wire.cpp.o" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\libraries\Wire\WireKinetis.cpp.o" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139\libraries\Wire\utility\twi.c.o" "C:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139/..\arduino_cache_904727\core\core_teensy_avr_teens yLC_usb_serial,speed_48,opt_osstd,keys_en-us_d13639306e5d6f50f9f1230d163a0786.a" "-LC:\Users\Gary\AppData\Local\Temp\arduino_build_66 3139" -larm_cortexM0l_math -lm
    C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\sketch\HealthySole_Rangefinder_Final_edited.in o.cpp.o: In function `__static_initialization_and_destruction_0':

    C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited/HealthySole_Rangefinder_Final_edited.ino:38: undefined reference to `VL6180X::VL6180X()'

    C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\sketch\HealthySole_Rangefinder_Final_edited.in o.cpp.o: In function `init_sensor(unsigned char)':

    C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited/HealthySole_Rangefinder_Final_edited.ino:82: undefined reference to `VL6180X::init()'

    C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited/HealthySole_Rangefinder_Final_edited.ino:83: undefined reference to `VL6180X::configureDefault()'

    C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited/HealthySole_Rangefinder_Final_edited.ino:85: undefined reference to `VL6180X::stopContinuous()'

    C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited/HealthySole_Rangefinder_Final_edited.ino:88: undefined reference to `VL6180X::startRangeContinuous(unsigned short)'

    C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\sketch\HealthySole_Rangefinder_Final_edited.in o.cpp.o: In function `VL6180X::readRangeContinuousMillimeters()':

    C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire/VL6180X.h:114: undefined reference to `VL6180X::readRangeContinuous()'

    C:\Users\Gary\AppData\Local\Temp\arduino_build_663 139\sketch\HealthySole_Rangefinder_Final_edited.in o.cpp.o: In function `get_sensor_data(unsigned char)':

    C:\Users\Gary\Documents\Arduino\HealthySole_Rangef inder_Final_edited/HealthySole_Rangefinder_Final_edited.ino:99: undefined reference to `VL6180X::timeoutOccurred()'

    collect2.exe: error: ld returned 1 exit status

    Using library Wire at version 1.0 in folder: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire
    Error compiling for board Teensy LC.

    The VL6180X.h file is indeed stored in the location indicated by the error message- this was confirmed by a third party. Relatively unfamiliar with Teensy as I come from a Biology background so I'd greatly appreciate responses with my elementary understanding considered. Where can I go from here? Thanks.

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,044
    The problem isn't that VL6180X.h is missing - it is in the wrong directory. There should also be a VL6180X.cpp file and that is the one that is missing. It looks like you haven't installed the library for that device correctly.
    Both those files (.cpp and .h) are in the pololu library here. You should download the zip file and then you can install it from the zip using the IDE menu item Sketch|Include Library|Add .ZIP library. You will then have to delete the existing VL6180X.h from the directory C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire

    Pete

  3. #3
    Junior Member
    Join Date
    Jan 2019
    Posts
    4
    Thanks for the response, Pete. After following your directions to the best of my ability, here's the error message the IDE spat out:

    c:\users\gary\documents\arduino-1.8.5\hardware\tools\arm\bin\../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ar.exe: unable to rename 'C:\Users\Gary\AppData\Local\Temp\arduino_build_59 344\core\core.a'; reason: File exists

    Using library Wire at version 1.0 in folder: C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire
    Using library vl6180x-arduino-master at version 1.2.0 in folder: C:\Users\Gary\Documents\Arduino\libraries\vl6180x-arduino-master
    Error compiling for board Teensy LC.

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,044
    The same error message is given in this thread and the suggested solution was to temporarily disable the antivirus program.
    Another thread implies that the problem is due to multiple version of the same library being installed. In your case, you might still have a partially installed version of the vl6180x library somewhere.
    Try searching your C:\Users\Gary\Documents\Arduino directory for vl6180x to see if it finds anything other than the one you've just installed in C:\Users\Gary\Documents\Arduino\libraries\vl6180x-arduino-master. If it does, delete the extraneous file(s) and try again.

    Pete

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,703
    The compiler is printing lots of complicated info, but for a moment I'd like to focus on just this 1 pathname.

    Quote Originally Posted by gprice93 View Post
    C:\Users\Gary\Documents\arduino-1.8.5\hardware\teensy\avr\libraries\Wire/VL6180X.h
    First, the normal location for Arduino is C:\Program Files (x86)\Arduino. Installing in other locations is ok, but you are straying from the well worn path of all the defaults.

    I also see the path has "arduino-1.8.5", rather than "Arduino". My guess is you extracted the ZIP file, rather than running Arduino's installer. That too is ok, but again, farther from the well worn path where everything "just works".

    The big problem I see here is VL6180X.h is located in the folder "hardware\teensy\avr\libraries\Wire". This leads me to believe you have done more manual installations, maybe by extracting ZIP files or manually copying files into folders? This too is fine, if you're extremely careful to get everything installed in the right place. But that is an error-prone process, especially on modern versions of Windows that don't always show pathname so clearly...

    That "hardware\teensy\avr\libraries\Wire" folder is the place where the Wire library should be installed. No other library should be in that Wire folder. But for reasons unknown, a file "VL6180X.h" is installed in that Wire folder, which definitely should not be there.

    Here is a screenshot from my Windows 10 test machine, with the files which should be in that Wire folder.

    Click image for larger version. 

Name:	capture.png 
Views:	11 
Size:	92.8 KB 
ID:	15538

    There is not supposed to be any file named VL6180X.h in that folder.

    (EDIT: this screenshot is with 1.46-beta7 - if you have 1.45 or order, the files WireIMXRT.cpp and WireIMXRT.h will not be present. Those were added in version 1.46 beta, so you won't see them if you have the stable 1.45 version).

    How things ended up this way, with VL6190X.h in the wrong place, I can not know. I'm working mostly blind here, and the compiler errors are way too complicated to understand without a clear idea of what files you have really installed. There's little point trying to figure out those complicated errors when your Arduino install is clearly messed up with files in places they don't belong.

    If you have access to a clean computer which has never seen any copies of Arduino, maybe a fresh install using Arduino's installer on all the default settings, and a fresh Teensyduino install on top of that with all default settings, and then this library installed in the default way (ideally though Arduino's Library Manager) could give you a proper install with all the files located where they should be.

    I don't know if that will fully fix everything. I'm not familiar with this VL6180X library. I didn't see any mention of where you got - whether downloaded from github, or some website, or from Arduino's library manager, or some other way.

    But I can tell you there's little point trying to figure out why this library isn't working when your install of Arduino & Teensyduino is messed up with files in wrong locations. To have any hope of us helping you with this library, you first need to get a clean & properly set up install of Arduino & Teensyduino. I highly recommend running both installers with all their default settings, so you get a known-good copy installed in the default "C:\Program Files (x86)\Arduino" location.

  6. #6
    Junior Member
    Join Date
    Jan 2019
    Posts
    4
    Cleared my computer of all Teensy and Arduino files (along with associated libraries) to start with a blank slate. Made sure I had the "common pathway" versions of the applications installed as you suggested and got this error message:

    C:\Users\Gary\Documents\HealthySole_Rangefinder_Fi nal\HealthySole_Rangefinder_Final.ino:27:21: fatal error: VL6180X.h: No such file or directory

    Subsequently, I downloaded the VL6180X folder from github as cited by el_supremo earlier in the comments and received the same error message.

  7. #7
    Junior Member
    Join Date
    Jan 2019
    Posts
    4
    ^^ Just realized I forgot to manually install VL6180X as it's an external file. Upload was successful after that. Thank you very much for the help!

Posting Permissions

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