EWL for C and C++ Development

EWL introduces a new library set aiming at reducing the memory footprint taken by IO operations and introduces a simpler memory allocator.

The IO operations are divided in three categories:

The printing and scanning formatters for EWL are grouped in an effort to provide only the support required for the application:

int - integer and string processing

int_FP - integer, string and floating point

int_LL - integer (including long long) and string

int_FP_LL - all but wide chars

c9x - all including wide char

The buffered IO can be replaced by raw IO, this works solely when printf and scanf are used to perform IO, all buffering is bypassed and writing direct to the device is used. EWL libraries contain prebuilt versions for all formatters and IO modes. Selecting a model combination enables correct compiling and linking. The EWL layout for ColdFire is built per core architecture. It is composed of:

libm.a - math support (c9x or not)

libc.a - non c9x std C libs

libc99.a - c9x libs

librt.a - runtime libraries

libc++.a - non-c9x matching c++ libraries

libstdc++.a - c9x/c++ compliant libs

fp_coldfire.a - FPU emulation libraries

Selecting an EWL model for the libraries frees the user from adding libraries to the project, the linker will determine from the settings the correct library set, these settings are : processor, pid/pic, hard/soft FPU. Although the library names are known to the toolset, but their location is not. The environment variable MWLibraries can specify the path to the lib hirerarchy root, otherwise the -L linker option needs to point to the hierarchy

export MWLibraries=d:/CodeWarrior/ColdFire_Support/ewl 

mwldmcf ... -Ld:\CodeWarrior\ColdFire_Support\ewl

Note that, when using EWL and not using -nostdlib, MWLibraryFiles must not be defined since it conflicts with the known library names.

Note: For more information on the Embedded Warrior Library (EWL) for C or C++, see the following manuals: CodeWarrior Development Tools EWL C Reference and CodeWarrior Development Tools EWL C++ Reference.

This section consists of the following topics: