PDA

View Full Version : Teensyduino 1.38 Beta #3



Paul
08-22-2017, 09:43 PM
Here is a third beta test for Teensyduino 1.38.


Old beta download links removed. Please use the latest version:
https://www.pjrc.com/teensy/td_download.html


Changes since Teensyduino 1.38-beta2: (https://forum.pjrc.com/threads/45213-Teensyduino-1-38-Beta-2)

Support for Arduino 1.8.4
fix for disable of SD on Teensy 3.5 & 3.6 (Frank)
SPI.transfer(readbuf, writebuf, size) (KurtE)
Added TeensyThreads library (Fernando Trias)
Fixed Adafruit_CC3000 on Teensy 3.x
Audio envelope graceful handling of noteone while gain > 0
Improved FreqMeasureMulti countToNanoseconds
[Experimental] EventResponder
[Experimental] MillisTimer
[Experimental] SPI async using DMA & EventResponder (KurtE)

mjs513
08-22-2017, 10:13 PM
Hi Paul. Installed beta3 no problem. However, there is a conflict between the TeensyThreads Library and EventResponder which I mentioned in another thread with Kurt. All I am running is the tests.ino from the TeensyThreads library. Here is the exact error:


C:\Users\CYBERP~1\AppData\Local\Temp\arduino_build _778242/..\arduino_cache_517125\core\core_teensy_avr_teens y35_usb_serial,speed_120,opt_o2std,keys_en-us_bbc7c6806654ab36443e271befb1ac3c.a(EventRespond er.cpp.o): In function `systick_isr':

C:\Local Programs\arduino-1.8.3-c14\hardware\teensy\avr\cores\teensy3/EventResponder.cpp:326: multiple definition of `systick_isr'

C:\Users\CYBERP~1\AppData\Local\Temp\arduino_build _778242\libraries\TeensyThreads\TeensyThreads.cpp. o:C:\Users\CyberPalin\Documents\Arduino\libraries\ TeensyThreads/TeensyThreads.cpp:196: first defined here

c:/local programs/arduino-1.8.3-c14/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "TeensyThreads.h"
Used: C:\Users\CyberPalin\Documents\Arduino\libraries\Te ensyThreads
Not used: C:\Local Programs\arduino-1.8.3-c14\hardware\teensy\avr\libraries\TeensyThreads
Error compiling for board Teensy 3.5.

Will let you know if there are any other conflicts.

Mike

mjs513
08-22-2017, 10:18 PM
EDIT: here is the post: https://forum.pjrc.com/threads/44723-Arduino-Events?p=150899&viewfull=1#post150899

EDIT2: Using Arduino 1.8.3.

PaulStoffregen
08-22-2017, 11:17 PM
there is a conflict between the TeensyThreads Library and EventResponder

Please give this a try. If it works, I'll send a pull request....

KurtE
08-22-2017, 11:31 PM
Wonder why they decided they needed a new release already? Nothing looked earth shattering in the release notes.

Now that teens threads is in the build, maybe it is time to really try it out :D
But probably topic for another thread!

Yes both EventResponder's MillisTimer and the thread code use the systick_isr... The thread code is a lot more involved including it is written in Assembly language.

mjs513
08-22-2017, 11:38 PM
That fixed it. Now compiles and runs no issues.

Ran another sketch I use for my rover that uses the following libraries and besides a few warning messages from the adafruit libraries it compiles fine:

#include <Wire.h>
#include <EEPROM.h>
#include <StopWatch.h>
#include <elapsedMillis.h>
#include <Streaming.h>
#include <StopWatch.h>
#include <PWMServo.h>
#include <vector>
#include <string.h>

#include <FastLED.h>

#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2561_U.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
#include <VL53L0X.h>

Will run a few more tests with my other crazy sketches and will let you know, but I don't see any issues coming up.

Thanks
Mike

EDIT: By the way am using IDE 1.8.4 now.

PaulStoffregen
08-23-2017, 03:37 AM
I submitted a pull request.

https://github.com/ftrias/TeensyThreads/pull/4

This fixes the compile error. But TeensyThreads will prevent MillisTimer from running. That probably needs to be fixed by a special higher priority thread or some other mechanism within TeensyThreads to call MillisTimer::runFromTimer() just after each systick interrupt.