PDA

View Full Version : Teensyduino 1.42 Beta #8



Paul
06-05-2018, 05:31 PM
Here is a eight beta test for Teensyduino 1.42.

The main new feature is a "Teensy" section in the Tools > Ports menu
which tries to show Teensy in all modes, not just Serial. New native
(no Java serial library) serial monitor code is also with these ports.


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


Linux AARCH64: (very experimental)
https://www.pjrc.com/teensy/td_142-beta8/TeensyduinoInstall.linuxaarch64.xz
https://www.pjrc.com/teensy/td_142-beta8/arduino-1.9.0-beta-linuxaarch64.tar.xz



Changes since Teensyduino 1.42-beta7 (https://forum.pjrc.com/threads/52583-Teensyduino-1-42-Beta-7)

Avoid unnecessary delays when upload can't find any board
Print more informative messages about selecting board in Tools > Ports
Added ARM 64 bit experimental installer

Paul
06-05-2018, 05:51 PM
If you want to try the experimental 64 bit ARM, here's the steps needed....

First extract Arduino


tar -xvf arduino-1.9.0-beta-linuxaarch64.tar.xz

Uncompress and run the Teensyduino installer. The normal UPX compression isn't working yet, so for now it comes xz compressed.


unxz TeensyduinoInstall.linuxaarch64.xz
chmod 755 TeensyduinoInstall.linuxaarch64
./TeensyduinoInstall.linuxaarch64

Install the Teensy udev rules, as you would on any Linux system


wget https://www.pjrc.com/teensy/49-teensy.rules
sudo cp 49-teensy.rules /etc/udev/rules.d/

Unfortunately the Oracle JRE with Arduino is "Headless" (doesn't support graphics yet on ARM 64 bit?), so it must be deleted. Install the OpenJDK JRE instead.


cd arduino-PR-beta1.9-BUILD-69
rm -rf java
sudo apt-get install openjdk-8-jre

Arduino's "builder" program (written in Google Go language) is still 32 bits, so the 32 bit C libraries need to be installed.


sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install libc6:armhf libstdc++6:armhf

Optional: nVidia Jetson TX2 ships with a kernel lacking the cdcacm driver (USB Serial). You could try installing this (https://github.com/jetsonhacks/installACMModule) to get it. Fortunately Teensy uses HID for programming and has HID-based serial emulation for non-serial modes, so you don't absolutely need this to use Teensy. It is needed for all normal Arduino boards.

Now you're ready to use Arduino.


./arduino
Select Teensy in Tools > Boards menu
Select RawHID in Tools > USB Type menu
Open File > Examples > 01.Basics > Blink
Click Upload
(press button on Teensy... needed if prior program to USB Serial)

Here's a photo of the setup on my desk right now, with the Teensy 3.6 freshly programmed by the Jetson TX2.


13963
(click for full size)


This conversation (https://github.com/arduino/Arduino/issues/7302) on Arduino's issue tracker has more info. Please please please do not bother the Arduino developers with any Teensy-specific problems. Reply here on this forum for anything related to Teensy.

PaulStoffregen
06-06-2018, 12:02 AM
@Defragster - Any chance you could give this (probably last) beta a try with your LC & 3.6 setup on Windows? I tried to reduce as many of the delays as possible when teensy_reboot can't find a board. I think you'll like it. :)

But if there are unexpected issues on Windows, I'll probably revert these speedups and go with beta7 for the final 1.42 release.

defragster
06-06-2018, 02:06 AM
TD 1.42b8 downloaded and installed on 1.85 no problem. 2 IDE's up and program well to 3.6 and LC … open, program, close All Good!

IDE #1 came up T_3.6 - adjusted port - Upload …
Start IDE #2 - Board T_LC, Port LC, Tsermon
IDE #1 programs okay - Tsermon okay
T_LC Upload …
Unplug T_3.6 - Tsermon returns okay
T_LC programs and returns to Tsermon
… alternate Upload to each as Programming completes the other

One Tports and one Tsermon per IDE.
Close IDE #1 - Tports becomes background with loss of 'host Java'
IDE #2 program LC
Close IDE #2
Tports.exe exits and all good.

Paul: In Teensy/Verbose - did you intend the callback spew stream to stay running?

<edit>: repeated those 2 in some fashion - waited … added IDE#3 to a T_3.5 and no problem through upload, monitor, close.

PaulStoffregen
06-06-2018, 07:49 AM
Did you try any cases where the upload can't work, like if you've unplugged the Teensy completely?

If you selected from the new Teensy part of the ports menu, it's supposed to fail quick rather retrying needlessly for 4 seconds. If you have other boards connected, it's supposed to tell you how many others it found but didn't try to upload.

Not everything is perfect (and probably won't be for 1.42) on the Arduino IDE side. If you upload *again* after a failed upload without making a selection in the ports menu, Arduino will often fall back to not knowing the port at all, which put teensy_reboot into the old mode where it searches for any Teensy rather than rebooting exactly & only the one you selected.

If you have 2 or more boards connected and it runs in search mode, you're supposed to see a (hopefully helpful) message advising you to use Tools > Ports to select the exact board you really want to upload.

At least that's how it's supposed to work, on all platforms. The hard part (for me) is always testing this stuff on Windows. My test machine is basically a fresh install+updates of Windows 10 with no other software installed and without years of daily use & accumulation of stuff in the registry.



did you intend the callback spew stream to stay running?

That's not me. None of the code I've written creates or transmits windows events. Some other software on your PC must be creating these events and broadcasting them. All I did was listen for incoming events from the Windows system. When they're something unexpected, I just log them to the verbose info.

defragster
06-06-2018, 08:23 AM
Did you try any cases where the upload can't work, like if you've unplugged the Teensy completely?


Like I try dumb things on purpose to see it break :) if you insist …

it does 'abort quickly'.



Found 2 Teensy boards, but using auto-search to find board for upload.
Please use Tools > Ports(Teensy) to select the specific board.

That was okay the first time then I got yelled at for CPU mismatch when it tried pushing 3.6 code to LC when I unplugged the 3.6. That is in this log:
13973

Okay it worked twice this time - then did the CPU mismatch again - shorter log file:
13974 This left my T_LC offline.

Note: The above message is for the T_3.6 unplug - after 'Upload' before Program and is in ERROR - there is only 1 T_LC online … not two.

I powered 2nd IDE and set to T_LC and pulled before Program:


Previously selected Teensy port is offline.
1 other Teensy board found. Please select
this Teensy from the Tools > Ports menu.

It seems unplugging before 'Upload' press is longer than after and give another message:


Unable to open COM8 for reboot request
Windows Error Info: Access is denied.
more ideas... https://forum.pjrc.com/threads/40632?p=126667&viewfull=1#post126667
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.

That happened a second time when it was plugged at 'Upload Press' … then leaving T_LC plugged it programmed - but also printed this IDE text { this repeats another time }:


Found 2 Teensy boards, but using auto-search to find board for upload.
Please use Tools > Ports(Teensy) to select the specific board.


Log file:: 13975

NOTE:: The MISMATCH CPU would not trigger on the T_LC with 2nd IDE - just the above notes as I tried.

If you could hide this message as 'known annoyance?' it would be nice - I can't cut and paste or follow bouncing lines from Verbose. It is nothing I know anything about … It is perpetual … except as noted many times … when it stopped is when the prior code would be failing.
unplugged all Teensy's and it still comes - offhand I don't see anything else that would be doing it


00:54:17.480 (ports 117): callback C1A1
00:54:19.522 (ports 117): callback C1A1
00:54:21.563 (ports 117): callback C1A1
00:54:23.608 (ports 117): callback C1A1
00:54:25.651 (ports 117): callback C1A1
00:54:27.680 (ports 117): callback C1A1
00:54:29.718 (ports 117): callback C1A1


… back in some hours ...

defragster
06-06-2018, 08:28 AM
opps ? Look what I found?? >> now that I know it wasn't PJRC's ….
CALLBACKS:


C:\Windows\System32\wbem\unsecapp.exe - Microsoft Community
https://answers.microsoft.com/en-us/windows/forum/windows_vista...

Sep 15, 2016 The Unsecapp.exe application is used in the communication of two computers and this program starts automatically in Windows vista. The Unsecapp.exe application is used to send results back to a client in a process that may not have permissions to be a DCOM service.
13976

PaulStoffregen
06-06-2018, 07:59 PM
That happened a second time when it was plugged at 'Upload Press' … then leaving T_LC plugged it programmed - but also printed this IDE text { this repeats another time }:

Found 2 Teensy boards, but using auto-search to find board for upload.
Please use Tools > Ports(Teensy) to select the specific board.


Trying to gauge how severe this and other behavior you saw really is? Are we looking at messages with not-100%-accurate info in these strange use cases? Or is there something more serious? Should I hold up releasing 1.42?

defragster
06-06-2018, 08:46 PM
Trying to gauge how severe this and other behavior you saw really is? Are we looking at messages with not-100%-accurate info in these strange use cases? Or is there something more serious? Should I hold up releasing 1.42?

It provides feedback that isn't ideal - but it is indicative of the problem/solution. Unless the Teensy oddly goes offline - or the user pulls the cable it will never been seen. Nothing bad happened - except when it took the LC offline - which could be a problem - but I've triggered that before when it gets bad HEX<>Port association.

Unless you can see where the messages are getting confused and safely clean that up - I'd suggest it could wait until 1.43. If there is a problematic side effect - the IDE Ports method is still present for use to bypass it.

<edit>: Ideally with new 1.42+ builds the TLoader could KNOW {with telnet 127.0.0.1 28542} what teensy is on the indicated port and scan the HEX before taking the Teensy offline to program. This would avoid the case above where T_LC went offline to find out the HEX was for T_3.6. Once that device is offline it causes grief getting programming done without extra 'futzing' around, and the running device is wrongly halted.

PaulStoffregen
06-12-2018, 05:17 PM
Is anyone doing anything with the ARM 64 bit software?

The files I posted are based on build 69, about 8 days ago. Martino has now posted an update (https://downloads.arduino.cc/ide_beta/arduino-1.9.0-beta-linuxaarch64.tar.xz) using build 71, with arduino-builder now converted to Aarch64. Hopefully with this update the "apt-get install libc6:armhf libstdc++6:armhf" step should not be needed.

The 1.42-beta8 installer might work with build 71. I haven't tested. In fact, unless someone replies that they're actually using/testing the ARM 64 bit software, I'm probably going to leave my Jetson TX2 board sitting on the shelf until this matures enough for Arduino to post a copy on their main website.

KurtE
06-13-2018, 04:18 PM
Hi Paul,

I have the Odroid C2, that I had sitting on the Shelf. I had some arduino working withing it earlier, by getting some of the 16 bit stuff installed.

Verified it still boots (I could not remember if it was my C1 or C2 that was having problems).

I am in the process of downloading the latest image Ubuntu 16.04lts... for it which I will reburn the emmc with...

So will hopefully be able to test it out if you would like.

Edit:
The board is setup... Should I try the binaries up at the start here or do you have more recent ones that I should try.

Thanks

PaulStoffregen
06-13-2018, 09:04 PM
Should I try the binaries up at the start here or do you have more recent ones that I should try.


Please give the installer a try on the build 71 file. They don't seem to have made any java changes, so it will probably work.

I'm still debating how much more effort I want to put into ARM 64 bit. I want to be ready for the day they make an actual release for Aarch64. I'm less excited about making lots of updates for the moving target that is their 1.9-beta hourly build process.

KurtE
06-13-2018, 10:48 PM
Totally understand. Hard to hit a moving target.

Tried downloading the build you mentioned...

odroid@odroid64:~/Downloads/arduino-PR-beta1.9-BUILD-71$ ./arduino
Picked up JAVA_TOOL_OPTIONS:
java.awt.HeadlessException
at java.awt.SplashScreen.getSplashScreen(SplashScreen .java:117)
at processing.app.Base.<init>(Base.java:232)
at processing.app.Base.main(Base.java:147)
odroid@odroid64:~/Downloads/arduino-PR-beta1.9-BUILD-71$


Info on Odroid:

odroid@odroid64:~/Downloads/arduino-PR-beta1.9-BUILD-71$ uname -a
Linux odroid64 3.14.79-116 #1 SMP PREEMPT Tue Sep 26 01:19:06 BRT 2017 aarch64 aarch64 aarch64 GNU/Linux

Commands above to delete java and install... worked so Arduino IDE comes up.

Try running Teensy instal, Won't go to the NEXT button choosing the folder...

KurtE
06-14-2018, 02:01 PM
Quick update:

As I mentioned, the Teensy installer would not allow me to install on build 71... So I installed on build 69.

I then used the app MELD to see what the differences are between 3 directories (unmodified 69, modified 69, and 71) and I had it copy over changed files...
Not exactly foolproof, maybe...

But was able to run Arduino, plug in a Teensy 3.2, load up the blink example and have it program the 3.2 with blink... It also showed the Teensy Ports /dev/ttyACM0

I also tried the example mouse triangle move, which worked (I built with Serial + mouse + joystick + keyboard) or some such combo. It is sort of hard to do much now with it plugged in as the mouse keeps moving ;)

Again this is on an Odroid C2

PaulStoffregen
06-14-2018, 02:44 PM
Wow, good to hear it runs on Odroid C2 :)

mjs513
07-30-2018, 10:45 PM
Not sure if this is a issue with the Arduino IDE itself or a teensduino related issue. I just tired to open the serial plotter and received the following message:

Error opening serial port 'usb:0/140000/0/1'. (Port busy)
Went back and checked nothing else open and then tried to open the serial monitor and received the message:

Serial monitor not available while plotter is open
And of the course the Serial Plotter was not open.

Mike

defragster
07-30-2018, 10:50 PM
Mike - assume this was TD_1.42 - what 'Port' type was selected - the new 'Teensy' branch? Does it change using the old IDE Port?

Does TeensyLoader 'Help / Verbose' show any details in the process?

mjs513
07-30-2018, 11:01 PM
Sorry. Should have added more info. Running Arduino IDE 1.8.5 with TD1.42. Am on a Windows 10 machine.

Ok. Took a few seconds to try a different IDE. Just tried it with IDE1.8.4 with TD 1.39-beta2. It worked fine no issue. And before you ask I did a recompile with the 1.8.4/1.39 combo.

defragster
07-30-2018, 11:03 PM
Sorry. Should have added more info. Running Arduino IDE 1.8.5 with TD1.42. Am on a Windows 10 machine.

Ok. Took a few seconds to try a different IDE. Just tried it with IDE1.8.4 with TD 1.39-beta2. It worked fine no issue. And before you ask I did a recompile with the 1.8.4/1.39 combo.
Am wondering if the Plotter conflict is from the TD_1.42 added TeensyPorts insterface not leaving the IDE in charge of a known port … see post #17 to use 'IDE old style port' selection.

mjs513
07-30-2018, 11:17 PM
Ok if by port you mean Com6 (Teensy 3.5) Serial. That is what is selected.

PaulStoffregen
07-30-2018, 11:21 PM
When using 1.42, you should see Teensy listed twice in the Tools > Ports menu.

Maybe the serial plotter works when you select one of them, but not with the other? Or does it fail with either one selected?

Looks like I need to work on this for 1.43, but knowing if both are broken or just 1 of them doesn't work would really help narrow things down a bit.

mjs513
07-30-2018, 11:27 PM
Just checked. Com6 (Teensy 3.5) Serial does not work. I get the error message. When I try COM6 (Teensy) it works fine. I had to close the IDE and reopen it to try the later since I lock the port with the first try :) Just retested to be sure.

defragster
07-31-2018, 12:26 AM
Good Mike - that's what I expected. The Upper "Teensy … Com6 (Teensy 3.5)" is the new TD_1.42 enhanced implementation from PJRC.

The IDE's version is "Serial Ports … COM6 (Teensy)" and using that allows it to connect the IDE's Plotter code to that port.

Not used the Plotter interface ever/recently and was between things and referring to the Port menu text by memory away from the IDE.

defragster
07-31-2018, 12:54 AM
Paul: Looking at doing more on the debug_t3 for Fault enunciation and for the T_3.6 I find this where it seems known func()'s are missing in ...\hardware\teensy\avr\cores\teensy3\mk20dx128.c:

~line #616 under > #elif defined(__MK66FX1M0__)

uart4_status_isr, // 82 UART4 status
uart4_error_isr, // 83 UART4 error
unused_isr, // 84 --
unused_isr, // 85 --


Unless that 6th port is unique on T_3.6?

Where the T_3.5 has this under > #elif defined(__MK64FX512__)


uart4_status_isr, // 82 UART4 status
uart4_error_isr, // 83 UART4 error
uart5_status_isr, // 84 UART4 status
uart5_error_isr, // 85 UART4 error

tonton81
07-31-2018, 01:51 AM
For T3.6, Serial6 is LPUART0, not same as T3.5

/* this is in SPI_MST slave code */


#if defined(__MK64FX512__)
NVIC_SET_PRIORITY(IRQ_UART5_STATUS, 0);
#endif
#if defined(__MK66FX1M0__)
NVIC_SET_PRIORITY(IRQ_LPUART0 , 0);
#endif

KurtE
07-31-2018, 02:51 AM
Yep - the LPUART0 if specific to 3.6... All of the registers and the like are different.

defragster
07-31-2018, 03:27 AM
Opps … I heard the words Low Power UART in my head … but didn't bother to look first to even see what was behind both Serial6's …

>> lpuart0_status_isr, // 102 LPUART

elbarmo
08-01-2018, 01:49 PM
Hi all,

This is my first post to the forum. I am also quite new to the topic. I am trying to flash an Arduino program with my Jetson TX1 to a Teensy 3.2. I am trying this experimental version of Arduino 1.9 Beta, the problem is that when I download the Arduino file from the first post, I get the build 78. The Teensyduino version I need the build 69, and I don't know how to get it. Could some help me out?

PaulStoffregen
08-01-2018, 02:02 PM
The Teensyduino version I need the build 69, and I don't know how to get it.

Click this link on msg #1 (https://forum.pjrc.com/threads/52649-Teensyduino-1-42-Beta-8?p=180921&viewfull=1#post180921) of this thread.

14316


the problem is that when I download the Arduino file from the first post, I get the build 78.

I tried it just now. It really is build 69.

Maybe you have another similarly named file in your downloads folder, and you're opening that file rather than the one you just downloaded from this forum?

elbarmo
08-01-2018, 02:10 PM
Thank you for the quick answer, it must have been something like that, I get build 69 as well.

elbarmo
08-01-2018, 02:49 PM
Just for you to know, I have managed to install everything following the instructions and I have flashed the blink example successfully from my Jetson. Thank you very much to everyone who worked on this!

PaulStoffregen
08-24-2018, 09:05 PM
Fix for the serial plotter issue when Ports(Teensy) selected.

https://github.com/PaulStoffregen/Arduino-1.8.6-Teensyduino/commit/0c460e86e572933a07a4498a504a8e77b3d7e0c8