PlatformIO Config Options

Status
Not open for further replies.

jkoffman

Well-known member
Hi all,

I'm starting to play around with PlatformIO, and one thing I haven't found yet are the list of specific Teensy related platformio.ini options. For instance, I have been using USB Audio a bunch recently, I haven't figured out how to enable that in PlatformIO.

Any pointers would be appreciated!

Thank you!
 
Hello... have anyone could successfully compiled and uploaded on Teensy 4.1 using Platform IO.

//------------------------------------------------------------------------------------------------------------------------------------
below is platform.ini
[env:teensy41]
platform = teensy
board = teensy41

; change microcontroller
board_build.mcu = imxrt1062

; change MCU frequency
board_build.f_cpu = 600000000L

framework = arduino

upload_protocol = teensy-gui
//--------------------------------------------------------------------------------------------------------
error during building process...

> Executing task: platformio run <

Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy 4.11.0 > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy 1.153.0 (1.53)
- toolchain-gccarmnoneeabi 1.50401.0 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 89 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/teensy41/src/main.cpp.o
Compiling .pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o
Compiling .pio/build/teensy41/FrameworkArduino/Blink.cc.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from src/main.cpp:1:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/src/main.cpp.o] Error 1
Compiling .pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/AudioStream.cpp:32:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Blink.cc:3:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/Blink.cc.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/EventResponder.cpp:34:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o] Error 1
================================================================================= [FAILED] Took 3.17 seconds =================================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.


can anyone please help to resolve the above problem.

Thanks in advance.
 
Hello... have anyone could successfully compiled and uploaded on Teensy 4.1 using Platform IO.

//------------------------------------------------------------------------------------------------------------------------------------
below is platform.ini
[env:teensy41]
platform = teensy
board = teensy41

; change microcontroller
board_build.mcu = imxrt1062

; change MCU frequency
board_build.f_cpu = 600000000L

framework = arduino

upload_protocol = teensy-gui
//--------------------------------------------------------------------------------------------------------
error during building process...

> Executing task: platformio run <

Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy 4.11.0 > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy 1.153.0 (1.53)
- toolchain-gccarmnoneeabi 1.50401.0 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 89 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/teensy41/src/main.cpp.o
Compiling .pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o
Compiling .pio/build/teensy41/FrameworkArduino/Blink.cc.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from src/main.cpp:1:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/src/main.cpp.o] Error 1
Compiling .pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/AudioStream.cpp:32:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Blink.cc:3:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/Blink.cc.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/EventResponder.cpp:34:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o] Error 1
================================================================================= [FAILED] Took 3.17 seconds =================================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.


can anyone please help to resolve the above problem.

Thanks in advance.

If you look at the line that says fatal error: you are missing the f
oward slash between "c++" and "config.h". The compiler thinks "c++config.h" if a filename.
 
If you look at the line that says fatal error: you are missing the f
oward slash between "c++" and "config.h". The compiler thinks "c++config.h" if a filename.

It didn't work....

> Executing task: platformio run <

Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy 4.11.0 > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy 1.153.0 (1.53)
- toolchain-gccarmnoneeabi 1.50401.0 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 89 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/teensy41/src/main.cpp.o
Compiling .pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o
Compiling .pio/build/teensy41/FrameworkArduino/Blink.cc.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from src/main.cpp:1:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:39:29: fatal error: bits/c++/config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/src/main.cpp.o] Error 1
Compiling .pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/AudioStream.cpp:32:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:39:29: fatal error: bits/c++/config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/AudioStream.cpp.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Blink.cc:3:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:39:29: fatal error: bits/c++/config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/Blink.cc.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/EventResponder.cpp:34:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:39:29: fatal error: bits/c++/config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy41/FrameworkArduino/EventResponder.cpp.o] Error 1
================================================================================= [FAILED] Took 3.25 seconds =================================================================================
The terminal process terminated with exit code: 1
 
another useful informations...

