I’m using Platformio in VSCode for programming Adafruit Feather M0 (Arduino SAMD platform).
Each time I type in a source file, it takes roughly 20 seconds for the indexer to complete. During this time one CPU core is fully loaded. This is unpleasant and it wastes battery life if I use the notebook unplugged.
I have traced down the problem to mainly due to the include path
within the auto-generated c_cpp_properties.json file. This directory contains a bunch of sub-directories for each SAM & SAMD variant. For my board only SAMD21 is relevant. Thus if I append the path to
the indexing time reduces to 2-3 seconds, without loss of functionality.
Unfortunately my change is overwritten each time I restart VSCode.
Please check if you can generate the include path including the architecture sub-directory. Would be great.