Difference between revisions of "SEGGER RunTime Library"

From SEGGER Wiki
Jump to: navigation, search
m
m (What part of the library are machine specific?)
(One intermediate revision by the same user not shown)
Line 4: Line 4:
  
 
For detailed information visit the [https://www.segger.com/products/development-tools/runtime-library/ SEGGER Runtime Library product page on segger.com].
 
For detailed information visit the [https://www.segger.com/products/development-tools/runtime-library/ SEGGER Runtime Library product page on segger.com].
 +
 +
== What are the target customers for this product? ==
 +
 +
There are three classes of customer for this product and three variants:
 +
 +
* End users that wish to replace newlib, newlib-nano, or some other vendor-supplied library with the SEGGER Runtime Library in order to reduce code footprint. In this case, the library is already configured for the target architecture and delivered ready for customer integration into the IDE.
 +
* Silicon vendors that wish to license the SEGGER Runtime Library in order to offer it to their customers in place of newlib or newlib-nano as a competitive advantage.  In this case, the silicon vendor receives a library configured for the processor architecture and ABI and integrates this into their IDE on behalf of all customers.
 +
* Processor IP vendors that wish to bring up a processor and associated toolset, for a proprietary architecture, where there is no pre-existing runtime library. In this case, the customer receives an architecture-neutral version of the runtime library, with supporting C functions, and integrates this into the compiler toolchain for their architecture.
 +
 +
== What does the library contain? ==
 +
 +
The SEGGER Runtime Library contains implementations of all Embedded C Subset functions required by the ISO standard. In addition it contains some functions that you will find in POSIX.1 and Linux that extend the C library with useful functionality.
 +
 +
However, an implementation of the user-facing C library API is not all that is required to run a C program on a microcontroller. All C operations that do not directly map to machine instructions must be emulated in software. Therefore the SEGGER Runtime Library contains implementations of basic floating point operations, floating point conversions, and integer operations such as multiply, divide, and long shifts which use only fundamental integer data types, addition, subtraction, and shifting.
 +
 +
== What parts of the library are machine specific? ==
 +
 +
Although the SEGGER Runtime Library has C implementations of the required C API and runtime API, implementation of <code>setjmp()</code> and <code>longjmp()</code> are highly compiler, ABI, and machine specific. The SEGGER Runtime Library contains implementations for Arm and RISC-V using standard ABIs, but if you are bringing up the library on a different processor, or using a nonstandard ABI, you will need to implement both <code>setjmp()</code> and <code>longjmp()</code> yourself.
  
 
== IDE specific content ==
 
== IDE specific content ==
 
* [[How to use the SEGGER Runtime Library with NXP's MCUXpresso]]
 
* [[How to use the SEGGER Runtime Library with NXP's MCUXpresso]]

Revision as of 10:27, 12 July 2019

The SEGGER RunTime Library is the replacement from SEGGER for newlib, newlib-nano, and glibc used in most GCC toolchains. These libraries have significant disadvantages over professional runtime libraries for embedded systems. The SEGGER RunTime Library converts any GCC-based toolchain into a professional development choice.

In many cases, the ROM-savings of the SEGGER RunTime Library enable the use of a smaller microcontroller with less on-chip memory. This can result in significant cost savings, especially for devices built in large quantities for the mass market.

For detailed information visit the SEGGER Runtime Library product page on segger.com.

What are the target customers for this product?

There are three classes of customer for this product and three variants:

  • End users that wish to replace newlib, newlib-nano, or some other vendor-supplied library with the SEGGER Runtime Library in order to reduce code footprint. In this case, the library is already configured for the target architecture and delivered ready for customer integration into the IDE.
  • Silicon vendors that wish to license the SEGGER Runtime Library in order to offer it to their customers in place of newlib or newlib-nano as a competitive advantage. In this case, the silicon vendor receives a library configured for the processor architecture and ABI and integrates this into their IDE on behalf of all customers.
  • Processor IP vendors that wish to bring up a processor and associated toolset, for a proprietary architecture, where there is no pre-existing runtime library. In this case, the customer receives an architecture-neutral version of the runtime library, with supporting C functions, and integrates this into the compiler toolchain for their architecture.

What does the library contain?

The SEGGER Runtime Library contains implementations of all Embedded C Subset functions required by the ISO standard. In addition it contains some functions that you will find in POSIX.1 and Linux that extend the C library with useful functionality.

However, an implementation of the user-facing C library API is not all that is required to run a C program on a microcontroller. All C operations that do not directly map to machine instructions must be emulated in software. Therefore the SEGGER Runtime Library contains implementations of basic floating point operations, floating point conversions, and integer operations such as multiply, divide, and long shifts which use only fundamental integer data types, addition, subtraction, and shifting.

What parts of the library are machine specific?

Although the SEGGER Runtime Library has C implementations of the required C API and runtime API, implementation of setjmp() and longjmp() are highly compiler, ABI, and machine specific. The SEGGER Runtime Library contains implementations for Arm and RISC-V using standard ABIs, but if you are bringing up the library on a different processor, or using a nonstandard ABI, you will need to implement both setjmp() and longjmp() yourself.

IDE specific content