Teensy 3.1 issues...

FredEBear

Member
My Teensy 3.1 stopped working properly today (wrong voltage supply - just a hickup really) and I am trying to rewrite the AnimatedGIFs sktech that I’ve always relied upon but strange things have started happening. First off I can’t find my Teensy boards menu on the Arduino IDE. Instead I get something called Teensy 4 Security in the dropdown menu. What IS this? I don’t have a Teensy 4 but rather a Teensy 3.1 but now I just get errors on the IDE that are driving me crazy. Who screwed this up anyway?
So, how do I program my Teensly 3.1 via Arduino IDE now? Please advise. Oh one more thing. There is a message stating that I have a .HEX encryption key (NOT true as I can’t find it and a program loaded on the IDE stating to write the file to my Teensy then destroy the program as my “KEY” is in this program, but it’s NOT HERE. At least I can’t find it so my iMac is running on standby as I don’t want to destroy my Teensy 3.1 if I run said program and if I run said program without a KEY I don’t want to be permanently locked out of programming my Teensy 3.1. To recap: I don’t have a Teensy 4, nor do I have the KEY and I can’t access my Teensy sketches nor do I have access to my Teensy 3.1 board via the drop down menu. It’s all screwed up now!!!
 
Sorry but so far the only thing I know is you have a Teensy 3.1/3.2

Might help to know are we talking windows? which version? Actually now see iMac...


What version of Arduino do you have installed?

What version of Teensyduino...

If you look at the menu it should look something like:
screenshot.jpg

And yes the Teensy 4 security menu is there under tools regardless of if you are using a Teensy 4 or 3 or ...
Just like the Wifi... menu near it, does not do anything for your teensy.

The security menu allows you to do some security like stuff on Teensy 4 boards, but mainly only ones that are specially purchased that allow the board to be locked... In your case, you should not not need/want to do anything with the items in this menu.

But you should still have the Tool->Board menu which should have a line teensyduino in it where you should be able to choose the T3.1/2...
And other sub-menu under tools, to those things like USB Type: Serial And which port.

Not sure what else to suggest yet.

If all else fails I would suggest downloading the Teensyduino again, be sure to download the right version for which version of the Mac OS you are running.

Good luck
 
Nope doesn't look anything like this. When I press Teensy Security 4 I get a pop up sheet with instructions to perform an Encryption Setup and the steps necessary to do it. Tells me to write down the KEY (no key here) and not to forget it or else, I just guessing here as it doesn't actually say, I've toasted my Teensy 3.1 board so I'm reluctent to proceed with the set up. Like I've said I have a Teensy 3.1 board.
MAC OS 10.13.6 Arduino 1.8.13 Teensy 1.55. So, should I run the security program (sketch) that popped up even though I don't have a Teensy 4 board?
Encryption Setup
Create a new encryption key. The key will be written at the path below. KEEP THIS FILE SECRET. Anyone who obtains key.pem could decrypt your code. MAKE BACKUPS, as no way exits to recover this file. ETC...
This is what concerns me greatly. I don't know where to proceed.
 
Am ignoring the issues with Teensy 4 update forced upon me for the time being and trying to compile a Teensy Animated GIFs July 6, 2020 sketch and these are my error messages: Please note I haven't changed anything since I last uploaded it.
/Users/alfredolivas/Desktop/Arduino/Sketchbook/Teensy32x32MatrixSlideshow-main/AnimatedGifsNEW01/AnimatedGifsNEW01.ino:132:0: warning: "SD_CS" redefined
#define SD_CS 15
^
/Users/alfredolivas/Desktop/Arduino/Sketchbook/Teensy32x32MatrixSlideshow-main/AnimatedGifsNEW01/AnimatedGifsNEW01.ino:131:0: note: this is the location of the previous definition
#define SD_CS BUILTIN_SDCARD
^
In file included from /Users/alfredolivas/Desktop/Arduino/Sketchbook/Teensy32x32MatrixSlideshow-main/AnimatedGifsNEW01/AnimatedGifsNEW01.ino:80:0:
/Users/alfredolivas/Desktop/Arduino/Sketchbook/libraries/SmartMatrix-4.0.3/src/MatrixHardware_Teensy3_ShieldV1toV3.h:29:17: note: #pragma message: MatrixHardware: SmartMatrix Shield for Teensy 3 V1-V3
#pragma message "MatrixHardware: SmartMatrix Shield for Teensy 3 V1-V3"
^
AnimatedGifsNEW01:99: error: 'rgb24' does not name a type
const rgb24 COLOR_BLACK = {
^
AnimatedGifsNEW01:109: error: 'SM_PANELTYPE_HUB75_32ROW_MOD16SCAN' was not declared in this scope
const uint8_t kPanelType = SM_PANELTYPE_HUB75_32ROW_MOD16SCAN; // Choose the configuration that matches your panels. See more details in MatrixCommonHub75.h and the docs: https://github.com/pixelmatix/SmartMatrix/wiki
^
AnimatedGifsNEW01:110: error: 'SM_HUB75_OPTIONS_NONE' was not declared in this scope
const uint32_t kMatrixOptions = (SM_HUB75_OPTIONS_NONE); // see docs for options: https://github.com/pixelmatix/SmartMatrix/wiki
^
AnimatedGifsNEW01:111: error: 'SM_BACKGROUND_OPTIONS_NONE' was not declared in this scope
const uint8_t kBackgroundLayerOptions = (SM_BACKGROUND_OPTIONS_NONE);
^
AnimatedGifsNEW01:112: error: 'SM_SCROLLING_OPTIONS_NONE' was not declared in this scope
const uint8_t kScrollingLayerOptions = (SM_SCROLLING_OPTIONS_NONE);
^
AnimatedGifsNEW01:114: error: expected constructor, destructor, or type conversion before '(' token
SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
^
AnimatedGifsNEW01:115: error: expected constructor, destructor, or type conversion before '(' token
SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
^
AnimatedGifsNEW01:117: error: expected constructor, destructor, or type conversion before '(' token
SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kScrollingLayerOptions);
^
AnimatedGifsNEW01: In function 'void screenClearCallback()':
AnimatedGifsNEW01:147: error: 'backgroundLayer' was not declared in this scope
backgroundLayer.fillScreen({0,0,0});
^
AnimatedGifsNEW01: In function 'void updateScreenCallback()':
AnimatedGifsNEW01:153: error: 'backgroundLayer' was not declared in this scope
backgroundLayer.swapBuffers();
^
AnimatedGifsNEW01: In function 'void drawPixelCallback(int16_t, int16_t, uint8_t, uint8_t, uint8_t)':
AnimatedGifsNEW01:159: error: 'backgroundLayer' was not declared in this scope
backgroundLayer.drawPixel(x, y, {red, green, blue});
^
AnimatedGifsNEW01: In function 'void setup()':
AnimatedGifsNEW01:175: error: 'class GifDecoder<32, 32, 12>' has no member named 'setFileSizeCallback'
decoder.setFileSizeCallback(fileSizeCallback);
^
AnimatedGifsNEW01:188: error: 'matrix' was not declared in this scope
matrix.addLayer(&backgroundLayer);
^
AnimatedGifsNEW01:188: error: 'backgroundLayer' was not declared in this scope
matrix.addLayer(&backgroundLayer);
^
AnimatedGifsNEW01:190: error: 'scrollingLayer' was not declared in this scope
matrix.addLayer(&scrollingLayer);
^
AnimatedGifsNEW01:215: error: 'COLOR_BLACK' was not declared in this scope
backgroundLayer.fillScreen(COLOR_BLACK);
^
AnimatedGifsNEW01: In function 'void loop()':
AnimatedGifsNEW01:258: error: 'class GifDecoder<32, 32, 12>' has no member named 'getCycleNumber'
if((now - displayStartTime_millis) > (DISPLAY_TIME_SECONDS * 1000) || decoder.getCycleNumber() > NUMBER_FULL_CYCLES)
^
Multiple libraries were found for "SD.h"
Used: /Users/alfredolivas/Desktop/Desktop - Alfred’s iMac - 1/Arduino/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SD
Not used: /Users/alfredolivas/Desktop/Desktop - Alfred’s iMac - 1/Arduino/Arduino.app/Contents/Java/libraries/SD
'rgb24' does not name a type


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 
Unable to compile any sketches I've previously used. Filenamefunction.h seems to be one issue. Another is: RGB 24 does not name a type. Please keep in mind that I haven't changed anything since I last uploaded any sketch. What's changed. The latest GIFs player bombs while trying to compile. Any suggestions?
 
Again hard to give good input, for example again assuming you downloaded the right thing from the PJRC website for your iMac. there are two flavors, one for old OS that allows it to update Arduino installs, and other is all in one includes arduino release. As I understand it, needed to go this route due to how Apple changed how the security works...

I don't do much with MACs, have older one, which is reasonably up to date, the Teensyduino release should look something like:
Screen Shot 2022-02-09 at 5.26.16 AM.jpg

Note: the last board I programmed on the mac was a T4. For T3.2 you would obviously choose it under the tools->boards->Teensyduino

And again you should not do anything with the T4 security section:
screenshot.jpg

Unless you actually do wish to do so. That is generating a key, simply creates a key file that is saved in your sketches folder. If you do builds and have a key file there (and is t4.x?) the build process will create two files, the normal .hex file one setup for security .ehex... Now if you actually had a T4.x, then you could do the next step that tells a board more or less here is your encryption data, this can only be done once... There is also a verify sketch as well....

If your T4.x board is setup with a key associated with it and you upload a program, if the key matches the teensy will be updated using the .ehex... If you ran the last sketch on this board to Lock the board (AND your board supports LOCKING) this is the only way it can update.... If the board is NOT LOCKED, it will always fall back to using the normal .hex file if it does not like the .ehex...
So again nothing here impacts a T3.x board... And only impacts special T4.x boards, which you order specifically for this:
screenshot2.jpg



If yours does not look similar would recommend downloading it again...
 
Last edited:
Again hard to give good input, for example again assuming you downloaded the right thing from the PJRC website for your iMac. there are two flavors, one for old OS that allows it to update Arduino installs, and other is all in one includes arduino release. As I understand it, needed to go this route due to how Apple changed how the security works...

I don't do much with MACs, have older one, which is reasonably up to date, the Teensyduino release should look something like:
View attachment 27489

Note: the last board I programmed on the mac was a T4. For T3.2 you would obviously choose it under the tools->boards->Teensyduino

And again you should not do anything with the T4 security section:
View attachment 27490

Unless you actually do wish to do so. That is generating a key, simply creates a key file that is saved in your sketches folder. If you do builds and have a key file there (and is t4.x?) the build process will create two files, the normal .hex file one setup for security .ehex... Now if you actually had a T4.x, then you could do the next step that tells a board more or less here is your encryption data, this can only be done once... There is also a verify sketch as well....

If your T4.x board is setup with a key associated with it and you upload a program, if the key matches the teensy will be updated using the .ehex... If you ran the last sketch on this board to Lock the board (AND your board supports LOCKING) this is the only way it can update.... If the board is NOT LOCKED, it will always fall back to using the normal .hex file if it does not like the .ehex...
So again nothing here impacts a T3.x board... And only impacts special T4.x boards, which you order specifically for this:
View attachment 27491



If yours does not look similar would recommend downloading it again...

The downloaded copy looks the same and it almost compiles but is stuck at: Error compiling for board Teensy 3.2/3.1
 
Back
Top