PDA

View Full Version : Teensyduino 1.37 Beta #4



Paul
06-18-2017, 01:25 PM
Here is a fourth beta test for Teensyduino 1.37.


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


Changes since Teensyduino 1.37-beta3 (https://forum.pjrc.com/threads/44904-Teensyduino-1-37-Beta-3)

Fix SPI SCK (pin 13) drive strength (KurtE)
Increase USB Serial.begin() wait for serial monitor
Fix Audio SD WAV play status with LTO optimization
Teensy Loader window movable by clicking in center area
Support "Clear output" button in Arduino 1.8.3 serial monitor

mjs513
06-18-2017, 03:49 PM
Ran the updates through the same sketches as before including the USB host shield and everything works fine. board_qc tests seem to work a lot faster as well, maybe the change to spi has something to do with it. Also tried out the "Clear Output" button and that is working as well.

PaulStoffregen
06-18-2017, 09:32 PM
Thanks for testing. :)

Unless anyone finds anything soon, or I turn up anything unexpected with more testing, I'm planning to release 1.37 Monday or Tuesday.

tonton81
06-18-2017, 10:38 PM
teensythreads is not listed under library examples, it works pretty well

mjs513
06-18-2017, 11:11 PM
I would agree with adding teensythreads as well if that is on the table. Was looking for something like that for quite a while.

PaulStoffregen
06-18-2017, 11:18 PM
teensythreads....

Remind me of this in a week or so, after 1.38-beta1.

Nothing new is going into 1.37 at this point, only bug fixes. Even fixes, at this late stage, need to be for something quite important.

1.38-beta1 is already planned to be identical to 1.37, but with the language dialect changed to C++14. Nothing new will be considered for 1.38-beta1, because the idea is to have a beta to test that lets us compare against the prior release for the important switch from C++11 to C++14.

Let's talk of adding stuff after a little testing on 1.38-beta1. Yeah, I know waiting can be painful, but it's critically important to get to a stable release next week, and to make the first step of such a major change without complicating it by adding any features.

