Using the __libc_init_array() in C

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

Using the __libc_init_array() in C

1,173 Views
andréluis
Contributor II

Hi, i'm working with a RT1060 and i compile a program using the 4diac with the runtime Forte. The question is the Forte need the __libc_init_array() to run. And need to run in freeRtos with Lwip because the architecture need to be in Freertos. But Lwip work with C. Can i use this function (__libc_init_array()) in C to run the Forte? 

0 Kudos
Reply
2 Replies

1,148 Views
andréluis
Contributor II

Hi Bio_TICFSL, how can i put this function before the main?

0 Kudos
Reply

1,153 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Yes you can use it but, This serves calling constructors and other library initialization which is necessary before calling main. There is a good description about this as well on :

https://stackoverflow.com/questions/15265295/understanding-the-libc-init-array

Regards

0 Kudos
Reply