Please note that NO code has changed from the time this project compiled and worked on beta 2, through the 4 compile attempts on beta 3. Yet, identical code resulted in 4 different messages from the IDE.
The next compile attempt resulted in
Opening Teensy Loader...
Teensy Loader error responding to comment
This sketch compiled fine on TD: 1.29-beta2 with everything else the same.
Code:
Arduino: 1.6.9 (Linux), TD: 1.29-beta3, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz optimized (overclock), US English"
/opt/arduino-1.6.9/arduino-builder -dump-prefs -logger=machine -hardware "/opt/arduino-1.6.9/hardware" -hardware "/home/slo/.arduino15/packages" -tools "/opt/arduino-1.6.9/tools-builder" -tools "/opt/arduino-1.6.9/hardware/tools/avr" -tools "/home/slo/.arduino15/packages" -built-in-libraries "/opt/arduino-1.6.9/libraries" -libraries "/home/slo/Arduino/libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10609 -build-path "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -warnings=all -verbose "/home/slo/Arduino/HanksTractorTeensy3x/HanksTractorTeensy3x.ino"
/opt/arduino-1.6.9/arduino-builder -compile -logger=machine -hardware "/opt/arduino-1.6.9/hardware" -hardware "/home/slo/.arduino15/packages" -tools "/opt/arduino-1.6.9/tools-builder" -tools "/opt/arduino-1.6.9/hardware/tools/avr" -tools "/home/slo/.arduino15/packages" -built-in-libraries "/opt/arduino-1.6.9/libraries" -libraries "/home/slo/Arduino/libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10609 -build-path "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -warnings=all -verbose "/home/slo/Arduino/HanksTractorTeensy3x/HanksTractorTeensy3x.ino"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/home/slo/Arduino/libraries/FreqMeasureMulti/FreqMeasureMulti.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo/Servo.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM/EEPROM.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/opt/arduino-1.6.9/tools-builder/ctags/5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp.o"
Using previously compiled file: ... (DELETED DUE TO CHARACTER LIMIT)
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/memcpy-armv7m.S.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/memset.S.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/analog.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/eeprom.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/keylayouts.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/math_helper.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/mk20dx128.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/nonstd.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/pins_teensy.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/ser_print.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial1.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial2.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial3.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial4.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial5.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/touch.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_desc.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_dev.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_joystick.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_keyboard.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mem.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_midi.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mouse.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mtp.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_rawhid.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_seremu.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_serial.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_touch.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/AudioStream.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/DMAChannel.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial1.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial2.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial3.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial4.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial5.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/IPAddress.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/IntervalTimer.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Print.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Stream.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Tone.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/WMath.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/WString.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/avr_emulation.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/main.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/new.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_audio.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_flightsim.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_inst.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/yield.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc" -O -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1466947689 "-T/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3/mk20dx256.ld" -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/FreqMeasureMulti/FreqMeasureMulti.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/Servo/Servo.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/EEPROM/EEPROM.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "-L/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -larm_cortexM4l_math -lm
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.eep"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.hex"
"/opt/arduino-1.6.9/hardware/teensy/../tools//teensy_post_compile" "-file=HanksTractorTeensy3x.ino" "-path=/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" "-tools=/opt/arduino-1.6.9/hardware/teensy/../tools/" "-board=TEENSY31"
Opening Teensy Loader...
Teensy Loader error responding to comment
Multiple libraries were found for "FreqMeasureMulti.h"
Used: /home/slo/Arduino/libraries/FreqMeasureMulti
Not used: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/FreqMeasureMulti
Using library FreqMeasureMulti at version 0.22 in folder: /home/slo/Arduino/libraries/FreqMeasureMulti
Using library Servo at version 1.1.2 in folder: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo
Using library EEPROM at version 2.0 in folder: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM
Error compiling for board Teensy 3.2 / 3.1.
The next compile "Teensy Loader could not find the file HanksTractorTeensy3x.ino"
Code:
Arduino: 1.6.9 (Linux), TD: 1.29-beta3, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz optimized (overclock), US English"
/opt/arduino-1.6.9/arduino-builder -dump-prefs -logger=machine -hardware "/opt/arduino-1.6.9/hardware" -hardware "/home/slo/.arduino15/packages" -tools "/opt/arduino-1.6.9/tools-builder" -tools "/opt/arduino-1.6.9/hardware/tools/avr" -tools "/home/slo/.arduino15/packages" -built-in-libraries "/opt/arduino-1.6.9/libraries" -libraries "/home/slo/Arduino/libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10609 -build-path "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -warnings=all -verbose "/home/slo/Arduino/HanksTractorTeensy3x/HanksTractorTeensy3x.ino"
/opt/arduino-1.6.9/arduino-builder -compile -logger=machine -hardware "/opt/arduino-1.6.9/hardware" -hardware "/home/slo/.arduino15/packages" -tools "/opt/arduino-1.6.9/tools-builder" -tools "/opt/arduino-1.6.9/hardware/tools/avr" -tools "/home/slo/.arduino15/packages" -built-in-libraries "/opt/arduino-1.6.9/libraries" -libraries "/home/slo/Arduino/libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10609 -build-path "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -warnings=all -verbose "/home/slo/Arduino/HanksTractorTeensy3x/HanksTractorTeensy3x.ino"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/home/slo/Arduino/libraries/FreqMeasureMulti/FreqMeasureMulti.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo/Servo.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM/EEPROM.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/dev/null"
"/opt/arduino-1.6.9/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++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/opt/arduino-1.6.9/tools-builder/ctags/5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/preproc/ctags_target_for_gcc_minus_e.cpp"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-I/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3" "-I/home/slo/Arduino/libraries/FreqMeasureMulti" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo" "-I/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp" -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp.o"
HanksTractorTeensy3x: In function 'void loop()':
HanksTractorTeensy3x:100: warning: unused variable 'tempMinThrottlePedalValue'
static uint16_t tempMinThrottlePedalValue = minThrottlePedalValue;
^
HanksTractorTeensy3x:101: warning: unused variable 'tempMaxThrottlePedalValue'
static uint16_t tempMaxThrottlePedalValue = maxThrottlePedalValue;
^
HanksTractorTeensy3x:102: warning: unused variable 'minCount'
static uint16_t minCount = 0;
^
HanksTractorTeensy3x:103: warning: unused variable 'maxCount'
static uint16_t maxCount = 0;
^
In file included from /home/slo/Arduino/HanksTractorTeensy3x/HanksTractorTeensy3x.ino:14:0:
/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM/EEPROM.h: In instantiation of 'const T& EEPROMClass::put(int, const T&) [with T = short unsigned int]':
/home/slo/Arduino/HanksTractorTeensy3x/HanksTractorTeensy3x.ino:87:55: required from here
/opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM/EEPROM.h:144:15: warning: variable 'e' set but not used [-Wunused-but-set-variable]
EEPtr e = idx;
^
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/FreqMeasureMulti/FreqMeasureMulti.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/Servo/Servo.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/EEPROM/EEPROM.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/memcpy-armv7m.S.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/memset.S.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/analog.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/eeprom.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/keylayouts.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/math_helper.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/mk20dx128.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/nonstd.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/pins_teensy.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/ser_print.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial1.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial2.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial3.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial4.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial5.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/touch.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_desc.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_dev.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_joystick.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_keyboard.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mem.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_midi.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mouse.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mtp.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_rawhid.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_seremu.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_serial.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_touch.c.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/AudioStream.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/DMAChannel.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial1.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial2.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial3.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial4.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial5.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/IPAddress.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/IntervalTimer.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Print.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Stream.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Tone.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/WMath.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/WString.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/avr_emulation.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/main.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/new.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_audio.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_flightsim.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_inst.cpp.o
Using previously compiled file: /tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/yield.cpp.o
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/memcpy-armv7m.S.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/memset.S.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/analog.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/eeprom.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/keylayouts.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/math_helper.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/mk20dx128.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/nonstd.c.o"
Opening Teensy Loader...
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/pins_teensy.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/ser_print.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial1.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial2.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial3.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial4.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/serial5.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/touch.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_desc.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_dev.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_joystick.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_keyboard.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mem.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_midi.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mouse.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_mtp.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_rawhid.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_seremu.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_serial.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_touch.c.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/AudioStream.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/DMAChannel.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial1.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial2.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial3.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial4.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/HardwareSerial5.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/IPAddress.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/IntervalTimer.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Print.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Stream.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/Tone.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/WMath.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/WString.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/avr_emulation.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/main.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/new.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_audio.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_flightsim.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/usb_inst.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-ar" rcs "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/yield.cpp.o"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc" -O -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1466948799 "-T/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3/mk20dx256.ld" -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/FreqMeasureMulti/FreqMeasureMulti.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/Servo/Servo.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/EEPROM/EEPROM.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "-L/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -larm_cortexM4l_math -lm
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.eep"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.hex"
"/opt/arduino-1.6.9/hardware/teensy/../tools//teensy_post_compile" "-file=HanksTractorTeensy3x.ino" "-path=/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" "-tools=/opt/arduino-1.6.9/hardware/teensy/../tools/" "-board=TEENSY31"
Teensy Loader could not find the file HanksTractorTeensy3x.ino
Multiple libraries were found for "FreqMeasureMulti.h"
Used: /home/slo/Arduino/libraries/FreqMeasureMulti
Not used: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/FreqMeasureMulti
Using library FreqMeasureMulti at version 0.22 in folder: /home/slo/Arduino/libraries/FreqMeasureMulti
Using library Servo at version 1.1.2 in folder: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo
Using library EEPROM at version 2.0 in folder: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM
Error compiling for board Teensy 3.2 / 3.1.
Finally, success.
Code:
(DELETED DUE TO CHARACTER LIMIT)
...
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc" -O -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1466949141 "-T/opt/arduino-1.6.9/hardware/teensy/avr/cores/teensy3/mk20dx256.ld" -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -o "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/sketch/HanksTractorTeensy3x.ino.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/FreqMeasureMulti/FreqMeasureMulti.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/Servo/Servo.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/libraries/EEPROM/EEPROM.cpp.o" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/core/core.a" "-L/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" -larm_cortexM4l_math -lm
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.eep"
"/opt/arduino-1.6.9/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.elf" "/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp/HanksTractorTeensy3x.ino.hex"
"/opt/arduino-1.6.9/hardware/teensy/../tools//teensy_post_compile" "-file=HanksTractorTeensy3x.ino" "-path=/tmp/build0361cbb29f46556c2b9542bfcf0f3649.tmp" "-tools=/opt/arduino-1.6.9/hardware/teensy/../tools/" "-board=TEENSY31"
Multiple libraries were found for "FreqMeasureMulti.h"
Used: /home/slo/Arduino/libraries/FreqMeasureMulti
Not used: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/FreqMeasureMulti
Using library FreqMeasureMulti at version 0.22 in folder: /home/slo/Arduino/libraries/FreqMeasureMulti
Using library Servo at version 1.1.2 in folder: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/Servo
Using library EEPROM at version 2.0 in folder: /opt/arduino-1.6.9/hardware/teensy/avr/libraries/EEPROM
Sketch uses 23,508 bytes (8%) of program storage space. Maximum is 262,144 bytes.
Global variables use 5,676 bytes (8%) of dynamic memory, leaving 59,860 bytes for local variables. Maximum is 65,536 bytes.
Project modifies a Peg Perego 2 speed child's ride on toy John Deer Tractor from on/off control, to proportional throttle and R/C control.
Code:
/* FreqMeasureMulti - Servo
* http://pjrc.com/teensy/td_libs_FreqMeasure.html
* http://pjrc.com/teensy/td_libs_Servo.html
*
* Board FreqMeasureMulti Supported Pins on FTM0
* ----- --------------
* Teensy LC 6, 9, 10, 20, 22, 23
* Teensy 3.1 5, 6, 9, 10, 20, 21, 22, 23
* Teensy 3.2 5, 6, 9, 10, 20, 21, 22, 23
*
*/
#include <FreqMeasureMulti.h>
#include <Servo.h>
#include <EEPROM.h>
#define debug
#define CHANNELS 4
#define NEUTRAL 1500
#define REVERSE_LIMIT 1200
#define FORWARD1_LIMIT 1800
#define FORWARD2_LIMIT 2000
#define MAX_FRAME_INTERVAL 22000
#define NEW_EEPROM_COUNT_THRESHOLD 100
#define RESERVED_EEPROM_ADDR 0
#define MIN_THROTTLE_ADDR sizeof(uint16_t)
#define MAX_THROTTLE_ADDR sizeof(uint16_t)*2
elapsedMicros sinceFrame;
enum states {NOT_RC, RC_STOPPED, RC_DRIVING, STOPPED, REVERSE, FORWARD1, FORWARD2};
states state;
// Measure width of 4 individual Futaba servo channels(R2004GF)
// channels 1 and 2 begin simultaneously, and channel 3 and 4 begin simultaneously a few ns after start of 1 and 2.
FreqMeasureMulti channel1;
FreqMeasureMulti channel2;
FreqMeasureMulti channel3;
FreqMeasureMulti channel4;
// store the updated value in ch[x], for now, put default values there.
uint16_t ch_microseconds[CHANNELS +1] = {0,NEUTRAL,NEUTRAL,NEUTRAL,NEUTRAL};
// and output 4 regular servo channels
Servo servo1; // create servo objects
Servo servo2;
Servo servo3; // create servo objects
Servo servo4;
static const uint8_t throttlePedalPin = 14;
uint16_t throttlePedalValue = 0;
uint16_t minThrottlePedalValue = 400;
uint16_t maxThrottlePedalValue = 600;
static const uint8_t blueShifterPin= 2;
static const uint8_t blackShifterPin= 3;
uint16_t leftMCvalue = NEUTRAL;
uint16_t rightMCvalue = NEUTRAL;
void setup()
{
#ifdef debug
Serial.begin(57600);
while (!Serial) ; // wait for Arduino Serial Monitor
delay(10);
Serial.println("FreqMeasureMulti and Servo Begin");
delay(10);
#endif
channel1.begin(9,FREQMEASUREMULTI_MARK_ONLY); // purple wire
channel2.begin(10,FREQMEASUREMULTI_MARK_ONLY); // blue wire
channel3.begin(20,FREQMEASUREMULTI_MARK_ONLY); // green wire
channel4.begin(22,FREQMEASUREMULTI_MARK_ONLY); // yellow wire
servo1.attach(4); // white wire
servo2.attach(5); // grey wire
servo3.attach(6); // brown wire
servo4.attach(7); // orange wire
pinMode(throttlePedalPin, INPUT);
pinMode(blueShifterPin, INPUT_PULLUP);
pinMode(blackShifterPin, INPUT_PULLUP);
pinMode(13, OUTPUT); // LED
uint16_t temp;
EEPROM.get(MIN_THROTTLE_ADDR, temp);
if(0 == temp)
{EEPROM.put(MIN_THROTTLE_ADDR, minThrottlePedalValue);} // first time only
EEPROM.get(MAX_THROTTLE_ADDR, temp);
if(0 == temp)
{EEPROM.put(MAX_THROTTLE_ADDR, maxThrottlePedalValue);} // first time only
// every time
EEPROM.get(MIN_THROTTLE_ADDR, minThrottlePedalValue);
EEPROM.get(MAX_THROTTLE_ADDR, maxThrottlePedalValue);
sinceFrame = 0;
}
void loop()
{ // min and max of throttle are checked
static uint16_t tempMinThrottlePedalValue = minThrottlePedalValue;
static uint16_t tempMaxThrottlePedalValue = maxThrottlePedalValue;
static uint16_t minCount = 0;
static uint16_t maxCount = 0;
if (channel1.available() && channel2.available() && channel3.available() ) // valid RC frame
{
// read RC controls
sinceFrame = 0;
ch_microseconds[1] = FreqMeasureMulti::countToMicroseconds(channel1.readLatest());
ch_microseconds[2] = FreqMeasureMulti::countToMicroseconds(channel2.readLatest());
ch_microseconds[3] = FreqMeasureMulti::countToMicroseconds(channel3.readLatest());
ch_microseconds[4] = FreqMeasureMulti::countToMicroseconds(channel4.readLatest()); // don't care if ch 4 is valid, but we'll take it anyway
#ifdef debug
Serial.print("in RC loop. sinceFrame ");
Serial.println(sinceFrame);
Serial.print(ch_microseconds[1]);
Serial.print(", ");
Serial.print(ch_microseconds[2]);
Serial.print(", ");
Serial.print(ch_microseconds[3]);
Serial.print(", ");
Serial.println(ch_microseconds[4]);
Serial.println();
#endif
if(ch_microseconds[3] > NEUTRAL + 200)// left stick vertical, ratchet, non-spring-return, down
{// RC signal received, and override selected
ch_microseconds[0] = 1;// boolean indicator for RC control
if(((ch_microseconds[1] > NEUTRAL-60)&&(ch_microseconds[1] < NEUTRAL+60))&&(((ch_microseconds[2] > NEUTRAL-60)&&(ch_microseconds[2] < NEUTRAL+60))))
{// right stick within deadband
state = RC_STOPPED;
leftMCvalue = NEUTRAL;
rightMCvalue = NEUTRAL;
#ifdef debug
Serial.print("state RC_STOPPED. sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
else
{// RC_1pulse = steer- increases to right, RC_2pulse = speed- increases to up
state = RC_DRIVING;
leftMCvalue = ch_microseconds[2]+(ch_microseconds[1]-(NEUTRAL+20));
rightMCvalue = ch_microseconds[2]-(ch_microseconds[1]-(NEUTRAL+20));
#ifdef debug
Serial.print("state RC_DRIVING. sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
servo1.writeMicroseconds(leftMCvalue);
servo2.writeMicroseconds(rightMCvalue);
servo3.writeMicroseconds(ch_microseconds[3]);// unused as output, push DOWN to override, UP to hand over local control
servo4.writeMicroseconds(ch_microseconds[4]);// might be used as pass through, but just as easy to wire directly from receiver to servo
#ifdef debug
Serial.print("writing to ESC RC. sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.print("ch_microseconds[3] ");
Serial.println(ch_microseconds[3]);
Serial.print("ch_microseconds[4] ");
Serial.println(ch_microseconds[4]);
Serial.println();
#endif
}
else
{
ch_microseconds[0] = 0;
state = NOT_RC;
#ifdef debug
Serial.print("state NOT_RC. sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
}
if(sinceFrame > MAX_FRAME_INTERVAL || state == NOT_RC)// RC equipment off, out of range, one or more critical channels disconnected, or ch3 stick is down
{
// read local controls
sinceFrame = 0;
ch_microseconds[0] = 0;// can be used as a boolean flag to determine if under RC control
#ifdef debug
Serial.print("in local control loop. sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
if((throttlePedalValue = analogRead(throttlePedalPin)) < (minThrottlePedalValue + 40))
{ // no throttle applied
state = STOPPED;
leftMCvalue = NEUTRAL;
rightMCvalue = NEUTRAL;
#ifdef debug
Serial.print("state STOPPED, throttle ");
Serial.print(throttlePedalValue);
Serial.print(" sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
else if(digitalRead(blueShifterPin) ) //blue high note: If shifter pins are disconnected, they will both be pulled high and state will default to REVERSE
{ // low top speed reverse
state = REVERSE;
leftMCvalue = map(throttlePedalValue, minThrottlePedalValue, maxThrottlePedalValue, NEUTRAL, REVERSE_LIMIT);
rightMCvalue = map(throttlePedalValue, minThrottlePedalValue, maxThrottlePedalValue, NEUTRAL, REVERSE_LIMIT);
#ifdef debug
Serial.print("state REVERSE, throttle ");
Serial.print(throttlePedalValue);
Serial.print(" sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
else if(digitalRead(blackShifterPin) && !(digitalRead(blueShifterPin))) //black high
{ // low top speed forward
state = FORWARD1;
leftMCvalue = map(throttlePedalValue, minThrottlePedalValue, maxThrottlePedalValue, NEUTRAL, FORWARD1_LIMIT);
rightMCvalue = map(throttlePedalValue, minThrottlePedalValue, maxThrottlePedalValue, NEUTRAL, FORWARD1_LIMIT);
#ifdef debug
Serial.print("state FORWARD1, throttle ");
Serial.print(throttlePedalValue);
Serial.print(" sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
else
{ // high top speed forward
state = FORWARD2;
leftMCvalue = map(throttlePedalValue, minThrottlePedalValue, maxThrottlePedalValue, NEUTRAL, FORWARD2_LIMIT);
rightMCvalue = map(throttlePedalValue, minThrottlePedalValue, maxThrottlePedalValue, NEUTRAL, FORWARD2_LIMIT);
#ifdef debug
Serial.print("state FORWARD2, throttle ");
Serial.print(throttlePedalValue);
Serial.print(" sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.println();
#endif
}
servo1.writeMicroseconds(leftMCvalue);
servo2.writeMicroseconds(rightMCvalue);
servo3.writeMicroseconds(ch_microseconds[3]);// unused, just push up to override, down to handover local control
servo4.writeMicroseconds(ch_microseconds[4]);// might be used as pass through, but just as easy to wire directly from receiver to servo
static uint16_t tempMinThrottlePedalValue = minThrottlePedalValue;
static uint16_t tempMaxThrottlePedalValue = maxThrottlePedalValue;
static uint16_t minCount = 0;
static uint16_t maxCount = 0;
if(throttlePedalValue <= minThrottlePedalValue)// flirting with a new min
{
if(throttlePedalValue == tempMinThrottlePedalValue)// not the first time at this value, make sure it isn't a transient
{
minCount++;
if(minCount > NEW_EEPROM_COUNT_THRESHOLD)// we have a new bottom
{
minThrottlePedalValue = tempMinThrottlePedalValue;// this affects scaling of throttle and may change the feel of throttle response
EEPROM.put(MIN_THROTTLE_ADDR, minThrottlePedalValue);
#ifdef debug
Serial.print("new min throttle ");
Serial.println(minThrottlePedalValue);
#endif
}
}
else // new temp minimum
{
tempMinThrottlePedalValue = throttlePedalValue; // new candidate for bottom. Perhaps the potentiometer mount shifted.
minCount = 0;
}
}
if(throttlePedalValue >= maxThrottlePedalValue)// flirting with a new max
{
if(throttlePedalValue == tempMaxThrottlePedalValue)// not the first time at this value, make sure it isn't a transient
{
maxCount++;
if(maxCount > NEW_EEPROM_COUNT_THRESHOLD)// we have a new top
{
maxThrottlePedalValue = tempMaxThrottlePedalValue;// this affects scaling of throttle and may change the feel of throttle response
EEPROM.put(MAX_THROTTLE_ADDR, maxThrottlePedalValue);
#ifdef debug
Serial.print("new max throttle ");
Serial.println(maxThrottlePedalValue);
#endif
}
}
else // new temp maximum
{
tempMaxThrottlePedalValue = throttlePedalValue; // new candidate for top. Perhaps the potentiometer mount shifted.
maxCount = 0;
}
}
#ifdef debug
Serial.print("writing to ESC local. sinceFrame ");
Serial.println(sinceFrame);
Serial.print("leftMCvalue ");
Serial.print(leftMCvalue);
Serial.print(" rightMCvalue ");
Serial.println(rightMCvalue);
Serial.print("ch_microseconds[3] ");
Serial.println(ch_microseconds[3]);
Serial.print("ch_microseconds[4] ");
Serial.println(ch_microseconds[4]);
Serial.println();
#endif
}// RC receiver has LED to indicate good RC signal(green) or bad(red). The Teensy LED lights (orange) to indicate that the tractor is under Hank's local control.
// if the receiver LED is ever Red or dark, and the Teensy LED is not orange, there is a problem.
// RC receiver green and Teensy LED orange, means that RC can take control at any time by moving stick 3 down.
digitalWriteFast(13, ch_microseconds[0]?LOW:HIGH); // does this line get the fast optimization? The parameter is technically a constant, but a variable must be accessed for the ternary.
//almost same as
//if(ch_microseconds[0]){digitalWriteFast(13, LOW);}
//else {digitalWriteFast(13, HIGH);}
}
Modified library to read servo signals /home/slo/Arduino/libraries/FreqMeasureMulti
Code:
#ifndef FreqMeasureMulti_h
#define FreqMeasureMulti_h
#include <Arduino.h>
#define FREQMEASUREMULTI_BUFFER_LEN 24
// capture modes
#define FREQMEASUREMULTI_RAISING 1
#define FREQMEASUREMULTI_FALLING 2
#define FREQMEASUREMULTI_INTERLEAVE 3
#define FREQMEASUREMULTI_SPACE_ONLY 5
#define FREQMEASUREMULTI_MARK_ONLY 6
#define FREQMEASUREMULTI_ALTERNATE 7
// result constants for fmultiRecord.level
#define LEVEL_SPACE_ONLY 0
#define LEVEL_SPACE_MARK 1
#define LEVEL_MARK_SPACE 2
#define LEVEL_MARK_ONLY 3
#define LEVEL_UNDEFINED 255
typedef struct {
uint8_t level;
uint32_t count;
} fmultiRecord;
class FreqMeasureMulti
{
public:
bool begin(uint32_t pin);
bool begin(uint32_t pin, uint8_t mode);
bool begin(uint32_t pin, uint8_t mode, uint8_t bufferLength);
uint32_t available(void);
uint32_t read(void);
uint32_t readLatest(void);
uint8_t readLevel(void);
uint8_t channelToPin(uint8_t);
static float countToFrequency(uint32_t count);
static float countToNanoseconds(uint32_t count);
static uint16_t countToMicroseconds(uint32_t count);
friend void on_new_sample(void);
void end(void);
private:
void isr(bool inc);
friend void ftm0_isr(void);
fmultiRecord buffer_value[FREQMEASUREMULTI_BUFFER_LEN];
uint8_t buffer_len;
uint8_t buffer_head;
uint8_t buffer_tail;
uint8_t channel;
uint8_t last_read_level;
uint32_t raiscap_previous;
uint32_t fallcap_previous;
bool act_on_fall, act_on_raise, read_diff;
bool next_is_falling;
};
#endif
Code:
/* FreqMeasure Library, for measuring relatively low frequencies
* http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
* Copyright (c) 2015 PJRC.COM, LLC - Paul Stoffregen <paul@pjrc.com>
* Extended 2016 by Thierry Frenkel <theremingenieur@gmail.com>
*
* Version 0.22
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "FreqMeasureMulti.h"
#define FTM_SC_VALUE (FTM_SC_TOIE | FTM_SC_CLKS(1) | FTM_SC_PS(0))
#define FTM_CSC_RAISING (FTM_CSC_CHIE | FTM_CSC_ELSA)
#define FTM_CSC_FALLING (FTM_CSC_CHIE | FTM_CSC_ELSB)
#define UPDATE_ON_RAISING 1
#define UPDATE_ON_FALLING 2
#define UPDATE_DIFFERENCE 4
static uint8_t channelmask = 0;
static uint16_t capture_msw = 0;
static FreqMeasureMulti * list[8];
void on_new_sample(uint8_t ch) __attribute__ ((weak));
void on_new_sample(uint8_t ch){}
bool FreqMeasureMulti::begin(uint32_t pin)
{
return begin(pin, (uint8_t)FREQMEASUREMULTI_RAISING, (uint8_t)FREQMEASUREMULTI_BUFFER_LEN);
}
bool FreqMeasureMulti::begin(uint32_t pin, uint8_t mode)
{
return begin(pin, (uint8_t)mode, (uint8_t)FREQMEASUREMULTI_BUFFER_LEN);
}
bool FreqMeasureMulti::begin(uint32_t pin, uint8_t mode, uint8_t bufferLength)
{
uint8_t capture_mode;
switch (pin) {
case 22: channel = 0; CORE_PIN22_CONFIG = PORT_PCR_MUX(4); break;
case 23: channel = 1; CORE_PIN23_CONFIG = PORT_PCR_MUX(4); break;
case 9: channel = 2; CORE_PIN9_CONFIG = PORT_PCR_MUX(4); break;
case 10: channel = 3; CORE_PIN10_CONFIG = PORT_PCR_MUX(4); break;
case 6: channel = 4; CORE_PIN6_CONFIG = PORT_PCR_MUX(4); break;
case 20: channel = 5; CORE_PIN20_CONFIG = PORT_PCR_MUX(4); break;
#if defined(KINETISK)
case 21: channel = 6; CORE_PIN21_CONFIG = PORT_PCR_MUX(4); break;
case 5: channel = 7; CORE_PIN5_CONFIG = PORT_PCR_MUX(4); break;
#endif
default:
channel = 8;
return false;
}
switch (mode) {
case FREQMEASUREMULTI_FALLING:
case FREQMEASUREMULTI_INTERLEAVE:
case FREQMEASUREMULTI_MARK_ONLY:
case FREQMEASUREMULTI_SPACE_ONLY:
case FREQMEASUREMULTI_ALTERNATE:
capture_mode = mode;
break;
default:
capture_mode = FREQMEASUREMULTI_RAISING;
}
act_on_raise = (capture_mode & UPDATE_ON_RAISING);
act_on_fall = (capture_mode & UPDATE_ON_FALLING);
read_diff = (capture_mode & UPDATE_DIFFERENCE);
NVIC_DISABLE_IRQ(IRQ_FTM0);
if (FTM0_MOD != 0xFFFF || (FTM0_SC & 0x7F) != FTM_SC_VALUE) {
FTM0_SC = 0;
FTM0_CNT = 0;
FTM0_MOD = 0xFFFF;
FTM0_SC = FTM_SC_VALUE;
#ifdef KINETISK
FTM0_MODE = FTM_MODE_WPDIS; //allow reconfiguring the CSC on the fly
#endif
}
capture_msw = 0;
raiscap_previous = 0;
fallcap_previous = 0;
next_is_falling = false;
buffer_len = bufferLength;
buffer_head = 0;
buffer_tail = 0;
volatile uint32_t *csc = &FTM0_C0SC + channel * 2;
#if defined(KINETISL)
*csc = 0;
delayMicroseconds(1);
#endif
*csc = FTM_CSC_RAISING; // first capture is always rising
list[channel] = this;
channelmask |= (1 << channel);
NVIC_SET_PRIORITY(IRQ_FTM0, 48);
NVIC_ENABLE_IRQ(IRQ_FTM0);
return true;
}
uint32_t FreqMeasureMulti::available(void)
{
uint32_t head = buffer_head;
uint32_t tail = buffer_tail;
if (head >= tail) return head - tail;
return buffer_len + head - tail;
}
uint32_t FreqMeasureMulti::read(void)
{
uint32_t head = buffer_head;
uint32_t tail = buffer_tail;
if (head == tail) return 0xFFFFFFFF;
tail = tail + 1;
if (tail >= buffer_len) tail = 0;
uint32_t value = buffer_value[tail].count;
last_read_level = buffer_value[tail].level;
buffer_tail = tail;
return value;
}
uint32_t FreqMeasureMulti::readLatest(void)
{
uint32_t head = buffer_head;
uint32_t tail = buffer_tail;
if (head == tail) return 0xFFFFFFFF;
tail = head;
if (tail >= buffer_len) tail = 0;
uint32_t value = buffer_value[tail].count;
last_read_level = buffer_value[tail].level;
buffer_tail = tail;
return value;
}
uint8_t FreqMeasureMulti::readLevel(void)
{
return last_read_level;
}
float FreqMeasureMulti::countToFrequency(uint32_t count)
{
#if defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISK)
return (float)F_BUS / (float)count;
#elif defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISL)
return (float)(F_PLL/2) / (float)count;
#else
return 0.0;
#endif
}
float FreqMeasureMulti::countToNanoseconds(uint32_t count)
{
#if defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISK)
return (float)(count * 1000) / (float)(F_BUS / 1000000);
#elif defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISL)
return (float)(count * 1000) / (float)(F_PLL / 2000000);
#else
return 0.0;
#endif
}
uint16_t FreqMeasureMulti::countToMicroseconds(uint32_t count)
{
#if defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISK)
return (uint16_t)(count /(F_BUS / 1000000));
#elif defined(__arm__) && defined(TEENSYDUINO) && defined(KINETISL)
return (uint16_t)(count /(F_PLL / 2000000));
#else
return 0;
#endif
}
uint8_t FreqMeasureMulti::channelToPin(uint8_t ch)
{
switch (ch) {
case 0: return 22;
case 1: return 23;
case 2: return 9;
case 3: return 10;
case 4: return 6;
case 5: return 20;
#if defined(KINETISK)
case 6: return 21;
case 7: return 5;
#endif
default: return 0xFF;
}
}
void FreqMeasureMulti::end(void)
{
switch (channel) {
case 0: CORE_PIN22_CONFIG = 0; break;
case 1: CORE_PIN23_CONFIG = 0; break;
case 2: CORE_PIN9_CONFIG = 0; break;
case 3: CORE_PIN10_CONFIG = 0; break;
case 4: CORE_PIN6_CONFIG = 0; break;
case 5: CORE_PIN20_CONFIG = 0; break;
#if defined(KINETISK)
case 6: CORE_PIN21_CONFIG = 0; break;
case 7: CORE_PIN5_CONFIG = 0; break;
#endif
default: return;
}
channelmask &= ~(1 << channel);
volatile uint32_t *csc = &FTM0_C0SC + channel * 2;
*csc = 0;
}
void ftm0_isr(void)
{
bool inc = false;
if (FTM0_SC & FTM_SC_TOF) {
#if defined(KINETISK)
FTM0_SC = FTM_SC_VALUE;
#elif defined(KINETISL)
FTM0_SC = FTM_SC_VALUE | FTM_SC_TOF;
#endif
capture_msw++;
inc = true;
}
uint8_t mask = FTM0_STATUS & channelmask;
if ((mask & 0x01)) list[0]->isr(inc);
if ((mask & 0x02)) list[1]->isr(inc);
if ((mask & 0x04)) list[2]->isr(inc);
if ((mask & 0x08)) list[3]->isr(inc);
if ((mask & 0x10)) list[4]->isr(inc);
if ((mask & 0x20)) list[5]->isr(inc);
#if defined(KINETISK)
if ((mask & 0x40)) list[6]->isr(inc);
if ((mask & 0x80)) list[7]->isr(inc);
#endif
}
void FreqMeasureMulti::isr(bool inc)
{
uint32_t period = 0;
uint8_t level = LEVEL_UNDEFINED;
volatile uint32_t *csc = &FTM0_C0SC + channel * 2;
uint32_t capture = csc[1];
next_is_falling = !next_is_falling; // toggle capture mode
#if defined(KINETISK)
csc[0] = (next_is_falling ? FTM_CSC_FALLING : FTM_CSC_RAISING);
#elif defined(KINETISL)
csc[0] = (next_is_falling ? FTM_CSC_FALLING : FTM_CSC_RAISING) | FTM_CSC_CHF;
#endif
if (capture <= 0xE000 || !inc) {
capture |= (capture_msw << 16);
} else {
capture |= ((capture_msw - 1) << 16);
}
// compute the waveform period
if (next_is_falling) {
if (act_on_raise) period = capture - (read_diff ? fallcap_previous : raiscap_previous);
raiscap_previous = capture;
level = (read_diff ? LEVEL_SPACE_ONLY : LEVEL_MARK_SPACE);
} else if (!next_is_falling ) {
if (act_on_fall) period = capture - (read_diff ? raiscap_previous : fallcap_previous);
fallcap_previous = capture;
level = (read_diff ? LEVEL_MARK_ONLY : LEVEL_SPACE_MARK);
}
if (period != 0) {
uint32_t i = buffer_head + 1;
if (i >= buffer_len) i = 0;
if (i != buffer_tail) {
buffer_value[i].level = level;
buffer_value[i].count = period;
buffer_head = i;
on_new_sample(this->channel);
}
}
}