STMicroelectronics / gnu-tools-for-stm32

Other
15 stars 0 forks source link

Building in a Windows environment #1

Open davepregan opened 7 months ago

davepregan commented 7 months ago

I checked out this repo to a Windows 10 machine. I have ming-w64 installed. 'where gcc' returns C:\msys64\mingw64\bin\gcc.exe. I am interested in exploring arm-none-eabi-objcopy for converting an elf to 2 bin files - one each for internal/external flash and so would like to build this in debug to understand better.

I opened a mingw64 shell via c:\msys64\mingw64.exe and navigated to my checkout. I attempted to run build-prerequisites.sh. This failed very quickly and my shell exited. I relaunched the shell and then called bash. Ran the build script and it fails with this +++2024-01-05:11:53:13 (/e/Various_Backups/gcc-arm-src/gnu-tools-for-stm32/build-common.sh:316): host_arch=x86_64 +++2024-01-05:11:53:13 (/e/Various_Backups/gcc-arm-src/gnu-tools-for-stm32/build-common.sh:317): '[' xMinGw64_nT-10.0-18363 == xlinux ']' +++2024-01-05:11:53:13 (/e/Various_Backups/gcc-arm-src/gnu-tools-for-stm32/build-common.sh:326): '[' xMinGw64_nT-10.0-18363 == xdarwin ']' +++2024-01-05:11:53:13 (/e/Various_Backups/gcc-arm-src/gnu-tools-for-stm32/build-common.sh:340): error 'Unsupported build system : MinGw64_nT-10.0-18363' +++2024-01-05:11:53:13 (/e/Various_Backups/gcc-arm-src/gnu-tools-for-stm32/build-common.sh:29): error(): set +u +++2024-01-05:11:53:13 (/e/Various_Backups/gcc-arm-src/gnu-tools-for-stm32/build-common.sh:30): error(): echo 'bash: error: Unsupported build system : MinGw64_nT-10.0-18363' bash: error: Unsupported build system : MinGw64_nT-10.0-18363 + How do I build this for Windows? Do I need to be in a Linux virtual machine or something like that? (never used one!!)

tartunian-apple commented 6 months ago

Looks like around line 315 is where the supported platforms are defined. You might be able to build for MinGw by adding your own section in there.

https://github.com/STMicroelectronics/gnu-tools-for-stm32/blob/e9fbe126bc13bc0ce594b73b85564f10b3bfdb56/build-common.sh#L315