Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 15 of 15

Thread: PlatformIO Config Options

  1. #1
    Senior Member
    Join Date
    Dec 2015
    Posts
    167

    PlatformIO Config Options

    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!

  2. #2
    Junior Member
    Join Date
    Aug 2018
    Posts
    6
    https://docs.platformio.org/en/lates...ms/teensy.html

    I struggled with this for a while as well. The link above shows how to add options to the platformio.ini config file. Hope it helps!

  3. #3
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    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/boa.../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.

  4. #4
    Senior Member
    Join Date
    Aug 2017
    Posts
    309
    Quote Originally Posted by jishnuch View Post
    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/boa.../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.

  5. #5
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    Quote Originally Posted by wwatson View Post
    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/boa.../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

  6. #6
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    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

  7. #7
    Member
    Join Date
    Apr 2020
    Location
    Germany, NRW
    Posts
    86
    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

  8. #8
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    Quote Originally Posted by mstiller View Post
    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.

  9. #9
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    132
    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

  10. #10
    Senior Member
    Join Date
    Dec 2015
    Posts
    167
    @speed12 Ah thank you very much, that does help!!!

  11. #11
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    Quote Originally Posted by houtson View Post
    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/boa.../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

  12. #12
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    Quote Originally Posted by jkoffman View Post
    @speed12 Ah thank you very much, that does help!!!

    has your problem solved...if yes... can you please share...

  13. #13
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    132
    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

  14. #14
    Junior Member
    Join Date
    Aug 2020
    Posts
    12
    Quote Originally Posted by houtson View Post
    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

  15. #15
    Senior Member
    Join Date
    Dec 2015
    Posts
    167
    Quote Originally Posted by jishnuch View Post
    has your problem solved...if yes... can you please share...
    My issue was just that I was looking for documentation. speed12 pointed me the right way, so my current issue is solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •