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 Classic 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. Remember that by<br />

default there is no default implementation selected in the "SWLIBS_Config.h" thus the<br />

error message shall be displayed during the compilation requesting the default<br />

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.11 Library Integration into a Freescale CodeWarrior Classic<br />

IDE<br />

The release provides two library versions <strong>for</strong> the CodeWarrior environment. The library<br />

versions are different in the compilation options that were set while the library was<br />

compiled:<br />

• The library file with the suffix: .PPCEABI.V.SC.a, compilation options used: Power<br />

Architecture <strong>Embedded</strong> ABI, VLE instructions set, char type is signed.<br />

• The library file with the suffix: .PPCEABI.V.UC.a, compilation options used: Power<br />

Architecture EABI, VLE instruction set, char type is unsigned.<br />

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

CodeWarrior project. If the <strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong><br />

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

In order to use 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><br />

within a CodeWarrior GUI environment, it is necessary to provide the CodeWarrior GUI<br />

with in<strong>for</strong>mation on access paths <strong>and</strong> to add the appropriate <strong>Embedded</strong> <strong>Software</strong> <strong>and</strong><br />

<strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> M<strong>PXR40xx</strong> files to the project. The following files shall be<br />

added to the project:<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 />

126 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!