Hi there. How can one find out exactly what C function definitions are expected to be present when compiling for a bare-metal or RTOS environment? For instance, I know that one probably has to provide a definition of malloc and string.h functions, but is there a definitive list of required functions when not importing any libraries? And as for using the standard library, is it possible that a certain part of it requires some C symbol to be defined somewhere, but that one only needs to provide this C function if one is using that particular part of the library?
For context, I am trying to get a good enough understanding of Nim's compilation process and what C code it emits and expects, so that I might use Nim for a bare-metal OS project or to include some Nim in my existing C MCU project at work.
Thanks in advanced, Pete
You could look through this repo for a bare metal example: https://github.com/EmbeddedNim/picostdlib
Nim doesn’t really require too much, or generally require string.h or similar.
The main thing to worry about is memory allocation. See the Nim Compiler docs for setting that up: https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems