2021-10-26 7:42 AM
I am using STM32L4 series microcontroller. I am debugging some code which uses standard C lib function fopen() and fread(). The code can be compiled and has no errors. For some reason fopen() function is returning NULL pointer when used. I wanted to check where is the problem.
Hence I would like to see he source code of stdio lib functions. I can see assembly code but not C code. Help me to view source code of C lib functions.
2021-10-26 8:59 AM
> For some reason fopen() function is returning NULL pointer
What else do you expect? What is the filename that you open?
2021-10-27 4:46 AM
It should return anything other than NULL if it is ok.
2021-10-28 6:29 AM
So fopen tells you something is not OK. Maybe it does not find any files on the barebone STM32?
Do you use CubeIDE or some other IDE which has semihosting?
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.