I am trying to compile a midi controller type program for the teensy using platformio. I was able to do this with the arduino IDE and get it uploaded without issues. I have never used platformio before so I thought I would try it. I am using the platformio plugin with clion.
I’ve looked at the compilation process and it seems PlatformIO includes some wrong libraries. MIDIUSB e.g. is recognized as some Arduino library written for AVR and SAM(D) processors and not the one in the core directory.
To correct that, add the line
lib_ignore = MIDIUSB, Audio
to the platformio.ini and retry.
EDIT: Also, the project should be cleaned to remove old build artifacts and libraries, e.g. using pio run -t clean or “Clean” in VSCode.
For that path is .pio\build\teensy2pp\libe68\SoftwareSerial\SoftwareSerial.cpp.o. Maybe again a different library is used (based on my 0xe68 and your 0xe99). Do you have maybe have a Arduino-AVR version of SoftwareSerial globally installed in ~/.platformio/lib? If yes, delete it.
Compilation goes through for me.
Checking size .pio\build\teensy2pp\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 10.2% (used 837 bytes from 8192 bytes)
Flash: [= ] 9.5% (used 12350 bytes from 130048 bytes)
====================== [SUCCESS] Took 5.55 seconds =============
adding the line platform_packages = toolchain-atmelavr@https://bintray.com/platformio/tool-packages/download_file?file_path=cc65b2c-toolchain-atmelavr-linux_x86_64-1.70300.191015.tar.gz to the platformio.ini to force usage of a 7.3.0 GCC instead of the 5.4.0, if the compiler is really at fault here (but somehow not on my system)