Using Teensy 4.1 on Platform IO, getting "Warning: Serial8 is not declared"

Hello,

Using Teensy 4.1 on Platform IO, getting "Warning: Serial8 is not declared"

Serial7 works, but Teensy4.0 also has Serial7.

Is this a PlatformIO problem, or a Library problem?

"packages/framework-arduinoteensy@1.155.0/cores/teensy4/HardwareSerial.h" has "extern HardwareSerial Serial8;"

Using the Arduino IDE I do not have this problem.

Kind regards,

Mtjs.
 
Is this a PlatformIO problem
....
Using the Arduino IDE I do not have this problem.

Since it works in Arduino, sure looks like a PlatformIO issue.

As a quick double check, tried it here. Code verifies without error.

screenshot.png
 
Hello Paul,

Thank you for testing, I wanted to be sure it was a PlatformIO problem, not something I forgot to add to my code.

Kind regards,

Mtjs.
 
FWIW though, I am using PlatformIO in VSCode on Windows 10 with a T4.1, and have been using Serial8 without any warnings or errors in compilation through several versions of the Teensy framework and tools, up until the current 1.155.0. That's an oddity.

Do you have board = teensy41 in the [env] section of the projects platformIO.ini? If I change that to teensy40 and compile, I get "error: 'Serial8' was not declared in this scope"
 
Hello Beermat,

I had set board = teensy41 in all projects except the one where I wanted to use Serial8. Thank you :D

Kind regards,

Mtjs.
 
Back
Top