pi@raspberrypi:~/Documents/PlatformIO/Projects/blinka $ platformio update
Updating contrib-piohome @ 3.2.3 [Up-to-date]
Updating contrib-pysite @ 2.37.191020 [Up-to-date]
Updating tool-unity @ 1.20500.200612 [Up-to-date]
Updating tool-scons @ 3.30102.0 [Up-to-date]

Platform Manager
================
Platform Teensy
--------
Updating teensy @ 4.11.0 [Up-to-date]
Updating toolchain-atmelavr @ 1.50400.190710 [Up-to-date]
Updating toolchain-gccarmnoneeabi @ 1.50401.0 [Up-to-date]
Updating framework-arduinoteensy @ 1.153.0 [Up-to-date]


Library Manager
===============
Library Storage: /home/pi/.platformio/lib
 
I use platform.io all the time. Usually the platformio.ini file which gets generated is ok, it would look like this:

Code:
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
 
I use platform.io all the time. Usually the platformio.ini file which gets generated is ok, it would look like this:

Code:
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino

Mine platformio.ini file also looks same like yours. But while building it says that bits/c++config.h: No such file or directory.....

Hence the code not getting compiled.
 
hi jishnuch

compiling for 4.1 works fine for me with the standard ini file like above.

i'm using: Teensy 4.11.0 on a mac with macOS10.15.

If you change the env to Teensy 4.0 does that compile ok?

Cheers Paul
 
hi jishnuch

compiling for 4.1 works fine for me with the standard ini file like above.

i'm using: Teensy 4.11.0 on a mac with macOS10.15.

If you change the env to Teensy 4.0 does that compile ok?

Cheers Paul

Hi Paul...as advised changed the platform env to Teensy 4.0... still not yet compiling...

Processing teensy40 (platform: teensy; board: teensy40; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy40.html
PLATFORM: Teensy 4.11.0 > Teensy 4.0
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 1.94MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy 1.153.0 (1.53)
- toolchain-gccarmnoneeabi 1.50401.0 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 89 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/teensy40/src/main.cpp.o
Compiling .pio/build/teensy40/FrameworkArduino/AudioStream.cpp.o
Compiling .pio/build/teensy40/FrameworkArduino/Blink.cc.o
Compiling .pio/build/teensy40/FrameworkArduino/DMAChannel.cpp.o
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from src/main.cpp:1:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Blink.cc:3:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy40/FrameworkArduino/Blink.cc.o] Error 1
In file included from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:45:0,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:45,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
from /home/pi/.platformio/packages/framework-arduinoteensy/cores/teensy4/AudioStream.cpp:32:
/home/pi/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
*** [.pio/build/teensy40/src/main.cpp.o] Error 1
*** [.pio/build/teensy40/FrameworkArduino/AudioStream.cpp.o] Error 1
================================================================================= [FAILED] Took 4.07 seconds =================================================================================
The terminal process terminated with exit code: 1
 
hi jishnuch

It looks as thought you are running PlatformIO on a Raspberry Pi - I'm afraid I have no experience of that.

From your error messages the compiler is looking for the "bits/c++config.h" file and not finding it, this might be something to do with your installation. It doesn't look like anything Teensy specific - are you able to compile anything?

Have you posted on the PlatformIO support boards? If not suggest you try that.

Cheers, Paul
 
hi jishnuch

It looks as thought you are running PlatformIO on a Raspberry Pi - I'm afraid I have no experience of that.

From your error messages the compiler is looking for the "bits/c++config.h" file and not finding it, this might be something to do with your installation. It doesn't look like anything Teensy specific - are you able to compile anything?

Have you posted on the PlatformIO support boards? If not suggest you try that.

Cheers, Paul

Hi Paul.... You are right...that my platform io is running on Raspberry Pi 4. Whether it's teensy 4 or 4.1 .... nothing is compiling. I uninstalled platformio and freshly reinstalled again in VS code. Still the problem remains. Arduino boards are working fine.

Thanks for the platformio forum link. Let's hope that they can help in this matter.

Regards,

Jishnu
 
Status
Not open for further replies.
Back
Top