beautypg.com

Ned in the, Floating point library, Section on – Zilog Z8F0130 User Manual

Page 126

background image

Using the Integrated Development Environment

UM013037-1212

102

Zilog Developer Studio II – Z8 Encore!
User Manual

Standard Library adapted for embedded applications, as described more fully in the

Using

the ANSI C-Compiler

section on page 193. If your project makes any calls to standard

library functions, you must select the

C Runtime Library

checkbox unless you prefer to

provide your own code for all library functions that you call. As noted in the

Additional

Object/Library Modules

section on page 99, you can also set up your application to call a

mixture of Zilog-provided functions and your own customized library functions. To do so,
select the

C Runtime Library

checkbox. Calls to standard library functions will then call

the functions in the Zilog default library except when your own customized versions exist.

Zilog’s version of the C run-time library is organized with a separate module for each
function or, in a few cases, for a few closely related functions. Therefore, the linker links
only those functions that you actually call in your code. This means that there is no unnec-
essary code size penalty when you select the

C Runtime Library

checkbox; only functions

you call in your application are linked into your application.

Floating Point Library

The

Floating Point Library

drop-down list box allows you to choose which version of the

subset of the C run-time library that deals with the floating-point operations will be linked
to your application:

Real.

If you select

Real

, the true floating-point functions are linked in, and you can per-

form any floating-point operations you want in your code.

Dummy .

If you select

Dummy

, your application is linked with alternate versions that are

stubbed out and do not actually carry out any floating-point operations. This dummy float-
ing-point library has been developed to reduce code bloat caused by including calls to

printf()

and related functions such as

sprintf()

. Those functions in turn make calls

to floating-point functions for help with formatting floating-point expressions, but those
calls are unnecessary unless you actually must format floating-point values. For most
users, this problem has now been resolved by the

Generate Printfs Inline

checkbox (see

the

Generate Printfs Inline

section on page 84 for a full discussion). You only need to

select the dummy floating-point library if you have to disable the

Generate Printfs Inline

checkbox and your application uses no floating-point operations. In that case, selecting

Dummy

keeps your code size from bloating unnecessarily.

None.

If you select

None

, no floating-point functions are linked to your application at all.

This can be a way of ensuring that your code does not inadvertently make any floating-
point calls, because, if it does and this option is selected, you receive an error or warning
message about an undefined symbol.

Zilog Standard Library (Peripheral Support)

Select this checkbox to use the Zilog Standard Library (ZSL) in addition to the run-time
library (described in the

Using the ANSI C-Compiler

chapter on page 193). The ZSL con-

tains functions for controlling the UART device driver and GPIO ports.