Everything
7.1 Supplied Libraries

The CC-RH provides the following libraries.

Table 7.1

Supplied Libraries

[V1.02.00 or later]

Supplied Libraries

Library Name

Conditions of Use

Standard library

(Program diagnostic functions

Functions with variable arguments

Character string functions

Memory management functions

Character conversion functions

Character classification functions

Standard I/O functions

Standard utility functions

Peripheral device initialization function

RAM section initialization function

Operation runtime functions

Checks for indirect function calls function)

Mathematical library

(Mathematical functions (Double-precision and single-precision))

lib\v850e3v5\rhf8n.lib

When -Xfloat=fpu, -Xdbl_size=8, and -Xround=nearest are specified

lib\v850e3v5\rhs8n.lib

When -Xfloat=soft, -Xdbl_size=8, and -Xround=nearest are specified

lib\v850e3v5\rhf4n.lib

When -Xfloat=fpu, -Xdbl_size=4, and -Xround=nearest are specified

lib\v850e3v5\rhs4n.lib

When -Xfloat=soft, -Xdbl_size=4, and -Xround=nearest are specified

lib\v850e3v5\rhf8z.lib

When -Xfloat=fpu, -Xdbl_size=8, and -Xround=zero are specified

lib\v850e3v5\rhf4z.lib

When -Xfloat=fpu, -Xdbl_size=4, and -Xround=zero are specified

Standard library

(Dynamic memory management functions)

[V1.04.00 or later]

lib\v850e3v5\libmalloc.lib

Can always be used

lib\v850e3v5\secure\libmalloc.lib

When the security facility is used

[Professional Edition only]

Standard library

(Non-local jump functions)

lib\v850e3v5\libsetjmp.lib

When -Xep=callee is specified

lib\v850e3v5\ep\fix\libsetjmp.lib

When -Xep=fix is specified

Standard library

(Program diagnostic functions

Functions with variable arguments

Character string functions

Memory management functions

Character conversion functions

Character classification functions

Standard I/O functions

Standard utility functions

Peripheral device initialization function

RAM section initialization function

Operation runtime functions)

lib\v850e3v5\libc.lib

Can always be used (for backward compatibility with V1.01.00 or earlier)

Mathematical library using FPU

(Mathematical functions (Double-precision))

lib\v850e3v5\libm.lib

When -Xfloat=fpu is specified (for backward compatibility with V1.01.00 or earlier)

Mathematical library using FPU

(Mathematical functions (Single-precision))

lib\v850e3v5\libmf.lib

Mathematical library not using FPU

(Mathematical functions (Double-precision))

lib\v850e3v5\softfloat\libm.lib

When -Xfloat=soft is specified (for backward compatibility with V1.01.00 or earlier)

Mathematical library not using FPU

(Mathematical functions (Single-precision))

lib\v850e3v5\softfloat\libmf.lib

 

[V1.01.00 or earlier]

Supplied Libraries

Library Name

Conditions of Use

Standard library

(Program diagnostic functions

Functions with variable arguments

Character string functions

Memory management functions

Character conversion functions

Character classification functions

Standard I/O functions

Standard utility functions

Peripheral device initialization function

RAM section initialization function

Operation runtime functions)

lib\v850e3v5\libc.lib

Can always be used

Mathematical library using FPU

(Mathematical functions (Double-precision))

lib\v850e3v5\libm.lib

When -Xfloat=fpu is specified

Mathematical library using FPU

(Mathematical functions (Single-precision))

lib\v850e3v5\libmf.lib

Mathematical library not using FPU

(Mathematical functions (Double-precision))

lib\v850e3v5\softfloat\libm.lib

When -Xfloat=soft is specified

Mathematical library not using FPU

(Mathematical functions (Single-precision))

lib\v850e3v5\softfloat\libmf.lib

Standard library

(Non-local jump functions)

lib\v850e3v5\libsetjmp.lib

When -Xep=callee is specified

lib\v850e3v5\ep\fix\libsetjmp.lib

When -Xep=fix is specified

 

-

When the standard library or mathematical library is used in an application, include the related header files to use the library function.

Refer these libraries using the optimizing linker option (-l).

However, it is not necessary to refer the libraries if only "program diagnosis function", "function with a variable arguments", "character conversion functions" and "character classification functions" are used.

-

When CS+ is used, these libraries are referred by default.

-

The operation runtime function is a routine that is automatically called by the CC-RH when a floating-point operation or integer operation is performed.

Unlike the other library functions, the "operation runtime function" is not described in the C source or assembler source.

-

Each rh***.lib library includes the contents of libc.lib, libm.lib, and libmf.lib (but does not include libmalloc.lib, libsetjmp.lib). When specifying an rh***.lib library, do not specify libc.lib, libm.lib, or libmf.lib together. In addition, only one of the rh***.lib libraries should be specified. Otherwise, correct operation is not guaranteed.

-

secure\libmalloc.lib will generate an error if the Professional Edition license is not available.

-

When linking libmalloc.lib, the standard library (rh***.lib) has to be linked at the same time.

-

When the library (libc.lib) for achieving compatibility with earlier versions is used, the library for the security facility cannot be used.