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

Yves Delley via libcxx-dev libcxx-dev at lists.llvm.org
Sun Jun 30 12:10:04 PDT 2019

> 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.

> 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? 

More information about the libcxx-dev mailing list