Teensyduino 1.29 Beta #1 Available

Status
Not open for further replies.
Is the installer able to run on C2, and at least show the intro page?
I downloaded the installer and it appears to start and run fine on the C2.

But if I start up Arduino, Arduino still crashes:
Code:
odroid@odroid64:~/arduino-1.6.9$ ./arduino
Picked up JAVA_TOOL_OPTIONS: 
=============== DEBUG MESSAGE: Atomic load(jlong) unsupported on this platform ================

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00000006, pid=2359, tid=3795117168
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) Client VM (25.0-b70 mixed mode linux-arm )
# Problematic frame:
# C  0x00000006
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/odroid/arduino-1.6.9/hs_err_pid2359.log
./arduino: line 34:  2359 Segmentation fault      "$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"
odroid@odroid64:~/arduino-1.6.9$ ^C
odroid@odroid64:~/arduino-1.6.9$
Probably should report to Arduino...
 
Yup, it's definitely an Arduino problem. But really, it may be out of their hands, as it looks like a Java JRE compatibility issue.

Any chance you could try running the installer anyway, just to see if it's able to recognize that folder as a valid copy of Arduino and complete the installation of all files?
 
@cartere - is that doing a 'rebuild all' first build? Opening an 'examples' copy? Doing a partial rebuild will be even more helpful on a Pi.
 
Yup, it's definitely an Arduino problem. But really, it may be out of their hands, as it looks like a Java JRE compatibility issue.

Any chance you could try running the installer anyway, just to see if it's able to recognize that folder as a valid copy of Arduino and complete the installation of all files?
Thanks,

I ran the installer and it did recognize the folder as a valid Arduino and it completed the installation.
 
Maybe try deleting the java folder from within arduino-1.6.9. Perhaps there's a JRE that works with the C2 and everything will magically start working if Arduino runs with a working JRE?
 
Thanks Paul,

Tried that and it now fails:

Code:
odroid@odroid64:~/arduino-1.6.9$ ./arduino
Picked up JAVA_TOOL_OPTIONS: 
=============== DEBUG MESSAGE: Atomic load(jlong) unsupported on this platform ================

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00000006, pid=4268, tid=3788280944
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) Client VM (25.0-b70 mixed mode linux-arm )
# Problematic frame:
# C  0x00000006
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/odroid/arduino-1.6.9/hs_err_pid4268.log
./arduino: line 34:  4268 Segmentation fault      "$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"
odroid@odroid64:~/arduino-1.6.9$ mv java/ java_save
odroid@odroid64:~/arduino-1.6.9$ ./arduino
Picked up JAVA_TOOL_OPTIONS: 
java.lang.UnsatisfiedLinkError: /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
	at java.lang.Runtime.load0(Runtime.java:809)
	at java.lang.System.load(System.java:1086)
	at processing.app.Platform.loadLib(Platform.java:155)
	at processing.app.Platform.<clinit>(Platform.java:150)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at processing.app.BaseNoGui.initPlatform(BaseNoGui.java:677)
	at processing.app.Base.guardedMain(Base.java:151)
	at processing.app.Base.main(Base.java:135)
/home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
Cannot load native library /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so
The program has terminated!
odroid@odroid64:~/arduino-1.6.9$
I also made sure I had default-jre installed. Likewise tried installing: default-jre:armhf to see if that would help.

Posted this information up to Odroid forum as well. Maybe someone up there will have some other ideas as well.

Thanks again.

P.S. - I also installed on Odroid XU4, which works. As a side note you need to remember to do the standard Linux stuff and download and install rules file.

FYI - After initial download download of blink, I edited to change delays to 500 and clicked download. The compile and download were done under 10 seconds...
 
Another side note: More Arduino issue.

I install the new Arduino IDE on a virgin machine, example Odroid XU4, I install Teensyduino and let it install all of the libraries.

I now start up Arduino, and the library manager complains that I have several out of date libraries installed, with the option to go into library manager to potentially update some/all of these libraries.

Since the only User libraries I have installed are with Teensyduino, how does one know if the libraries that the library manager says is out of date are actually valid updates which include the changes to make them properly work with Teensy?
 
Another side note: More Arduino issue. ... I now start up Arduino, and the library manager complains ... how does one know if the libraries that the library manager says is out of date are actually valid updates which include the changes to make them properly work ... ?

That is a good question in general KurtE - I see that on the system I set up to OTA program ESP8266 and I am torn between picking an offered update that may be harmless or fatal as the name means nothing with regard to how I use the system. So far I've ignored the noise because it seemed like some default install not related to Teensy or ESP8266.
 
