Teensyduino 1.20 Release Candidate #5 Available

Status
Not open for further replies.

Paul

Administrator
Staff member
Here is a fifth (and likely final) release candidate for Teensyduino 1.20:


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



Please give this a try and report any bugs. Try to include a sample program that reproduces the problem!

These are the changes since Teensyduino 1.20-rc4:

  • Audio Library
  • FlexCAN Library
  • Fix SD card speed (default is 24 MHz SPI again)
  • Update Adafruit NeoPixel library
  • Update ILI9431_t3 library
  • Fix strncpy_P on Teensy 3.x
 
I plan to make a final 1.20 release by Friday. At this point, I'm only considering bug fixes.

New features (or not-so-new stuff that didn't make it into 1.20) can be discussed for 1.21....
 
In terms of C99, I don't believe C++ supports C99 designated initializers. So to use it, you would have to put the code into a library with the .c extension instead of .cpp so that the C compiler is invoked, and not C++.
 
Has anyone tried actually using C99 with a good number of Arduino libraries and sketches? Are there compatibility issues?
 
Ummm, the Arduino libraries are written in C++, not C. In my Teensy 1.19 installation directory in the libraries sub-directory, there are only 9 .c files that are not example files. While C++ is close to C, it is not 100% compatible. Generally you can write C code that is accepted by C++, but generally you will not be able to do the reverse.
 
I had a problem with the Adafruit ILI9340 graphictest example and only get a white screen. I tried a few different combinations with the following results:

Arduino 1.05 and Teensy Loader 1.19 works
Arduino 1.05 and Teensy Loader 1.20-rc5 works
Arduino 1.06 and Teensy Loader 1.20-rc5 does not work

At this point it looks like Arduino 1.06 is at fault, but I thought it might be worth mentioning.

Jon
 
C99 is needed if you want to use something like ATOMIC_BLOCK in C code with GCC (not G++)

You already have gnu0x enabled for C++, which is great, and along the same lines as C99 v.s. C89.

And yes, I would totally use the new features, and your arm cores would benefit as well.
 
Not a bug report, but I was inspired to finally take a look at your Audio Library, and updated the SmartMatrix Library to be compatible. Your DMAController class made that easy. I couldn't use a lot of the helper functions and just modified TCDs directly as the way I'm using most of the DMA channels in (I'm guessing) an uncommon way. I pushed the changes to a new branch until 1.20 is officially released:
https://github.com/pixelmatix/SmartMatrix/tree/DMAController
 
As far as libraries go, my RTClib wants c99-- the avr GCC defaults to this.
Unfortunately I had to hack around things in order to get it to work-- basically by telling the compiler that the code is actually C, and renaming the file .cpp
e.g.
extern "C" {
... c99 code here ...
}

and that actually will work because of the gnu0x mode.

I have not checked the difference in code size or generated code for c99 mode of gcc and g++ hacked to see the code as C.
What I can say is it can be a real royal pain in the rump when I want to port something and make it into an arduino-type library.
 
I had a problem with the Adafruit ILI9340 graphictest example and only get a white screen. I tried a few different combinations with the following results:

Arduino 1.05 and Teensy Loader 1.19 works
Arduino 1.05 and Teensy Loader 1.20-rc5 works
Arduino 1.06 and Teensy Loader 1.20-rc5 does not work

At this point it looks like Arduino 1.06 is at fault, but I thought it might be worth mentioning.

Jon
May need more info (what Teensy, what board, wiring, OS). I tried using the Adafruit 2.2" tft breakout with the ILI9340, with RC5 and Arduino 1.06 and it is working for me. FYI - I also verified again it works with the ILI9341_T3 driver (But you need for CS and DC to be on Teensy 3.1 CS pins). I tried this on Windows 7 machinge.

I then tried with the Adafruit ILI9340 driver and first I had white screen as well. I see that the graphic test showed RST connected to pin 8, So I connected my jumper, downloaded the program again and it is working.
 
I’m testing on a Teensy 3.1 and Adafruit 2.2” display. Connections match the example sketch:

Code:
#define _sclk 13
#define _miso 12
#define _mosi 11
#define _cs 10
#define _dc 9
#define _rst 8

When 1.06/TD1.20-rc5 gave me the white screen, I also noticed that the pin 13 LED (SCK) did not flash after uploading. Without changing any part of the circuit, I can upload using 1.05/TD1.19 and get a working display and flashing LED. The fact it works with the latter setup tells me the wiring, Teensy, and display are good.

My 1.06 and rc5 are fresh installs on a WIN7 Pro system.
 
I thought I would double check mine as well as I installed RC5 over RC4. So on my Linux 64 machine, I downloaded fresh copy of Arduino 1.06, plus a fresh copy of RC5. I then took my test one with the same display as you have as well as the same wiring and first downloaded blink in it to make sure it was not using the previous version... I then downloaded the graphic test for the Adafruit ILI9340 library that Teensyduino installed and it worked again. Likewise the graphic test program for ILI9341_T3 runs (a whole lot faster than the other library.

So I also would recommend you retry it again.

Kurt
 
Help > About shows Arduino 1.0.6 and Teensyduino 1.20-rc5.

I tried a clean install on my alternate XP system and the display worked as it should, even the ILI9341_t3.

Went back to the Win7 system, deleted Arduino 1.0.5 and 1.0.6. Re-downloaded 1.0.6 and rc5 and installed both. Tried the ILI9340 example with the same white screen, so it's something specific to my Win7 system. Tried the ILI9341_t3 and it works - much faster, as Kurt said. I'll keep using the 9341 library.

Jon
 
Paul, thanks for including FlexCAN library. One minor issue - the README.md file seems to be missing (the png file is included)
 
No idea if you consider this a bug, but if you install it over an older version where you checked, include all libraries, and don't check include all libraries, I don't think it updates or uninstalls the unselected libraries. Problem being all the old versions of the libraries are still there.

Ira
 
I wouldn't consider this a bug, but perhaps an opportunity for future improvement.

This involves 2 tasks. Obviously the installer would need to be able to detect which libraries are already installed and have the ability to remove them.

But the more difficult task would involve a way to show this on the installer page. How do other installers show this, where the installer can possible add, update or remove components, some of which are already installed.

In other words, there are at least 5 cases:

  1. not installed, will not be installed
  2. not installed, will be added
  3. already installed, will be deleted
  4. already installed, no change
  5. already installed, will be updated

Obviously a simple binary checkbox like the installer has now is probably only going to be confusing.

Are there other installers that many people are already familiar with, which do these 5 cases and have some clear way of showing all 5 cases within the limited screen space?
 
Can it be as simple as: Teensy replaces only what libraries it brings to the party.
A pop-up warning might say, at the onset... warning, customized libraries may be overwritten; backup these before installing.
 
In other words, there are at least 5 cases:

  1. not installed, will not be installed
  2. not installed, will be added
  3. already installed, will be deleted
  4. already installed, no change
  5. already installed, will be updated

Instead of a checkbox you could use a combo-box with following values corresponding the 5 cases mentioned above
1. SKIP
2. ADD
3. REMOVE
4. KEEP
5. UPDATE

Same prefixes can be added to a library name when composing summary of selected libraries.

You can also decide on defaults to make the selection process easier (e.g. not installed defaults to SKIP, installed defaults to UPDATE).

Confirmation popup should show up each time the library is updated or removed (just in case).

P.S. Only 1/2 shall be available when the library is not installed and 3/4/5 when it is.
 
Last edited:
A pop-up warning might say, at the onset... warning, customized libraries may be overwritten; backup these before installing.

Only a small percentage of end users read such advisory messages in popup dialogues. Especially on Microsoft Windows, where they are commonly used, many people are in the habit of immediately clicking "Ok", without even glancing at the message.
 
many people are in the habit of immediately clicking "Ok", without even glancing at the message.

Then they can only blame themselves...

Right now Teensyduino installer overwrites libraries WITHOUT ASKING. A popup would at least give the more careful ones a chance...
 
Status
Not open for further replies.
Back
Top