Compiling arcade bootloaders using Raspberry Pi 4

I wonder if there’s anyone who has successfully compiled arcade bootloaders for N4, STM32F4, or SAMD51 using Raspberry Pi 4. Is it possible to compile the source for an arcade hardware using Raspberry Pi OS or Ubuntu on RPI 4?