I tried this but it still used simple gcc instead of arm-none-eabi-gcc
https://nim-lang.org/docs/nimc.html
Another way is to make Nim invoke a cross compiler toolchain: nim c --cpu:arm --os:linux myproject.nim For cross compilation, the compiler invokes a C compiler named like $cpu.$os.$cc (for example arm.linux.gcc) and the configuration system is used to provide meaningful defaults. For example for ARM your configuration file should contain something like: arm.linux.gcc.path = "/usr/bin" arm.linux.gcc.exe = "arm-linux-gcc" arm.linux.gcc.linkerexe = "arm-linux-gcc"
you can just do:
gcc.path = "/usr/bin"
gcc.exe = "arm-linux-gcc"
gcc.linkerexe = "arm-linux-gcc"
but it's less flexible.