Paul, I've just sent you a personal mail with a very specific issue (maybe timing related) in the Flightsim USB stack. If you want, I can repeat it here, but I'm not sure if the required level of detail would be useful for most of the readers.

The thing is that, in general, the Flightsim plugin seems to freeze when you have more than 16 datarefs or commands. The issue doesn't seem to be new and seems to be somewhere deep in the Flightsim USB stack. If I enable the debug output in usb_free it seems to go away. Can you take a look at that, please?

Do you want me to repeat the full issue here?
 
Paul, I've just sent you a personal mail

Saw it, replied, and it's already deleted. I don't track problems via email, so there's little point sending me any email to report a problem. You must post here or in a github issue. Generally, use the forum is the issue needs investigation, use github if you've isolated the problem to specific code.

The thing is that, in general, the Flightsim plugin seems to freeze when you have more than 16 datarefs or commands. The issue doesn't seem to be new and seems to be somewhere deep in the Flightsim USB stack.

I need you to post this as a new thread in the bug reports forum.

https://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports

Your message must have enough info to reproduce the problem. I know this probably sounds harsh, but if your bug report is lacking info, I will not even begin any investigation.

The absolute bare minimum info is a complete program I can copy into Arduino and run on a Teensy. Ideally it should not need external hardware (printing to the Arduino Serial Monitor is best), but if it does, complete info about how to replicate the necessary hardware is required. I am usually willing to spend some money to buy necessary hardware, but I will not spend time guessing about it. Time is the precious commodity I have in limited supply, and nothing wastes time worse than trying to reproduce a bug without clear & complete info! Missing links to the place to buy, unclear info about which parts or how they're connected, or what they should or shouldn't do that I used to observe the problem will mean I do not even begin an investigation.

I also need you to be very clear and specific about the setup and steps in X-Plane. Please understand I haven't actually used X-Plane for over a year. It's not even installed one any of my machines at this time. I need to know which version, which plugins (hopefully as few as possible), and the steps to take.

Please also know I am not a pilot. I can't even fly a simulated aircraft. I'm not familiar with avionics jargon. I've probably spent less than 1 hour total ever using X-Plane, and nearly all of that time was with the Cessna plane still sitting on the runway... pretty much the view shown in the video I posted a couple years ago. Almost everything I do know about X-Plane is the SDK API, and pretty much nothing about how to actually use it for actual flight sim. I'm not familiar with aircraft control panels, so for a 17 dataref test, at a bare minimum I will need some screenshots showing exactly which places to look for the effects of Teensy's changes, and which places to do things to change the datarefs. When/if I dig into this issue, I'll be installing X-Plane again from scratch, not having touched it in a long time. Please write your instructions with the assumption I've forgotten anything and everything about X-Plane (or it's changed since the version I installed years ago).

