You need to set the MSYS2 path before windows\system32 because it has to replace some Windows utilities
Possibly, but you should be launching via msys2.exe which takes care of all that.
But indeed if you're cross-compiling anyway and have Windows 10 it would be crazy not to use WSL. Don't get me wrong, I've used Cygwin and msys2 for years but that's really only because a) they have an ssh command and b) it's way more convenient than having to reboot into unix
Anyway: I cannot reproduce the OP's issue. There are other problems though but that might be my mistake, but I can get a binary built. I started from an existing msys2 installation (note the '2', there's also plain msys but that is not what you want) so don't have exact steps for all installed packages but it should be something like:
Code: Select all
pacman -S make python3 git mingw-w64-x86_64-gcc
git clone
cd micropython
git -C mpy-cross STRIP=echo SIZE=echo
The last step effectively skips the strip/size steps, because otherwise the build fails because makefile looks for mpy-cross but the output is mpy-cross.exe. This is a known problem.
Then download arm gcc zip file from
https://developer.arm.com/tools-and-sof ... /downloads, unpack it to msys2 root, make the msys2 environment aware of it:
Code: Select all
export CFLAGS="-I/gcc-arm-none-eabi/include"
export LDFLAGS="-L/gcc-arm-none-eabi/lib -mthreads"
export PATH="/gcc-arm-none-eabi/bin:$PATH"
(not 100% sure if this is the best 'msys2 way' but it works) then build
Code: Select all
cd ports/stm32
make BOARD=PYBV11 CROSS_COMPILE=arm-none-eabi-
This creates build-PYBV11/firmware.elf without problems.
No mention of any of the errors you have though, so more information is needed. E.g. this doesn't even build anything lwip related, so without knowing exact build modifications it's hard to figure out what goes wrong.