I got an embedded project for cortex-m0+ and I would like to link with newlib-nano library. I'm learning, how things work (that you need to implement stubs for certain functions etc.). I've managed to create a working example which builds.
Source code:
int main(void)
{
uint32_t i = 0;
printf("Hello Wordl!");
while (1)
{
i += 1;
}
}
I was curious, which functions get invoked, to peek behind the scene a bit so I made a dump of the final elf file and to my surprise, the code invokes "iprintf" instead of printf.
However, I failed to locate, where the iprintf get's mapped to printf. I would expect some macro in the headers or so, but I'm not able to locate it.
Could anyone explain what is happening or direct me, where to find this "mapping"?
Thx a lot