Recompiles mbed every time

When I use use build/upload the Pio rebuild mbed source files every time and takes lot of time. Is there a option to make Pio to reuse object files and only compile source files that has been modified?

I’ve investigating the problem, and it seems it occurs when intellisense get stuck. This is an issue with the cpptools plugin ( intellisense updating forever issue has resurfaced. (red flame) · Issue #1474 · microsoft/vscode-cpptools · GitHub ).

When the the intellisense is stuck the indent / formatting is also not working.

Restarting vs-code does sometime fix the problem for a time until it get stuck again.

PlatformIO Core rebuilds project in these cases:

  1. If PIO Core version is changed
  2. If file structure has been changed in src or lib folder.
  3. If platformio.ini file has been changed.
1 Like

This happens to me seemingly every time. I’m using Atom. If I try to deploy it builds. If the deployment to the arduino fails (I have Cura connected), I’ll close Cura and hit deploy again. Rebuild! At least the build is quick, but it re-links, which is crazy slow for Marlin.

How did you fix the problem?