Important: throughout the rest of this document, we will use the
following notation:
<FC_INSTALL_DIR> - the root directory of your FC
installation. The FC packages are in the
<FC_INSTALL_DIR>/packages directory (or repository); the
original examples are in the <FC_INSTALL_DIR>/examples
directory (or repository).
<XDAIS_INSTALL_DIR> - the root directory of your
xDAIS installation. Some distributions of this FC release include an
fctools directory which contains an xDAIS release. In the case of
those distributions, <XDAIS_INSTALL_DIR> could be set to
<FC_INSTALL_DIR>/fctools. Note that the xDAIS packages will
be located in the <XDAIS_INSTALL_DIR>/packages directory
(or repository).
<XDC_INSTALL_DIR> - the root directory of your
XDC tools installation. The FC examples now have a dependency on the XDC
tools std.h header file. If you have installed DSP BIOS, you can set
<XDC_INSTALL_DIR> to <BIOS_INSTALL_DIR>/xdctools.
Otherwise, set <XDC_INSTALL_DIR> to the root directory of your XDC
tools installation.
Preparing to Build the Examples
Create a working directory
Create a working directory (e.g. c:/myPackages) and copy the
examples directory into it (e.g. c:/myPackages/examples).
This will be where you build and modify the Framework Components examples.
Doing this will ensure you have a backup copy of the original examples, as
provided by the Framework Components product.
Build using XDC tools
1. Manage xdcpaths.mak
The Framework Components examples are provided with XDC build scripts.
xdcpaths.mak is the Makefile include file that is used to define the targets and environment in which the example XDC packages will be built.
At the root of the Examples directory, there is a
xdcpaths.mak file which has to be edited for your particular usecase.
Edit the following variables described below
PROGRAMS
Some of the FC examples can be built for different types of programs
The PROGRAMS variable specifies which types of final executables you
want to build.
Edit this variable to add/remove types of programs to build.
DEVICES
Different FC examples build for different devices.
The DEVICES variable specifies the list of devices you want to build
your examples for. A comment above this variable will show the list of
devices supported in this release.
Edit this variable to add/remove devices for which to build the examples.
ELF
The ELF variable lets you pick whether you want to build your
programs for the elf target for a particular ISA.
INSTALL_DIR
The INSTALL_DIR variables lets you set the path to other
dependent components. Depending on the programs you are building and the
devices you build for, you will need to set the path for one or more of
these components.
CGTOOLS_
Correct code generation tool paths will need to be specified for the
architectures you will be building for. For instance, to build for the C6472
device, you will need to set the CGTOOLS_C64P variable to the TI C64x
toolchain location.
Note that this the directory that contains bin/, include/, and lib/
subdirectory.
MY_XDC_PATH
Any other components required for modifications made to existing examples
can be added via this variable
.
2. Build examples
From the base of your examples directory, type
gmake clean
gmake
This will build all the examples that are applicable for your DEVICE and
PROGRAMS.
Other make targets might also be available in the Makefile to build subsets of
the examples.
You can also step into a specific example directory, and type the above commands to build individual examples.