Having ptr or pointer would disable GC for that object alone. There are also GC_ref and GC_unref to fine control whether it will be ready to collected or not. Both procs especially useful when importing cstring from C lib.
This documentation should be helpful for GC tuning, https://nim-lang.org/docs/gc.html
r3, regarding microcontrollers without operating system you may follow this thread carefully:
https://forum.nim-lang.org/t/3803
As you may know, when we program tiny controllers like 8 bit AVR in C or C++ we generally avoid library stuff like printf, malloc() or C++ >> << in out operations. So we would avoid that in Nim also.
Current Nim stdlib uses GC, for example for strings and seq. So we may not use that, at least not when we need GC to free the objects.
Note that for later Nim versions it is intended to have a stdlib which works without GC fine, so that restrictions will relax.
So let us just try it, Nim should be a really nice language for embedded devices.
https://gitlab.com/jalexander8717/msp430f5510-nim
I'm working on it right now on an msp430. It's not far along yet. I have more progress but need to commit it during lunch today.
I am brand new at Nim, but see potential. Mostly the toolchain and type issues with templates were tripping me up.
I haven't gotten that far yet. I'm currently checking that pure Nim compiles to something that makes sense, especially register accesses and interrupt vectors.
I'll be testing that stuff out soon though.