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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Multiple Implementation Support<br />

By default the support of all implementations is turned off, thus the error message<br />

"Define at least one supported implementation in SWLIBS_Config.h file." is displayed<br />

during the compilation if no implementation is selected, preventing the user application<br />

building. Following are the macro definitions enabling or disabling the implementation<br />

support:<br />

• MCLIB_SUPPORT_F32 <strong>for</strong> 32-bit fixed-point implementation support selection<br />

• MCLIB_SUPPORT_F16 <strong>for</strong> 16-bit fixed-point implementation support selection<br />

• MCLIB_SUPPORT_FLT <strong>for</strong> single precision floating point implementation<br />

support selection<br />

These macros are defined in the SWLIBS_Config.h file located in Common directory of<br />

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> installation<br />

destination. To enable the support of each individual implementation the relevant macro<br />

definition has to be set to MCLIB_STD_ON.<br />

2.3.1 Global Configuration Option<br />

This function call supports the user legacy applications, which were based on older<br />

version of <strong>Motor</strong> <strong>Control</strong> Library. Prior to any <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> function call using the Global configuration option, the<br />

MCLIB_DEFAULT_IMPLEMENTATION macro definition has to be setup properly. This<br />

macro definition is not defined by default thus the error message "Define default<br />

implementation in SWLIBS_Config.h file." is displayed during the compilation,<br />

preventing the user application building.<br />

The MCLIB_DEFAULT_IMPLEMENTATION macro is defined in the SWLIBS_Config.h<br />

file located in Common directory of the <strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong><br />

<strong>for</strong> M<strong>PXR40xx</strong> installation destination. The MCLIB_DEFAULT_IMPLEMENTATION<br />

can be defined as the one of the following supported implementations:<br />

• MCLIB_DEFAULT_IMPLEMENTATION_F32 <strong>for</strong> 32-bit fixed-point<br />

implementation<br />

• MCLIB_DEFAULT_IMPLEMENTATION_F16 <strong>for</strong> 16-bit fixed-point<br />

implementation<br />

• MCLIB_DEFAULT_IMPLEMENTATION_FLT <strong>for</strong> single precision floating<br />

point implementation<br />

After proper definition of MCLIB_DEFAULT_IMPLEMENTATION macro 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> functions can be called<br />

using st<strong>and</strong>ard legacy API convention, e.g. GFLIB_Sin(x).<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 />

112 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!