Avr-g++: error: CreateProcess: No such file or directory

I think the source of the error is different than the one in the original question, but I could reproduce it. Compilation also fails for me when compiling the example.

This is due to PIO generating a longcmd for GCC with the list of includes for compilation. This file is close to 32kB, and together with the command line argument, exceeds 32kB. And Window’s CreateProcess() can’t handle that when it’s invoked with such large arguments.

Refer ARM mbed: Compilation of project with long file paths not possible · Issue #2877 · platformio/platformio-core · GitHub. I’ll update the issue there.

The only known workaround as of this time should be to use Linux instead, bypassing Windows’ restrictions there.

2 Likes