Passing **-c** to the nim compiler will force nim to only output the C files and not try to compile them. It places resulting c files in a directory called "nimcache", inside your project directory by default.
This has been talked about several places, though it's not as prominent as it could be in the docs. **\--os:standalone** may also be useful for the code that runs on the micro controller. @see: [https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems](https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems) That Nim Compiler guide is probably going to be very useful to you in general: [https://nim-lang.org/docs/nimc.html](https://nim-lang.org/docs/nimc.html)