Auto-generated files - how to override content?

I am new to platformio, so my questions may sound naive.

I would like to modify the build commands and options in compiler and linker, in particular, the location of the toolchain, the options and location of the include libraries, etc… I tried to glean through documentation but it was still unclear to me how to do it. The documentation says “It simply works”, but it yet does not work for me and I cannot find documentation about its inner works.

Finally, i found the files in .vscode folder (c_cpp_properties.json, extensions.json and launch.json). These apparently have all the settings I would like to access, but they say:

// PLEASE DO NOT MODIFY IT AND USE “platformio.ini”:

Could anyone explain which component(s) automatically generate them and how to modify their contents reliably from platformio.ini? Where do they come/filled originally?
For instance, the compilerPath, compilerArgs, defines entries do not have direct match to platformio.ini keywords. How to explicitly change them?
Maybe a pointer to a good document would help…

I know about platformio.ini. However, how to override compiler/tool paths? They are in auto-generated files and not in any examples… The reason: I have a freeRTOS examples which successfully compile in platformio and independently with external tools. The externally generated binary works fine, the platformio-generated binary does not work at all, and there is no way to find out why - just wanted to replace environment and tools to see where the problem is.

Answered in How to use independently loaded and installed ARM compiler in PlatformIO? - #4 by maxgerhardt with regards to platform_packages already.