Can anyone suggest how to set up a C cross compiler for the Pi Zero W, running on a Windows 11 PC?
The compiler creates an image which I can load onto the Pi Zero, but when run, it just throws "Segmentation fault".
The Raspberry Pi toolchain download page is a little confusing
Windows (mingw-w64-x86_64) hosted cross toolchains
AArch32 GNU/Linux target with hard float (arm-none-linux-gnueabihf)
There are two packages with the same name, but slightly different file sizes (I have tried both)
Even though I have selected AArch32bit, both package names still mention 64 bit:
arm-gnu-toolchain-15.2.rel1-mingw-w64-x86_64-arm-none-linux-gnueabihf
I have lost count of the different options I have tried, here is one of the attempts:
>arm-none-linux-gnueabihf-gcc hello.c -o hello -march=armv6zk -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -marm
I have tried two operating systems: Raspberry Pi OS Full (32 bit) and Raspberry Pi OS Lite (32 bit), but both throw the same Segmentation fault
The compiler creates an image which I can load onto the Pi Zero, but when run, it just throws "Segmentation fault".
The Raspberry Pi toolchain download page is a little confusing
Windows (mingw-w64-x86_64) hosted cross toolchains
AArch32 GNU/Linux target with hard float (arm-none-linux-gnueabihf)
There are two packages with the same name, but slightly different file sizes (I have tried both)
Even though I have selected AArch32bit, both package names still mention 64 bit:
arm-gnu-toolchain-15.2.rel1-mingw-w64-x86_64-arm-none-linux-gnueabihf
I have lost count of the different options I have tried, here is one of the attempts:
>arm-none-linux-gnueabihf-gcc hello.c -o hello -march=armv6zk -mfpu=vfp -mfloat-abi=hard -mtune=arm1176jzf-s -marm
I have tried two operating systems: Raspberry Pi OS Full (32 bit) and Raspberry Pi OS Lite (32 bit), but both throw the same Segmentation fault
Statistics: Posted by RatherBeSailing — Sat Dec 20, 2025 4:55 am — Replies 5 — Views 115