There is a thread up on pjrc forum (https://forum.pjrc.com/threads/39855-Error-compiling-for-board-Teensy-2-0) that a user is trying to compile code from github to control his XV Lidar, that uses a Teensy 2.0.
The project is: https://github.com/getSurreal/XV_Lidar_Controller
Since I have one of these, that will soon be going back on one of my robots and back many months ago I could program the Teensy, I thought I would take a look.
Sure, enough, it will not build on Arduino 1.6.12 with Teensyduino 1.31.
Note this project is setup with a main sketch and has a libraries subdirectory, where it has several libraries (EEPromAnything, PID, SerialCOmmand, TimerThree).
His program then several includes that expects to find these files, that look like:
#include "libraries/TimerThree/TimerThree.h" // used for ultrasonic PWM motor control
#include "libraries/PID/PID.h"
#include <EEPROM.h>
#include "libraries/EEPROMAnything/EEPROMAnything.h"
#include "libraries/SerialCommand/SerialCommand.h"
Some of these sub-directories also include source files.
I was curious, so I downloaded Arduino 1.6.9, which I installed on my windows machine (non-installer), and then istalled Teensyduino 1.31 and the project built without an error.
I obviously can get this to work on my machine with current stuff, by moving the libraries into my Arduino libraries folder, probably edit the .ino file not to have the libraries stuff in it, but I was wondering if there if there is some new standard way for an application to have their own libraries, such that one can post an issue to that project (or better yet a Pull request) to allow it to work on the current Arduino builds as well as the older ones.
Thanks
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.
Sorry, the errors I believe are mainly about things that are not being compiled as part of the build.
That is, a lot of errors that look like:
Linking everything together...
"C:\arduino-1.6.12\hardware\teensy/../tools/avr/bin/avr-gcc" -Os -Wl,--gc-sections,--relax -mmcu=atmega32u4 -o "C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995/XV_Lidar_Controller.ino.elf" "C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\XV_Lidar_Controller.ino.cpp.o" "C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\libraries\EEPROM\EEPROM.cpp.o" "C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995/core\core.a" "-LC:\Users\Kurt\AppData\Local\Temp\arduino_build_54995" -lm
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\XV_Lidar_Controller.ino.cpp.o: In function `setAngle()':
C:\Users\Kurt\Documents\GitHub\XV_Lidar_Controller/XV_Lidar_Controller.ino:952: undefined reference to `SerialCommand::next()'
C:\Users\Kurt\Documents\GitHub\XV_Lidar_Controller/XV_Lidar_Controller.ino:953: undefined reference to `SerialCommand::readSerial()'
C:\Users\Kurt\Documents\GitHub\XV_Lidar_Controller/XV_Lidar_Controller.ino:954: undefined reference to `SerialCommand::next()'
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\XV_Lidar_Controller.ino.cpp.o: In function `TimerThree::pwm(char, unsigned int)':
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\libraries/TimerThree/TimerThree.h:122: undefined reference to `TimerThree::clockSelectBits'
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\XV_Lidar_Controller.ino.cpp.o: In function `TimerThree::setPwmDuty(char, unsigned int)':
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\libraries/TimerThree/TimerThree.h:102: undefined reference to `TimerThree::pwmPeriod'
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\libraries/TimerThree/TimerThree.h:102: undefined reference to `TimerThree::pwmPeriod'
As I mentioned, the libraries are thought of to be private to this .INO file. Side note: I have this sketch not part of my may Arduino folder, but in my <documents>/github
Folder.
I at first thought maybe the files were not copied down to the temp directory, but they are:
The issue appears to be that the .cpp files that are copied down as part of a subdirectory, in this current build attempt:
C:\Users\Kurt\AppData\Local\Temp\arduino_build_54995\sketch\libraries\TimerThree
Was not built, but in the 1.6.09 build, the TimerThree.cpp file that was copied down to
C:\Users\Kurt\AppData\Local\Temp\buildd37155301db0c75193e6bd747adc38df.tmp\sketch\libraries\TimerThree
Was built, likewise for some of the other directories.
--
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.
--
Visit my github for awesome Arduino code @ https://github.com/xxxajk
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.