newlib missing C library functions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

newlib missing C library functions

620 Views
gary_metalle
Contributor III

Hi

I'm using newlib with an imxrt1050.

The SDK provides various different flavours of newlib (nano, semihost etc) for the platform I am using but it has missing standard 'C' functions such as time and clock. There's also a random number generator hardware on-chip and I would have expected this to have been hooked into std:random_device. There are probably lots of other examples of missing hooks that I would have expected to have been supported in this library for SOC?

Maybe there's a list somewhere of the functions that are supported or even a document explaining how to properly get these hooks? I have actually wrapped the time function and called the appropriate board function to read the RTC, so it is possible. 

0 Kudos
1 Reply

503 Views
danielholala
Senior Contributor II

Hi Gary,

the documentation on newlib that I use is the documentation included in MCUExpesso IDE (Menu Help  > Help contents and then in the left pane Tools > Newlib > Newlib C Library).

I'm afraid that you'll have to peruse the documentation of each 'C' function you plan to use and check whether it requires additional supporting subroutines, e.g. for time():

Capture newlib time.PNG

Regarding time(), also see this old discussion here: time () does nothing 

0 Kudos