Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Silicon Vendors
  • Support
  • About Us
  • Blog
  • Forum
  • Search
  • Jobs
  • Newsletter
  • Blog
  • Contact
  • Shop
  • emRun
  • emRun++

    emRun++
    The C++ runtime library for embedded applications

    emRun++ is a complete C++ standard library specifically designed and optimized for GCC/LLVM-based toolchains and embedded systems.

    Contact us
    Pricing
    Documentation
    SEGGER emRun++
    1. 1.Key features
    2. 2.Modern C++ features
    3. 3.Dynamic memory allocation
    4. 4.Exception handling
    5. 5.Low-level support
    6. 6.Memory footprint
      1. 6.1.Arm (32-bit)
      2. 6.2.RISC-V (32-bit)
      3. 6.3.RISC-V (64-bit)

    Overview

    emRun++ is a complete C++ standard library for use with any toolchain. It is specifically tweaked for embedded systems and applications. As a modern programming language, C++ is becoming increasingly important in the embedded sector offering developers more and more options. With this in mind, emRun++ is constantly being enhanced to meet the most modern C++ standards.

    emRun++ is also part of SEGGER's Embedded Studio IDE. Included in the ready-to-use toolchain and C runtime library of Embedded Studio, it is available out of the box and has all the features that make object-oriented programming (OOP) fast and easy.

    Key features

    • Comprehensive C++ standard library
    • Compatibility with common C++ standards, C++17
    • Complete integration with emRun
    • Dynamic memory management, optimized for embedded systems
    • Exception handling, including target unwinding on all supported targets

    Modern C++ features

    emRun++ implements classes and functions according to C++ standards. It also supplements the language features and incorporates the complete feature set of the C++17 standard defined by the International Organization for Standardization (ISO).

    emRun++ provides all standard C++ header files together with wrappers for the C runtime library headers. The implementation includes mangled names of standard C functions, such as cos(float) and cos(double) to its C equivalents cosf() and cos().

    Dynamic memory allocation

    Modern C++ applications rely on dynamic memory allocation. Objects are present in memory only while they are being used. Long-lived objects are usually created with “new” and destroyed with “delete”. While C++ takes care of calling objects’ constructors and destructors respectively, the regular C runtime library basically does the memory management.

    emRun++ implements "new" and "delete" to use the alloc and free routines of the C runtime library emRun, which provides efficient use of heap memory, requiring the least overhead.

    Exception handling

    C++ defines the use of exceptions, in contrast to C where it is the user’s responsibility to manually recover from an error and pass errors up to all callers or to run into a fault. Exception handling offers a systematic and robust approach to cope with errors that cannot be recovered from locally. Exceptions can be thrown in case of an error and are passed up the call stack up to a point where they are caught and handled.

    When an exception is thrown in a try block, all objects constructed within the block need to be destroyed, and the stack is unwound. To provide exception support, emRun++ implements the target architecture-dependent stack unwinding for all supported architectures.

    Low-level support

    C++ compilers define an application binary interface (ABI) which, for example, defines how objects are arranged, how name mangling works, or how virtual functions are implemented.

    emRun++ implements the low-level functions of the C++ ABI to which the compiler implicitly adds calls in code generation. This enables the C++ library to be used out-of-the-box with any toolchain.

    Memory footprint

    Arm (32-bit)

     ROM Usage [Bytes]
    Test Project [1]emRun++ [2]libstdc++ [3] 
    Empty 496924
    STL_List1 1,19269,409
    STL_List2 1,39669,557
    STL_Map1 1,46470,217
    STL_Map2 2,08071,661
    STL_Set1 1,47669,993
    STL_Set2 1,58470,101

    RISC-V (32-bit)

     ROM Usage [Bytes]
    Test Project [1]emRun++ [4]libstdc++ [5] 
    Empty 676858
    STL_List1 1,86890,848
    STL_List2 2,27691,012
    STL_Map1 2,38091,620
    STL_Map2 3,53693,216
    STL_Set1 2,40891,370
    STL_Set2 2,60091,464

    RISC-V (64-bit)

     ROM Usage [Bytes]
    Test Project [1]emRun++ [6]libstdc++ [7] 
    Empty 542888
    STL_List1 1,41487,314
    STL_List2 1,62287,496
    STL_Map1 1,75888,104
    STL_Map2 2,55489,766
    STL_Set1 1,76887,848
    STL_Set2 1,87887,952

    [1] Source code available at https://kb.segger.com/emRun++

    [2] SEGGER Embedded Studio for ARM version 6.32b, emRun++, GNU Toolchain, ARMv7M

    [3] GNU Arm Embedded Toolchain version 10.3-2021.10, libstdc++, ARMv7M

    [4] SEGGER Embedded Studio for RISC-V version 6.32b, emRun++, GNU Toolchain, RV32IMAC

    [5] SiFive GNU Embedded Toolchain for RISC-V version 2020.12.8, libstdc++, RV32IMAC

    [6] SEGGER Embedded Studio for RISC-V version 6.40, emRun++, GNU Toolchain, RV64IMAC

    [7] SiFive GNU Embedded Toolchain for RISC-V version 2020.12.8, libstdc++, RV64IMAC


    Related news

    2022
    Apr.21
    Runtime Library
    SEGGER News: SEGGER makes cutting-edge C++ library available for licensing

    SEGGER makes cutting-edge C++ library available for licensing

    SEGGER’s emRun++ is a groundbreaking C++ library, fully compatible with the modern 2017 standard. It is used and proven in SEGGER’s multi-platform Embedded Studio IDE for RISC-V and Arm and is now available for licensing to toolchain vendors.

    [Read more...]

    All news

    • Update notification
    • Pricing
    • Support
    • Product briefs

    Headquarters

    SEGGER Microcontroller GmbH

    Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    info@segger.com
    Tel.: +49-2173-99312-0
    Fax: +49-2173-99312-28

    Locations

    USA: SEGGER Microcontroller Systems LLC

    Boston area
    101 Suffolk Lane
    Gardner, MA 01440, USA
    us-east@segger.com
    Tel.: +1-978-874-0299
    Fax: +1-978-874-0599

    Silicon Valley
    Milpitas, CA 95035, USA
    us-west@segger.com
    Tel.: +1-408-767-4068

    China: SEGGER Microcontroller China Co., Ltd.

    Room 218, Block A, Dahongqiaoguoji
    No. 133 Xiulian Road
    Minhang District, Shanghai 201199, China
    china@segger.com
    Tel.: +86-133-619-907-60

    ISO 9001 certified

    ISO 9001

    30+ years of experience

    First-class embedded software tools since 1992
    • Imprint
    • Disclaimer
    • Code of Conduct
    • Privacy Policy
    © 2025 SEGGER - All rights reserved.