Teensysuino examples won't compile

Status
Not open for further replies.

aaaxon

Active member
I'm having trouble compiling examples for the Teensy 4 using Arduino 1.8.10/Teensyduino 1.48.beta 1.

None of the sketches in the Entropy folder compile. The error print for Generate_Random_Bytes is listed below. Could someone provide some guidance on what to do next?

Thanks,
Michael

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp: In member function 'void EntropyClass::Initialize()':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:67:3: error: 'SIM_SCGC5' was not declared in this scope

SIM_SCGC5 |= SIM_SCGC5_LPTIMER;

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:67:16: error: 'SIM_SCGC5_LPTIMER' was not declared in this scope

SIM_SCGC5 |= SIM_SCGC5_LPTIMER;

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:68:3: error: 'LPTMR0_CSR' was not declared in this scope

LPTMR0_CSR = 0b10000100;

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:69:3: error: 'LPTMR0_PSR' was not declared in this scope

LPTMR0_PSR = 0b00000101; // PCS=01 : 1 kHz clock

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:70:3: error: 'LPTMR0_CMR' was not declared in this scope

LPTMR0_CMR = 0x0006; // smaller number = faster random numbers...

^

In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/core_pins.h:32:0,

from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/wiring.h:38,

from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/WProgram.h:45,

from C:\Users\mob\AppData\Local\Temp\arduino_build_442385\pch\Arduino.h:6:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:72:19: error: 'IRQ_LPTMR' was not declared in this scope

NVIC_ENABLE_IRQ(IRQ_LPTMR);

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/imxrt.h:8296:52: note: in definition of macro 'NVIC_ENABLE_IRQ'

#define NVIC_ENABLE_IRQ(n) (*(&NVIC_ISER0 + ((n) >> 5)) = (1 << ((n) & 31)))

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp: In function 'void lptmr_isr()':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Entropy\Entropy.cpp:326:3: error: 'LPTMR0_CSR' was not declared in this scope

LPTMR0_CSR = 0b10000100;

^

Multiple libraries were found for "Entropy.h"
Used: C:\Program
Error compiling for board Teensy 4.0.
 
Those sketches have likely not been updated for Teensy 4 hardware registers. Have to check the Beta Teensy 4 thread to see if there is a note
 
Thanks. I wasn't sure whether it was a problem on my end on with the Example sketches.

There's a note from Paul in the Teensy 4 First Beta Test thread at 12-29-2018, 10:26 AM, #83. I don't know how to link to a message properly here.

Best regards,
Michael
 
Thanks. I wasn't sure whether it was a problem on my end on with the Example sketches.

There's a note from Paul in the Teensy 4 First Beta Test thread at 12-29-2018, 10:26 AM, #83. I don't know how to link to a message properly here.

Best regards,
Michael

Yes, there it is - it has a link to TRNG :: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=195000&viewfull=1#post195000

To link to a specific post - right click on the post # - in this case post #4 - then 'Copy Link' or whatever your browser calls it to get :: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=193717&viewfull=1#post193717


Then paste a link with Ctrl+L :: forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=193717
 
Status
Not open for further replies.
Back
Top