newlib missing C library functions

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

newlib missing C library functions

650件の閲覧回数
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 件の賞賛
1 返信

533件の閲覧回数
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 件の賞賛