QDK PIC24/dsPIC-XC16 - Quantum Leaps
QDK PIC24/dsPIC-XC16 - Quantum Leaps
QDK PIC24/dsPIC-XC16 - Quantum Leaps
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>QDK</strong><br />
<strong>PIC24</strong>/<strong>dsPIC</strong>-<strong>XC16</strong><br />
www.state-machine.com/pic<br />
2.1 Building the QP Libraries<br />
All QP components are deployed as libraries that you statically link to your application. The pre-built<br />
libraries for QEP, QF, QK, and QS are provided inside the \ports\pic24-dspic directory. This<br />
section describes steps you need to take to rebuild the libraries yourself.<br />
NOTE: To achieve commonality among different development tools, <strong>Quantum</strong> <strong>Leaps</strong> software does<br />
not use the vendor-specific IDEs, such as the MPLABX IDE, for building the QP libraries. Instead, QP<br />
supports command-line build process based on simple batch scripts.<br />
The code distribution contains the batch file make_.bat for building all the libraries located in<br />
the \ports\pic24-dspic\... directory. For example, to build the debug version of all the QP<br />
libraries for <strong>PIC24</strong>-<strong>dsPIC</strong>, with the MPLABX <strong>XC16</strong> compiler, QK kernel, you open a console window on a<br />
Windows PC, change directory to \ports\pic24-dspic\qk\xc16\, and invoke the batch by typing<br />
at the command prompt the following command:<br />
make_24FJ64GB002.bat<br />
For the <strong>PIC24</strong>FJ64GB002 MCU and<br />
make_33FJ128MC802.bat<br />
for the <strong>dsPIC</strong>33FJ128MC802 MCU.<br />
NOTE: You also need to adjust the symbol MPLABX_<strong>XC16</strong> at the top of the batch scripts if you’ve<br />
installed the <strong>XC16</strong> compiler into a different directory. You adjust the MCU type by changing the<br />
symbol PIC_DEVICE at the top of the make_.bat file.<br />
The build process should produce the QP libraries in the location: \ports\pic24-dspic\qk\-<br />
xc16\dbg\. The make_24FJ64GB002.bat files assume that the Microchip MPLABX <strong>XC16</strong> toolset has<br />
been installed in the directory C:\tools\Microchip\xc16\v1.10.<br />
NOTE: It is highly recommended that you re-build the QP libraries yourself, because the libraries that<br />
ship in the <strong>QDK</strong> have been built with optimizations disabled due to the expiration of the license key.<br />
In order to take advantage of the QS (“spy”) instrumentation, you need to build the QS version of the QP<br />
library. You achieve this by invoking the make_24FJ64GB002.bat utility with the “spy” target, like this:<br />
make_24FJ64GB002.bat spy<br />
The script should produce the QP library in the directory: \ports\pic24-dspic\qk\xc16\spy\.<br />
You choose the build configuration by providing a target to the make_24FJ64GB002.bat utility. The<br />
default target is “dbg”. Other targets are “rel”, and “spy”, respectively.<br />
Table 1 Make targets for the Debug, Release, and Spy library versions<br />
Software Version<br />
Build command<br />
Debug (default)<br />
make_<br />
Release<br />
make_ rel<br />
Spy<br />
make_ spy<br />
Copyright © <strong>Quantum</strong> <strong>Leaps</strong>, LLC. All Rights Reserved.<br />
8 of 35