I’m using PlatformIO in VS-Code to compile an esp32 project on windows 10. It’s a large(ish) source base with ~150 source files.
I’m now hitting a “command line too long” error in the link phase. The linker (xtensa-esp32-elf-g++) is being invoked with a list of .o files that is just under 8K so it’s likely that the 8192 character restriction on the cmd.exe shell is being hit.
I’ve tried setting the “Use legacy console” option OFF for the default cmd.exe invocation (in Windows properties) but this hasn’t fixed it.
Is there a way to either…
- Force use of another shell (e.g. powershell)
- Invoke the linker using a list of object files/parameters from a file. (There’s nothing in the help output that suggests this is possible but perhaps it is undocumented?)
Alternatively is there a way to workaround this through some magic platformio configuration? If necessary I’ll go spelunking through cmake files but was hoping there might be an easy fix for this. (Obvious workaround is to shorten the path names for all the source files but that’s a bit tedious…)
Thanks in advance…