Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 支持
  • 关于我们
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Newsletter
    • RSS
  •   工作机会
  •   视频
  •   永续性
  • 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

全球总部

德国: 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 而访问境外网站,是否继续?