This project aims to add a few comfort classes back into a library similar to libstdc++ to give the STL user something marginally familiar.
NB. There are some projects that have partially or mostly attempted
to port over the STL and libstdc++ to the AVR platform (or generally, the embedded market) but I wasn't satisfied with any of them. Some are just cut/paste ports and don't address the unique memory and storage requirements found on the AVR. To bridge
this perceived gap, this project -- libavrstdc++ -- was created and aims to provide
functionality to the AVR C++ programmer who may be used to the convenience of the STL. All STL containers and cohesive components are fine tuned and fiddled to run on a memory and storage-constrained environment. Code size
and memory utilization reduction were the major goals of this project, outside of providing the familiar interface of the STL to AVR C++ developers.
The libavrstdc++ class library is composed of libminimal.a
and libavrstdc++.a. It doesn't make sense to make shared libraries in the context of AVR firmware. Also, it may be possible to simply include the "include" and "src" files into your project instead of compiling into an AVR-family-specific
library (ie for the ATmega644P).
Revision 2 has changed the format of the library. Where possible (which is most every place), I have put all code in the header file in the same manner of the awesomely great BOOST C++ class library. This provides two main benefits:
- It doesn't require a compile for each architecture MCU you wish to use it with
- You can just put the include directory in your include path and start using it
libminimal is a custom rewrite of some commonly used string routines that help to keep having to go to the avr libc and link in a large library for just a few components. libavrstdc++ contains Singly Linked Lists, Maps, Sets, SkipLists, and more. See the documentation
for a more complete treatment of what's in the library.
The current version is still a work in progress but has limited utility already. If you are interested in this project and would like to contribute your STL classes and/or code, don't hesitate to contact me at bjames at unix-arm dot org. I'd be happy
to see anything that you think should be included.
To see the roadmap and JIRA issue/feature tracker:
Checkout the online documenation
, feel free to start a discussion if you like.