I have a Paralella board, which is basically an ARM machine running Ubuntu plus a separate 16 core Epiphany chip, so in essence two platforms, both programmable in C. To run code on the Epiphany cores you write this code in C and compile it with a special GCC-derived compiler. Additionally you have to write the main controlling code for the ARM host, which is compiled with standard GCC for ARM. I managed to compile and test Nim on the ARM host, so I should be able to write the controlling code in Nim and compile it with Nim to working object code. The part I am not sure about is using Nim to program for the Epiphany chip, as this requires using the special C compiler. It would be nice if I could somehow tell the Nim compiler to use this special 'e-gcc' compiler when compiling C sources for the Epiphany chip. So, have Nim generate the C sources, but then having e-gcc do the next step. Assuming the Nim cannot be configured to do that, my question is: is there a way to tell the Nim compiler to only perform the first compilation step (Nim to C) and skip the second step?
Rudi
Hi,
There are a few options.
nim c -c test.nim
This will create a nimcache directory containing your C source.
There are quite a lot of options that can be passed to the compiler to change the behaviour: https://nim-lang.org/docs/nimc.html