This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, here you will find a port of the uSTL library for eCos for review by the eCos maintainers: http://www.cetoni.de/ecos_ustl.zip The eCos uSTL library is a port of Mike Sharov's uSTL implementation. It has the particular feature of generating small object code sizes - an important requirement for embedded eCos based applications. The latest version can be found at: http://ustl.sourceforge.net/ http://sourceforge.net/projects/ustl/ The library provides a subset of the full C++ STL standard library. uSTL is a partial implementation of the STL specification intended to reduce code size of the derivative programs. This allows the eCos application to use well known standard C++ STL library containers, streams, iterators, algorithms and functors. By default eCos is build without exceptions and without RTTI support (compiler switches -fno-exceptions -fno-rtti). Normally the uSTL library relies on C++ exceptions to propagate errors and exceptions. To port and build the library for eCos all occurrences of try, catch and throw are replaced by macros USLT_TRY, USLT_CATCH_ALL, and USLT_THROW. Thus the eCos uSTL port compiles without exceptions and without RTTI support and does not require a special toolchain. The aim of this port was not to provide a full featured STL implementation with multithreaded exception support. The goal of this port was to provide a small lightweight STL implementation with well known containers, streams, iterators... that can get compiled without pulling any RTTI or exception stuff into the final eCos image. To work properly the uSTL library relies on a C99 compliant vsnprintf() implementation. C99 compliant vsnprintf(3) functions return the number of characters that would have been written to a sufficiently sized buffer (excluding the '\0'). The original code simply returned the number of bytes that had been written to the buffer. The attached patch vfnprintf.patch fixes this point. To compile an eCos library with uSTL support you need to apply both attached patches and unzip the content of ecos_ustl.zip to your ecos installation. Then select the template ustl and compile the library and the tests. You can also select the default template and add File I/O support package and uSTL package. The library was testes with EA2468 target and passed all tests except of tests bvt13 and bvt25 because both tests require a valid file system to read certain files via fstream or cin. Regards, Uwe
Attachment:
vfnprintf.patch
Description: Binary data
Attachment:
ecosdb.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |