I want to write code for Flipper Zero. They write code in C Is it possible to write all the code in nim and then get C output and compile it with their tools?
Or maybe you can show me articles or tutorial how to integrate nim with external C tools ?
Ratel's a good place to look. Really it's pretty simple, largely just using nim c --noCompile --nimcache:someNimcacheFolder/. Then you can compile all the C code.
Though usually you need to find and copy nimbase.h into the folder as well. That's a bit annoying, but here's my (hacky) solution to get the path in a Nimble task: https://github.com/elcritch/nesper/blob/6ee73cdec794b8163cb90970a16290848cdc8519/src/nesper/build_utils/tasks.nim#L175