Micropython rp2 fails to build on windows systems.
When attempting to build micropython for rp2040 in a windows environment, the make/cmake environment generates a command line that exceeds the windows10/cmd.exe line length limit of 8191 characters.
This is because the RP2 SDK requires about 3k worth of C include paths, and the list of files compiled that is generated on a single command line is about 6k (depending on exact path names.)
Extensive discussion and whining here: https://www.raspberrypi.org/forums/viewtopic.php?f=144&t=306333
I'll add that compiling all the C files for micropython with a single command line seems ... dangerously likely not to scale well on other build platforms as well.
Fix for windows console 8192 characters limitation stm32 build
This PR provides a fix for building STM32 ports on Windows using mingw.
The problem:
- Windows Console has a 8192 character limit, which has broken the build process by causing truncation of commands
- The linker command as well as the makemoduledefs commmand can exceed this limit
- See issue: issue 7687 and issue 7012
The solution
- Storing the collection of files to be passed to linker and makemodulesfs in objs files in the build directory
- See related Circuit-Python commit