Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 芯片厂商
  • 支持
  • 关于我们
  • Search
  • 工作机会
  • 新闻简报
  • 联系我们
  • 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

    全球总部

    德国: SEGGER Microcontroller GmbH

    地址: Ecolab-Allee 5
    40789 Monheim am Rhein, Germany
    电邮: info@segger.com
    电话: +49-2173-99312-0
    传真: +49-2173-99312-28

    网点分布

    中国:哲戈微系统科技(上海)有限公司

    地址: 中国上海市闵行区秀涟路133号
    大虹桥国际A 栋218室
    邮编201199
    电邮: china@segger.com
    电话: +86-133-619-907-60


    简易信息聚合

    通过ISO 9001认证

    ISO 9001

    30多年的嵌入式行业经验

    First-class embedded software tools since 1992
    • 版本说明
    • 免责声明
    • 行为准则
    • 隐私策略
    • 沪ICP备2022005181号
    • 沪公网安备 31011202014525号
    © 2025 SEGGER - 版权所有.

    您即将离开 segger.cn 而访问境外网站,是否继续?