I have 2 events coming up, so early June is the absolute earliest I can really do anything. In fact, I might miss the thread if posted before then, so remind me. But if you send private email, please just give me a link to the forum thread. I do keep a list of forum threads needing investigation (it's a long list...) so if I miss it over the next couple weeks, remind me in June.

Since I did this flight sim stuff 4 years ago, a number of these issues have come up. So few people use this feature... pretty much any sane business decision would be to simply discontinue it. But I would like to keep it going... I just can't put a lot of time into maintenance. I'll probably dig into these issues deeply and throughly, but only once (at least for the next couple years). So please, give me a very detailed and clear set of info, so we can make that one-time effort really count!
 
Last edited:
Very minor question:

If I compile a sketch for Teensy2 and the sketch needs eeprom.h in one of it's cpp files that is part of that sketch, I include eeprom.h in my main.ino file: #include <EEPROM.h>

And this produces a warning message:
Code:
In file included from C:\Users\Kurt\Documents\Arduino\GitHub\Teensy_USBToAX\Teensy_USBToAX.ino:11:0:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h:151:20: warning: 'EEPROM' defined but not used [-Wunused-variable]

 static EEPROMClass EEPROM;

                    ^
Again harmless...
 
That is harmless. That means that the EEPROM library instantiates a static class to prevent you from creating multiple instances of it with someEEPROM = new EEPROMclass(); If you use EEPROM in the main (.ino) file, the compiler will understand that it's not only included, but also used. But if the static EEPROM instance is only used in "side files" (in Arduino terms spoken), then the compiler can't see it and warns you because it thinks that you have included EEPROM for nothing.
 
Thanks,

As I mentioned, I know that it is harmless, but I typically try to get my compiles to not have any warnings. As in this case, the eeprom.h is part of Teensyduino, I mentioned it in case Paul decides to try to suppress this warning through something like #pragma or something like __attribute__((unused))

Again probably not worth it, but thought I would mention it.

Thanks again.
 
Paul,

I should ask, these types of comments here, or separate topics or...

Again playing with Teensy 2, by adapting some of the T3.2 code, and mention things I run into.

Example: in the code, when I run (Use Teensy as AX servo controller), when I receive bad data from the host, I wish to clear out all of the receive pending data from the USB.

On Teensy 3.2, I was using:
HTML:
usb_serial_flush_input();

This does not exist for Teensy 2.0. However it looks like I can do:
Code:
Serial.clear();

However if I attempt to then compile for 3.2 this fails. Wondering if this should be added for 3.2 as you can do Serial1.clear().

Kurt
 
USB External Port

For me, the usage is something like:
I am using an Odroid Xu4 (could be RPI) on a robot, and I am using a Teensy 3.2 to control the Dynamixel Servos, and maybe I choose to put the Teensy somewhere inside of the robot and I wish to update the program, without having to tear the robot apart.

So I connect to my robot using VNC, bring up the Arduino IDE, make the change and download the updated firmware...

This doesn't have anything to do with the new software, but for future projects or if you tear your robot apart again it's fairly easy to setup an external USB port for the Teensy 3.2. Me and one of my friends soldered onto the pads on the back of the Teensy that break out the USB connection to install a external port on our quad copter project and it's saved us a bunch of time (and saved us from breaking any more USB connectors on Teensys). Just watch out for non-standard wire colors on external USB ports and use a short jumper of 24 gauge stranded from the Teensy to the USB cable (much easier to solder to the board than the wires inside the cable).
 
This doesn't have anything to do with the new software, but for future projects or if you tear your robot apart again it's fairly easy to setup an external USB port for the Teensy 3.2. Me and one of my friends soldered onto the pads on the back of the Teensy that break out the USB connection to install a external port on our quad copter project and it's saved us a bunch of time (and saved us from breaking any more USB connectors on Teensys). Just watch out for non-standard wire colors on external USB ports and use a short jumper of 24 gauge stranded from the Teensy to the USB cable (much easier to solder to the board than the wires inside the cable).
Thanks, I might consider that on some projects. Luckily I have only broken 1 USB connector on Teensy.

But I do like having the option on some of my robots of being able to update the code on the Teensy without having to change any wires.
As for speed, it may depend on which ARM processor you are using. For example it runs reasonably fast on my Odroids. Either my Xu4 ( 8 cores, 4 of which run at 2ghz) or C1+ (4 cores running at 1.5ghz), both using EMMC storage.
 
Hi, I'm trying to compile a program with Servo.h library, and arduino 1.6.9 gives me the following error

arduino-1.6.9\libraries\Servo\src/Servo.h:69:2: error: #error "This library only supports boards with an AVR, SAM or SAMD processor."

#error "This library only supports boards with an AVR, SAM or SAMD processor."

when i usearduino 1.6.8 compiled correctly.

Oh, looks like a change in Arduino 1.6.9 is causing the IDE to use the wrong non-Teensy library. They changed library selection yet again, now also depending on the library.properties architectures setting. Not nice.

Looks like a change to library.properties to "architectures=avr" can fix this. I'll have this in the next beta.
 
Arm install worked on Odroid C1. At least it installed and compiled code. I have not tried the download yet.

Also tried on Odroid C2 (arm64), arduino fails to load...
Thought I would mention, that there is hope here :D, today I tried updating C2 to latest stuff (sudo apt-get update/upgrade/dist-upgrade), Arduino 1.6.9 still failed. I then downloaded Arduino nightly build (ARM version), and this now runs... So hopefully after Arduino does the next release and Teensyduino is reved for it...
 
Thanks for all of your hard work Paul. Truly appreciated.

What would it take to port to ARM 64bit? aka Raspberry Pi 3b / Ubuntu-Mate 64bit.
The 32bit arm "http://www.pjrc.com/teensy/td_129-be...stall.linuxarm" doesn't even throw an error, but just returns to prompt.

Of course I had to be difficult and not accept the default Raspian distro for my Rover. Would be nice to configure the 4 Teensy's onboard directly.
 
The 32bit arm "http://www.pjrc.com/teensy/td_129-be...stall.linuxarm" doesn't even throw an error, but just returns to prompt.

Maybe something else is wrong? Other people have used it on Raspberry Pi 3.

I could be wrong about this, but my understanding is the Raspbian system is all still 32 bits, even though the hardware could theoretically run 64 bit code.
 
Raspbian still is 32-bit, as you say. Apparently 'unix-guru' selected a rather less-travelled path and installed Ubuntu-Mate 64-bit on his RPi3.
 
Status
Not open for further replies.
Back
Top