is printf from newlib?

mathildawyx
Posts: 7
Joined: Wed May 13, 2020 7:05 am

is printf from newlib?

Postby mathildawyx » Thu Sep 02, 2021 9:01 am

Is it from the newlib, because I can't find the detailed function body?
I'v search the code and forum but have not get the conclusion.
sorry I don't know much about newlib, i'm learning :)

ESP_Sprite
Posts: 5160
Joined: Thu Nov 26, 2015 4:08 am

Re: is printf from newlib?

Postby ESP_Sprite » Fri Sep 03, 2021 2:00 am

Yes, it is. Our newlib is partially in ROM and partially in a binary library in ESP-IDF, but we publish the sources on Github.

mathildawyx
Posts: 7
Joined: Wed May 13, 2020 7:05 am

Re: is printf from newlib?

Postby mathildawyx » Mon Sep 06, 2021 12:14 am

Thanks!

mathildawyx
Posts: 7
Joined: Wed May 13, 2020 7:05 am

Re: is printf from newlib?

Postby mathildawyx » Mon Sep 06, 2021 3:26 am

I‘m sorry it's a little hard for me..
Is there any protection to prevent two core printting log at the same time to prevent disorder log,or do you suggest to use ESP_LOGI/ESP_LOGW...? Thanks

ESP_Sprite
Posts: 5160
Joined: Thu Nov 26, 2015 4:08 am

Re: is printf from newlib?

Postby ESP_Sprite » Tue Sep 07, 2021 1:20 am

Yes, there should be. You can also use the ESP_LOG* calls, they can be more handy if you want to use different log levels.

mathildawyx
Posts: 7
Joined: Wed May 13, 2020 7:05 am

Re: is printf from newlib?

Postby mathildawyx » Tue Sep 07, 2021 11:44 am

sorry i'm feeling a little confused.. there should be means there is or there isnot..

mathildawyx
Posts: 7
Joined: Wed May 13, 2020 7:05 am

Re: is printf from newlib?

Postby mathildawyx » Tue Sep 07, 2021 11:45 am

thank you for your answer by the way

mathildawyx
Posts: 7
Joined: Wed May 13, 2020 7:05 am

Re: is printf from newlib?

Postby mathildawyx » Sun Sep 12, 2021 6:49 am

I check the source code you provide, it seems no protect in printf when it comes to 2 cores printing at the same time? Am I missing something? Thanks

ESP_Sprite
Posts: 5160
Joined: Thu Nov 26, 2015 4:08 am

Re: is printf from newlib?

Postby ESP_Sprite » Sun Sep 12, 2021 11:45 am

Sorry, I'm decently sure printf has locks somewhere in the pipeline, but I can't tell you for sure where...

WiFive
Posts: 3327
Joined: Tue Dec 01, 2015 7:35 am

Re: is printf from newlib?

Postby WiFive » Sun Sep 12, 2021 7:46 pm


Who is online

Users browsing this forum: JialiangWang, stevem and 41 guests