Hey John, > Naturally, much of the C++ standard library isn't remotely suitable for > AVRs, and should not be supported. However, there are a fair amount of > features that I believe would work very nicely, and would be worthwhile > to support. I've been playing with the same thought for a while and briefly looked into this.
It's worthwile to note that other embedded targets (notably ARM) seem to just include the c++ standard libraries that come with gcc which supports a lot of the useful stuff. Then, I think avr *could* use the same approach, except that the convention so far is to just disable the standard library on all avr-gcc builds. Maybe because there are bugs or things not yet properly implemented for AVR, but not using the standard library will in itself lead to more bugs in AVR if you ever try to enable it. Having said that, I think there have been some people in the past who tried enabling the gcc c++ standard library for avr, which has indeed seen some success. I've been meaning to try this as well with the Arduino-built avr-gcc version or maybe the Debian version, which are the versions I use most, but haven't found the time so far (probably will not have time for this in the near future either). From my previous look into this, I collected some links that might prove useful. I'll share them here without further comment (I'd have to look at them again to comment): - http://gcc.1065356.n8.nabble.com/avr-freestanding-libstdc-td1710708.html#a1710857 - https://www.reddit.com/r/cpp/comments/esk2wy/standard_c_library_on_gccs_avr_target/ - https://patchwork.ozlabs.org/project/gcc/patch/CADfx-VSmfye0Xe7xMWVFZKDZhQbwFcw7RbNYe=6irdjuzpt...@mail.gmail.com/ - https://patches-gcc.linaro.org/patch/9338/ - https://patches-gcc.linaro.org/patch/9338/ - http://avr-libstdcxx.gitlab.io/ Gr. Matthijs
signature.asc
Description: PGP signature