Live data from Hacker News

Picolibc: C library designed for embedded 32- and 64- bit systems

github.com

21–26 of 26 posts

Re: Picolibc: C library designed for embedded 32- and 64- bit systems

#22
post #6

What's the rationale for this project? In other words, what makes it different than other embedded libc projects like Newlib or uClibc-ng or musl? Not seeing any documentation which answers this question.

It's for baremetal, and works on much smaller microcontrollers. It also seems to carry its own processor init code which other libc doesn't carry.

Re: Picolibc: C library designed for embedded 32- and 64- bit systems

#23

Embedded 64-Bit.. Wow, What case scenario would use this over an OS ?

Your guess is as good as mine. I assume it makes sense for running the test suite quickly before running it slowly, and for use with 64-bit baremetal raspberry pi, Atom, and their ilk.

Re: Picolibc: C library designed for embedded 32- and 64- bit systems

#24

Embedded 64-Bit.. Wow, What case scenario would use this over an OS ?

Some of the author's blog posts may answer that:

https://keithp.com/blogs/embedded-arm-libc/ https://keithp.com/blogs/picolibc/ https://keithp.com/blogs/tags/picolibc/

IIRC they do a lot of stuff with amateur rocketry, so it might related to that.

Re: Picolibc: C library designed for embedded 32- and 64- bit systems

#25

Libc is an antipattern (me saying it makes it so, like a best practice) that has its own state, it should largely be avoided for everything, but most of all embedded applications.

It's easy to avoid the functions with global state and Newlib can be built to minimize or eliminate their RAM consumption.

Is there a list of functions for newlib?

Re: Picolibc: C library designed for embedded 32- and 64- bit systems

#26

Embedded 64-Bit.. Wow, What case scenario would use this over an OS ?

Only in a very special cases.

I'm writing embedded bare-metal 64-bit arm code at work right now. That is because the product needs less than 300ms boot times from power on and needs to be fast enough to do image compression (AVIF) in a reasonable time. Just using Linux and suspend would eat too much battery from the power budget. It has to have 1 year of battery life like previous generation of that same product.

i.MX RT1170 with its 1Ghz 32Bit Cortex-M7 core was not fast enough so we had to jump up to much faster 64bit Cortex-A53 core.

Post reply on HN