cancel
Showing results for 
Search instead for 
Did you mean: 

About Viewing source code of libraries used

SSrid.1
Associate

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.

3 REPLIES 3
Pavel A.
Evangelist III

> For some reason fopen() function is returning NULL pointer

What else do you expect? What is the filename that you open?

It should return anything other than NULL if it is ok.

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?