[libcxx-dev] <atomic> for bare-metal development on ARM microcontrollers

JF Bastien via libcxx-dev libcxx-dev at lists.llvm.org
Sun Jun 30 12:12:08 PDT 2019

> On Jun 30, 2019, at 12:10 PM, Yves Delley <pu.y at delley.net> wrote:
>> On 30 Jun 2019, at 18:21, JF Bastien <jfbastien at apple.com> wrote:
>> I think you want libc++ support for “freestanding”.
> It looks like that's what I want :-). 
>> We’ve discussed this e.g. in “D56913: decoupling Freestanding atomic<T> from	libatomic.a”. Olivier started some of this work for atomic.
> Great - I had a quick glance over D56913 and the current bleeding edge of `<atomic>`. It seems that this should work for me. Except that there is still a "# error <atomic> is not supported on this single threaded system” at the top of `<atomic>`. Why is that? It seems that Olivier Giroux’s implementation contains it’s own lock, requiring no further thread-support. Anyway, I will give bleeding edge a try, simply removing that check and see how far I get.

I think it’s just that nobody’s tried to make it work.

>> It sounds like you’d like this work to continue :)
> I certainly do. I strongly believe in C++ for small embedded and it’s a pity that MCU SDKs are mostly C. It would be great to get access to all the niceties of a modern C++ library just by implementing a handful of C primitives for the platform (one may always dream, right?). Is there anything I (as someone without deeper knowledge of libc++) could help with?

Sure! Patches would be great since you’re trying it out. I’m happy to help review with other libc++ folks as I think this is important.

More information about the libcxx-dev mailing list