Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Support
  • About Us
  • Blog
  • Forum
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Web Shop
    • Newsletter
    • RSS
  •   Jobs
  •   Videos
  •   Blog
  •   Sustainability
  • Embedded Studio
  • SEGGER Compiler
  • Technology
  • Toolchain
  • License

SEGGER Compiler
Optimizing C/C++

Generate optimized code for embedded systems.

Buy now
Downloads
Documentation
SEGGER Embedded Studio
  1. 1.Overview
    1. 1.1.Key features
  2. 2.Performance
    1. 2.1.Size optimization
    2. 2.2.Speed optimization
  3. 3.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).

Test CaseCode Size

SEGGER Compiler 18.1.0 

Clang 18.1.6GCC 13.2.1
CRC152 bytes = 100.00 %166 bytes = 109.2 %164 bytes = 107.9 %
CompressToGo2,096 bytes = 100.00 %2,308 bytes = 110.1 %2,124 bytes = 101.3 %
AES-CBC1,768 bytes = 100.00 %1,924 bytes = 108.8 %2,120 bytes = 119.9 %
SHA-256926 bytes = 100.00 %978 bytes = 105.6 %986 bytes = 106.5 %
RSA Sign4,996 bytes = 100.00 %5,364 bytes = 107.4 %5,318 bytes = 106.4 %
FS Test42,804 bytes = 100.00 %43,544 bytes = 101.7 %45,800 bytes = 107.0 %
coremark2,496 bytes = 100.00 %2,700 bytes = 108.2 %2,734 bytes = 109.5 %
emBench40,654 bytes = 100.00 %48,292 bytes = 118.8 %52,662 bytes = 129.5 %
Average100.00 %109.8 %116.7 %

Speed optimization

With 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 highest optimization (-O3).

Test CaseRun Time
SEGGER Compiler 18.1.0Clang 18.1.6GCC 13.2.1
CRC100.00103.0110.4
CompressToGo100.00110.393.2
AES_CBC100.00106.2122.5
SHA256100.00107.0112.7
RSA_Sign100.00105.8107.5
FS_TEST100.00116.8102.2
coremark100.00100.991.7
emBench100.00104.7110.5
Average100.00106.8106.3

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

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
  • Privacy Policy
© 2025 SEGGER - All rights reserved.