Using uSTL in eCos applications

To build an eCos library with uSTL support, you can start from the default template and then add the uSTL package CYGPKG_USTL. If you need file streams support or would like to build all uSTL tests, then you must also add the File I/O package CYGPKG_IO_FILEIO.

To use uSTL in your eCos application, simply include the file <ustl.h>. All uSTL classes are in the ustl namespace. To prevent compiler warnings when compiling your eCos application with uSTL support, you need to add the compiler flag -Wno-undef.

#include <ustl.h>
using namespace ustl;

int main (int argc, char* argv[])
{
    cout << "Hello world!\n";
    return EXIT_SUCCESS;
}

Note: If you use cout for printing to the console, then data will get sent only if you finish the output with endl or '\n'.

The uSTL library is subject of copyright under MIT license. For the license text see LICENSE file.