Skip navigation

SEGGER RunTime Library emLib-C

emLib-C is a runtime library specifically designed and optimized for GCC and embedded systems.

  • Significant code size reduction (typically around 5 kB)
  • No viral licensing, no attribution clause
  • High performance, with time-critical routines written in assembly language
  • Minimum RAM usage
  • No heap requirements

GCC nowadays is a competitive compiler choice for embedded systems. Most toolchains using GCC also use either newlib, newlib-nano or glibc. Unfortunately, these have significant disadvantages over professional run-time libraries for embedded systems.

This is where emLib-C comes into play.

emLib-C simply is the replacement for newlib, newlib-nano, and glibc, that turns any GCC based tool chain into a professional development choice. emLib-C is used in Embedded Studio and has proven its value for years. 

  • Significant code size reduction (typically around 5 kB)
  • No viral licensing, no attribution clause
  • High performance, with time-critical routines written in assembly language
  • Minimum RAM usage
  • No heap requirements
  • Written from the ground up for embedded devices
  • Source code is provided, making it possible to step through startup code and library functions

  • Highly optimized functions that, when used, do not cause inclusion of many more support function (e.g. printf)
  • Many function are tuned with different implementations for size-optimized code and speed-optimized code.
  • Mathematical functions are fully reentrant and have no dependence on 'errno'.
  • Formatted input and output functions are customizable from basic I/O to fully featured I/O enabling reduction of final code footprint
  • Full support for localization, UTF-8, code pages, and locale codecs is linked only if used.
  • Sample startup code for Cortex processors, including the ability to receive command line parameters when used with applications such as J-Run to enable unit testing and performance testing

Being a simple one to one replacement for newlib or newlib-nano emLib-C shrinks and accelerates GCC-based embedded applications in no time. Whether the main concern with newlib is flash size, performance or the attribution clause of the viral licensing, emLib-C is the solution.

emLib-C can be licensed to individual companies and providers of GCC-based tools.

In many cases the ROM-savings of emLib-C enable the use of a smaller microcontroller. This pays dividends especially for devices built in large quantities for the mass market.

If you are interested, please contact us for more information. emLib-C is available for Cortex-M based microcontrollers. Ports for other CPUs can be made available on request.

Size Comparison emLib-C - newlib

Size Comparison ROM memory

emLib-C offers significant savings in flash memory. This is due to some functionality being written in assembly language, but primarily due to a structure that minimizes library internal dependencies. Things like file I/O is not linked in with printf or scanf.

ROM memory
  newlib-nano Embedded Studio ROM memory comparison
[Lower is better] 
Savings
empty "main" project: 3328 bytes 848 bytes !CALCULATE_BAR_0_1! 2480 bytes (75%)
with "sprintf()": 7168 bytes 2296 bytes !CALCULATE_BAR_0_1! 4872 bytes (68%)
 GCC based tool-chain using newlib-nano
 Embedded Studio using emLib-C

Size Comparison RAM usage

emLib-C also uses less static RAM due to a structure designed from the ground up for embedded systems.

RAM usage
  newlib-nano Embedded Studio RAM usage comparison
[Lower is better]  
Savings
empty "main" project: 184 bytes 68 bytes !CALCULATE_BAR_0_1! 116 bytes (63%)
with "sprintf()": 192 bytes 72 bytes !CALCULATE_BAR_0_1! 120 bytes (63%)
 GCC based tool-chain using newlib-nano
 Embedded Studio using emLib-C