defragster
06-19-2017, 12:40 AM
Re: Beta 3 thread (https://forum.pjrc.com/threads/44904-Teensyduino-1-37-Beta-3?p=146285&viewfull=1#post146285):

I don't understand how you've getting "COM8" without "(Teensy)".

Here's what I see when I test on Windows 10 ver 1703.

Paul - I just compiled under the IDE - rather than Stino in SublimeText and it came up normally - still using Beta 3 install.

The Stino build options were set MIDI - My Bad (https://forum.pjrc.com/threads/44904-Teensyduino-1-37-Beta-3?p=146233&viewfull=1#post146233).

hubbe
06-19-2017, 06:19 AM
So I went back and tried the HelloSerialMonitor example again.

First, I tried it on a mac, and that worked just fine.
Then I went back to my linux machine and tried all the usb type settings, here are the results: (yes means Serial Monitor is working)

serial: yes
keyboard: no
keyboard+touchscreen: no
keyboard+mouse+touchscreen: no
keyboard+mouse+joystick: yes
serial+keyboard+mouse+joystick: yes
midi: yes
serial+midi: yes
serial+midi+audio: yes
audio: no
mtp disk (experimental): no
raw HID: yes
flight sim controls: yes
flight sim controls+joystick: no
all of the above: yes

Unsurprisingly, all the CDC serial options work just fine. The other results are kind of weird, but I tried it forwards and backwards and got the same results.

So, then I decided to try an older teensyduino, and I still get the same result....

So, good news: This Beta didn't break anything in USB
Bad news: It's was already broken.... (At least on Ubuntu 16.04.2 LTS, with kernel 4.4.0-78-generic)
Does anybody else have an Ubuntu 16-something machine they can try it on? Maybe it's just my machine somehow?

(All that's needed to do to reproduce this results is: 1) open examples->Teensy->Tutorial3->HelloSerialMonitor, select one of the options that doesn't work in the list above, compile and upload, open serial monitor and see if says "hello world" once per second or not.)

For me personally, a workaround would be to replace "MTS disk" with "MTS disk + Serial" I suppose, but it seems like there might be bigger problems here.

mjs513
06-19-2017, 12:34 PM
(All that's needed to do to reproduce this results is: 1) open examples->Teensy->Tutorial3->HelloSerialMonitor, select one of the options that doesn't work in the list above, compile and upload, open serial monitor and see if says "hello world" once per second or not.

I tested all the "no" responses on a Windows 10 with Beta4 and in all cases I did get a hello world response:

keyboard: yes
keyboard+touchscreen: yes
keyboard+mouse+touchscreen: yes
audio: yes
mtp disk (experimental): yes
flight sim controls+joystick: yes

What I did notice is that the first time I opened the SerMon it would indicate that the connection was closed. If I closed the monitor and then reopened it, it would start printing out "Hello World". This open-close process would have to be repeated if I closed the monitor after Hello world was printing.

PaulStoffregen
06-19-2017, 02:10 PM
Then I went back to my linux machine and tried all the usb type settings

Any chance there's an old instance of teensy_gateway still running on your Linux machine? It's supposed to terminate when you quit Arduino. But if you somehow got an old version (from before these newer options were added) of that still running on your machine, it would explain why some work and others don't. That's really the only explanation I can imagine.

PaulStoffregen
06-19-2017, 03:02 PM
keyboard: yes
keyboard+touchscreen: yes
keyboard+mouse+touchscreen: yes
audio: yes
mtp disk (experimental): yes
flight sim controls+joystick: yes

I just retested all of these on Linux 64 bit. They all work.

tonton81
06-19-2017, 05:20 PM
mjs513, sometimes i just click on the serial monitor button even if its already open, it comes back to life whenever i plug power in the teensy if it was already open, clicking the IDE button refreshes(reopens) the com connection even if the window was still open and said offline

hubbe
06-19-2017, 07:05 PM
Any chance there's an old instance of teensy_gateway still running on your Linux machine? It's supposed to terminate when you quit Arduino. But if you somehow got an old version (from before these newer options were added) of that still running on your machine, it would explain why some work and others don't. That's really the only explanation I can imagine.

I don't think so, I checked and it says the teensy_gateway was started yesterday.
I'm going to reboot my machine later to see if there something else that's stuck somehow.

I also took my T3.6 to work to do some testing there, and it's acting strange too.
First of all, programming doesn't seem to work unless I run as root. (Probably some udev rule I need to tweak.) It's confusing though because there's no error message, programming just doesn't happen.
It wasn't until I tried the command-line tool that I realized that there might be a permission problem. (I got this message: Unable to claim interface, check USB permission.)
Anyways, when I run as root, I get the opposite behavior from home: All the emulated serial options work, but the CDC serial options do not.
My work machine is a slightly tweaked ubuntu 14.04 running a 4.4.0 kernel.

mjs513
06-19-2017, 07:34 PM
@tonton81. Thanks for that tidbit. Never realized that. Learn something new everyday. :)

PaulStoffregen
06-19-2017, 09:11 PM
Any chance you're working with an old copy of the udev rule file? It was updated a few versions ago when I put in the first (non-working) MTP stuff.

The installer doesn't do anything with the udev rules. Most of that is due to the issues with getting temporary root permissions, and the general assumption that most Linux users are experts. Maybe it should at least try looking at the file and notice if it's missing or not the same as the latest?

hubbe
06-19-2017, 10:07 PM
Any chance you're working with an old copy of the udev rule file? It was updated a few versions ago when I put in the first (non-working) MTP stuff.

The installer doesn't do anything with the udev rules. Most of that is due to the issues with getting temporary root permissions, and the general assumption that most Linux users are experts. Maybe it should at least try looking at the file and notice if it's missing or not the same as the latest?

I don't seem to have an udev rule file at all. (Neither at home nor at work.)
Installing the udev file makes things works a lot better at work. CDC works, and I don't need to run as root anymore.
I hope it makes everything work at home too, will find out later...

hubbe
06-20-2017, 03:03 AM
I don't seem to have an udev rule file at all. (Neither at home nor at work.)
Installing the udev file makes things works a lot better at work. CDC works, and I don't need to run as root anymore.
I hope it makes everything work at home too, will find out later...

So I had a much older version of the udev rules installed at home.
Unfortunately updating the rules didn't seem to help.
However, running as root does for some reason. I don't understand how this can be a permission problem since some configuration works, but seems to be what it is anyways.
I tried adding myself to the plugdev group, but that didn't seem to be sufficient. I *really* wish that it would give me some sort of error message, that would make it much easier to know what is going on.

hubbe
06-23-2017, 05:35 AM
So I had a much older version of the udev rules installed at home.
Unfortunately updating the rules didn't seem to help.
However, running as root does for some reason. I don't understand how this can be a permission problem since some configuration works, but seems to be what it is anyways.
I tried adding myself to the plugdev group, but that didn't seem to be sufficient. I *really* wish that it would give me some sort of error message, that would make it much easier to know what is going on.

So this might not be the greatest solution to the permission problems, but I added this to my udev rules to make the relevant /dev/hidraw* file accessible:



SUBSYSTEM=="hidraw", DEVPATH=="*/usb*:16C0:04[789ABCD]?.*", MODE:="0666"


Using ATTRS{idVendor} or ATTRS{idProduct} doesn't seem to work on hidraw devices. At least not on my machine.

abhi
06-27-2017, 09:10 PM
Hi all ,

I was working with a Teensyduino 1.27 with arduino 1.6.9 before and everything worked fine with it.
Now i reinstalled everything fresh with arduino 1.6.9 but with the latest Teensy 1.37 version and it is showing me
Fatal error: No EEPROM.h file not found .

Basically i was using the library version EEPROM i.e <EEPROM.h> it didn't pose a problem before but now it does.
Is there any way i can the previous version of Teensduino especially if it is 1.27.?

Regards,
Abhi

PaulStoffregen
06-27-2017, 09:33 PM
EEPROM works when I try here with the latest.

10894

Edit: also tried with Arduino 1.6.9. Works fine. I tried on Linux 64 bit with Teensy 3.6 selected. Which system & board are you using?

abhi
06-28-2017, 07:32 PM
Thank you for your fast reply Paul.
I am using Teensy 3.2 with 48MHz Serial Optimize : Faster

Yes i have tried the library examples and it works too. I am doing the same include and it says fatal error file not found
Its the problem in my source code .
I am attaching a screenshot so you can see.
At line number 6 when i include <EEPROM.h>

10904

I copy pasted library files in my source code and changed to "EEPROM.h" then it compiles fine.
Just wondering what changed which will cause this error now in version 1.37.
i compiled the same source code with teensy 1.29 and works fine.

Thanks. Regards,
Abhi

KurtE
06-28-2017, 08:36 PM
Maybe the compiler and/or - preprocessor.

But I noticed on my current machine the file name is: eeprom.h and not EEPROM.h. So you might try changing the case of the file name in your sketch and see if that
makes a difference

PaulStoffregen
06-28-2017, 08:46 PM
Just wondering what changed which will cause this error now in version 1.37.


I'm wondering the same thing. But from only this screenshot, I can not tell.

My guess is you can't share this project code, right?

Could you at least turn on verbose info while compiling in File > Preferences. Then recompile for the same error, and click the Copy Error Messages button to get the complete list of all the error text. When you post it here, put it in code tags (click "Go Advanced" if using quick reply, to get the full editor with code tags) so it's easier to read your message.

abhi
06-28-2017, 09:53 PM
I'm wondering the same thing. But from only this screenshot, I can not tell.

My guess is you can't share this project code, right?

Could you at least turn on verbose info while compiling in File > Preferences. Then recompile for the same error, and click the Copy Error Messages button to get the complete list of all the error text. When you post it here, put it in code tags (click "Go Advanced" if using quick reply, to get the full editor with code tags) so it's easier to read your message.

Yes i cannot share the whole code.

Note: I tested with the eeprom.h too but it is giving the same error.
Here is the error message below.

"C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\sketch\ubx_uart.cpp" -o "nul"
"D:\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++11 -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=137 -DARDUINO=10609 -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\arduino-1.6.9\hardware\teensy\avr\cores\teensy3" "C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\sketch\menuSystem.ino .cpp" -o "C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\preproc\ctags_target_ for_gcc_minus_e.cpp"
In file included from C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\sketch\Logging.h:17:0 ,

from C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\sketch\TaskScheduler. h:15,

from C:\Users\Abhishek\Desktop\Awearable Apparel\PlaySafe\TomMenuSystem\menuSystem\menuSyst em.ino:9:

C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\sketch\EepromTeensy.h :13:20: fatal error: EEPROM.h: No such file or directory

compilation terminated.

Error compiling for board Teensy 3.2 / 3.1.

KurtE
06-28-2017, 10:09 PM
Note: I tested with the eeprom.h too but it is giving the same error.
Here is the error message below.
C:\Users\Abhishek\AppData\Local\Temp\build6b0b3b77 b0d882d4e71564aa465c95c2.tmp\sketch\EepromTeensy.h :13:20: fatal error: EEPROM.h: No such file or directory

Actually from here it still looks like the file EepromTeensy.h is still looking for EEPROM.h... Again not sure if it will fix it, but I do known under Linux the case must match the actual file.

PaulStoffregen
06-28-2017, 10:34 PM
This is very strange. Without seeing the code, very hard to guess why it's doing this.

But I do see it's in the early stage where Arduino is running "gcc -E" to discover which libraries are needed. Maybe it's an issue with the arduino builder program?

Any chance you could give the latest Arduino 1.8.3 are try? On Windows, you can download the ZIP file and extract is somewhere else on your PC, so it doesn't uninstall the copy you already have. Just remember where you put it, since you'll need to navigate to it when running the installer. Also pay attention to the title bar which shows the version, since you'll have 2 copies of Arduino on your PC and they look similar except the title bar.

spairo
07-04-2017, 06:49 PM
In Arduino Uno I launched the TinyBasic Plus program, although it worked with quite a bit of RAM.
I changed Uno to Teensy 3.2 with lots of SRAM. What was my surprise when after limiting the buffer for the SD card, I got to work the same SRAM as the UNO.
Where is the mistake. In Teensy 3.2 I use this program Tiny Basic Plus ver 1.3
https://github.com/DGxInfinitY/Teensy3.2
The problem is for 137beta4 and 138 beta2.
errors - ld.exe: region `RAM' overflowed by 1108 bytes
Teensy-TinyBASICPlus-v1.3.ino.elf section `.bss' will not fit in region `RAM'

Program data: Arduino: 1.8.3 (Windows 7), TD: 1.38-beta2, Board: "Teensy 3.2 / 3.1, Serial, 72 MHz, Faster, US English"

spairo
07-05-2017, 11:56 AM
if file Sd_t3.h in line 35 is comment // #define USE_TEENSY3_OPTIMIZED_CODE
all software datalogger, dumpfile, files, listfile, readwrite and cardinfo is full working.
but Tiny Basic Plus not reading and writing to/from SD card.
example from ReadWrite:

Initializing SD card...initialization done.
Writing to test.txt., word 1, A, #.done.
read test.txt:
1000 testing 1, 2, 3.
63000 testing 1, A, 3.
testing 1, A, #.

- after uncomment Sd_t3.h in line 35 #define USE_TEENSY3_OPTIMIZED_CODE
Tiny Basic plus is reading, not writing.
all software datalogger, dumpfile, files, listfile, readwrite and cardinfo is reading but not writing to SD card.
example for this:

Initializing SD card...initialization done.
Writing to test.txt., word 1, A, *.done.
read test.txt:
1000 testing 1, 2, 3.
63000 testing 1, A, 3.
testing 1, A, #.

Testing on 137beta3.

PaulStoffregen
07-05-2017, 01:16 PM
but Tiny Basic Plus not reading and writing to/from SD card.


Are you sure reading isn't working?

The optimized versions does not support writing. But it does read. Have you tested with a program that only reads?

spairo
07-05-2017, 05:29 PM
from tiny Basic Plus

// #define USE_TEENSY3_OPTIMIZED_CODE
HELLO
Teensy TinyBASICPlus v1.3.1
57636 bytes free.
2048 EEProm bytes total.
OK
>files
OK

#define USE_TEENSY3_OPTIMIZED_CODE
HELLO
Teensy TinyBASICPlus v1.3.1
57636 bytes free.
2048 EEProm bytes total.
OK
>files
0
AUTORUN.INF 16
TEST.TXT 65
1.BAS 41
11.BAS 13
DATALOG.TXT 1264
DATA1.TXT 635
TEST1.TXT 637
OK