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
  • Embedded Studio
  • SEGGER Compiler

    SEGGER Compiler
    Optimizing C/C++

    Generate optimized code for embedded systems.

    Buy now
    Downloads
    Documentation
    SEGGER Embedded Studio
    1. 1.Performance
      1. 1.1.Size optimization
      2. 1.2.Speed optimization
    2. 2.Stack Overflow Prevention (STOP) technology

    Overview

    The SEGGER Compiler is an optimizing C/C++ compiler for Arm and RISC-V microcontrollers. Based on Clang, it offers a modern and flexible front end, which supports the latest C and C++ language features. The back end, which produces the binary objects for the target architecture, has been optimized by SEGGER to generate fast and small Thumb-2 code for Cortex-M and Cortex-A processors. In combination with the SEGGER Linker, the SEGGER Assembler, and the SEGGER Runtime Library, it shapes a professional toolchain for any embedded application.

    The SEGGER Compiler is directly integrated into Embedded Studio and can easily be used. As the front end is compatible to GCC and Clang, existing projects can be configured to use the SEGGER Compiler with just one option to be changed.

    Key features

    • Modern and flexible front end, supports the latest C/C++ language standard
    • Support for all popular Arm cores and RISC-V
    • Significantly improved code generation for Thumb-1/Thumb-2 target CPUs, achieving higher performance and smaller code size
    • Easy to use: Compiler invocation and language extensions compatible to clang and mostly compatible to GCC

    Performance

    Size optimization

    The SEGGER Compiler can tweak the code generation to produce small code for size optimization, while retaining good execution speed.

    The following table shows the code size of the compiler output with size optimization (-Oz). All measurements were performed on a Cortex-M4 target.

    Test CaseCode Size

    SEGGER Compiler 20.1.0 

    Clang 20.1.8GCC 14.2.1
    CRC154 bytes = 100.00 %164 bytes = 106.5 %166 bytes = 107.8 %
    CompressToGo2,120 bytes = 100.00 %2,310 bytes = 109.0 %2,134 bytes = 100.7 %
    AES_CBC1,762 bytes = 100.00 %1,922 bytes = 109.1 %2,120 bytes = 120.3 %
    SHA256906 bytes = 100.00 %958 bytes = 105.7 %990 bytes = 109.3 %
    RSA_Sign4,926 bytes = 100.00 %5,348 bytes = 108.6 %5,408 bytes = 109.8 %
    FS_Test42,454 bytes = 100.00 %43,394 bytes = 102.2 %46,026 bytes = 108.4 %
    coremark2,418 bytes = 100.00 %2,686 bytes = 111.1 %2,740 bytes = 113.3 %
    emBench39,978 bytes = 100.00 %48,256 bytes = 120.7 %52,532 bytes = 131.4 %
    Average100.00 %110.9 %118.4 %

    Speed optimization

    With the highest optimization level, the SEGGER Compiler produces fastest code with advanced optimization and less focus on code size.

    The following table shows the performance values of the compilers with the highest optimization (-O3). All measurements were performed on a Cortex-M4 target.

    Test CaseRun Time
    SEGGER Compiler 20.1.0Clang 20.1.8GCC 14.2.1
    CRC100.00 %103.1 %110.1
    CompressToGo100.00 %112.5 %97.4 %
    AES_CBC100.00 %108.8 %123.2 %
    SHA256100.00 %106.6 %111.3 %
    RSA_Sign100.00 %115.2 %116.2 %
    FS_TEST100.00 %102.5 %105.0 %
    coremark100.00 %135.8 %130.7 %
    emBench100.00 %108.1 %110.8 %
    Average100.00 %111.6 %113.1 %

    Stack Overflow Prevention (STOP) technology

    With STOP technology, the Compiler adds a call to stack limit-check routine wherever necessary, before adjusting the stack pointer. As an option for the Clang-based, highly optimizing SEGGER Compiler, STOP can be easily enabled, without any change to application code. This way, all stack overflows are prevented. If a stack overflow has been prevented, the system can enter a safe state and recover.

    More about Stack Overflow Prevention (STOP) technology ...

    Stack Overflow Protection technology
    • Online documentation
    • List of downloads
    • Release notes
    • Update notification
    • Pricing
    • Support
    • Silicon vendor resources

    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.