Why are not all functions in syscalls.c/sysmem.c marked as weak?
Hello,
some functions like _read()/_write() are marked as weak, so they can be overriden by own implementations. But other functions, like _exit(), etc. are not marked as weak. Why is this the case?
I made a small experiment and changed some functions in syscalls.c, just to see what happens when re-generating the code from the CubeMX file. The changes are preserved, so the file is only generated once. So, doesn't this make the weak attribute of _read()/_write() useless? In fact, either all or none of the functions should be marked as weak. And the file should always be re-generated.
The same seems to be true for the linker script, it's not re-generated. However, re-generating it would destroy any changes made to the memory layout, etc. so it's obvious why it's not re-generated.
This is a bit confusing - what are the rules for (not) re-generating files?
Regards
