I am unable to use PlatformIO on the Freescale NXP FRDM-K64F, it is a supported board and I currently am unable to build the base file with the latest Platform IO build. I completely uninstalled and reinstalled all of the VSC, PlatformIO, and Python files. My only two extensions are PlatformIO and C/C++.
I’m trying an earlier version of PlatformIO, 2.4.2 and will post any updates.
cc1plus.exe is what takes up the memory and cpu, when I build the default project, it sits there compiling .pio\build\frdm_k64f\FrameworkMbedconnectivity for almost the entire time
I’m unable to get the ran out of memory error consistently, so I cannot get a specific project file. However I’ve disabled my antivirus and it still takes almost 12 minutes to build a fresh project made from the:
PIO Home-> New Project-> Board: FRDM-K64F Framework: Mbed
I’m still pretty new to this so I apologize if I’m not giving you what you need.
I switched to my other faster computer which has 8 logical processors. I ran pio run -j7 after cleaning and it still used 100% of all 8 processors. Additionally, it still took almost 6 minutes to build.
Is execution time and CPU usage similiar on a virtual machine running Linux? Would eliminate or point to Windows / installed Windows software being the problem.
If it’s the same, you’re most likely experiencing the (naturally long) compile times of mbed-os and compilers using all CPU they can get.
I would have to check on linux later. But I guess what I don’t understand is that it takes mere seconds to compile the same code or larger on mbed studio or MCUXpresso (NXP IDEs). Seems like more of an issue with VSC.
Clean builds on windows for basic blinky project:
Mbed studio- 2 minutes 50 seconds
MCUExpresso - 2 Seconds
PlatformIO - 6 minutes
Note: The example project I used in PIO was the mbed-rtos-blink-baremetal, which by default has build profiles for multiple boards. I removed the extra boards to reduce build time.
and no mbed_app.json for baremetal is 4m50s for me.
But one also has to take into accoutn that in mbed studio or elsewhere the default config is not “release” like in PlatformIO (-Os optimization) but debug with no optim (or -Og).
Adding build_type = debug to the platformio.ini and recompiling, the compilation time is however still 4m47s…
Adding the above mbed_app.json brings it in the release build down to 25 seconds and in the debug build to 26 seconds.