03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Library Integration into a Freescale CodeWarrior Eclipse IDE<br />

In order to use the library functions, the library master header files must be included into<br />

the application source code. This is done using the pre-processor directive \#include<br />

".h", where can be gflib or gdflib or gmclib, depending on which library<br />

is to be employed.<br />

The master header files contain several additional header files that are needed <strong>for</strong> the<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> M<strong>PXR40xx</strong> integration into any<br />

user application. They include the "SWLIBS_Typedefs.h" header file which contains all<br />

general purpose data type definitions, the "mlib.h" header file containing all general math<br />

functions, the "SWLIBS_Defines.h" file containing common macro definitions <strong>and</strong> the<br />

"SWLIBS_MacroDisp.h" allowing the implementation based API call.<br />

Remember that by default there is no default implementation selected in the<br />

"SWLIBS_Config.h" thus the error message shall be displayed during the compilation<br />

requesting the default implementation selection.<br />

At this point, the <strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> M<strong>PXR40xx</strong> is<br />

linked with the user project file, <strong>and</strong> hence the library functions can be exploited <strong>and</strong><br />

flawlessly compiled/linked with the user application.<br />

2.12 Library Integration into a Freescale CodeWarrior Eclipse<br />

IDE<br />

The release provides two library versions <strong>for</strong> the Eclipse-based CodeWarrior<br />

environment. The library versions are different in the compilation options that were set<br />

while the library was compiled:<br />

• The library file with the suffix: _VLE_SC_.a,<br />

compilation options used: Power Architecture <strong>Embedded</strong> ABI, VLE instructions set,<br />

char type is signed.<br />

• The library file with the suffix: _VLE_UC_.a,<br />

compilation options used: Power Architecture EABI, VLE instruction set, char type<br />

is unsigned.<br />

The selection of the library version should follow those compilation options set <strong>for</strong> the<br />

CodeWarrior Eclipse IDE project. If the <strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong><br />

<strong>Libraries</strong> <strong>for</strong> M<strong>PXR40xx</strong> options <strong>and</strong> project options are different, warnings would be<br />

reported. All described steps assume that there is an existing Eclipse project<br />

("mclib_example_cw10x" name is used on below pictures).<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

128 Freescale Semiconductor, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!