Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

XDM GenAlg Wizard FAQ

From Texas Instruments Wiki
Jump to: navigation, search

General Questions

What does the wizard do? What does it generate?

The GenAlg Wizard creates a XDC package with all the files necessary to build and distribute an XDM-compliant algorithm.


Does the generated codec require Codec Engine?

No. The generated XDC package builds with the XDC tools (using package.bld), but there are no bindings to Codec Engine. You can integrate the generated codec in any framework (including Codec Engine).


How do I install the Wizard?

The Wizard is delivered with XDAIS 6.25 or greater, and is provided with CCS Eclipse. The latest XDAIS releases are available here.


  • XDCtools 3.16 or greater

Running the Wizard

From CCS Eclipse

GenAlg In CCS Menu

If you enable XDAIS in your CCS Eclipse environment (Window | Preferences | CCS | RTSC | Check the version of XDAIS you want to use), you will have a new "Tools | XDAIS Tools | GenAlg" menu item, as shown in the image to the right.

(Note that in CCS v5.1, the Tools menu only appears when CCS is in Debug Perspective.)

Batch File/Shell Script

There are scripts at the root of the XDAIS product that demonstrate how to start the wizard. See the ti.xdais.wizards.genalg.bat for Windows, or on Linux. (Under the covers, they run the command "$XDC_INSTALL_DIR/xs ti.xdais.wizards.genalg" with an appropriate XDCPATH set.)

What if I need help on the command line?

See XDM GenAlg Wizard help by: xs ti.xdais.wizards.genalg --help

The Wizard GUI

What if I need help using the GUI version?

Here is a description of the wizard:

Basic Algorithm Information
Basic Algorithm Information
The name of the algorithm you're creating
Your company name
Has the form I<Vendor>. This field will be automatically filled after naming the module.
Base Interface
The interface that is being implemented
Package Name
The algorithm's globally unique Package Name. Defaults to <Vendor>.<Module>
Build targets. The generated makefile will build a library for each target selected.
Add IRES Interface
When checked, a generic implementation of the IRES interface will be added to the algorithm in <Module>_<Vendor>_ires.c. All IRES references will be inside #ifdef ADD_IRES_RESOURCE blocks. The generated source files will have to be modified to implement a specific resource manager.
Destination Directory
The location that the algorithm package files will be output to. For example, if the output directory is c:/output, and the algorithm package name is ti.viddec_copy, the files will be output to c:/output/ti/viddec_copy
'cgtools' Directories
The location of CodeGen tools required to build for the selected targets.
Expert Mode
When left unchecked, the Interface and Package Name fields will be read-only and will be automatically generated based on Module and Vendor

What is the templates directory?

The templates directory contains subdirectories of XDC templates. Each template generates an XDM algorithm package that implements an XDM interface. The name of each subdirectory is the name of the XDM interface, and is displayed in the 'Base Interface' combo box. For more information, see: XDCScript Templates

After the Wizard

How do I build my algorithm package?

  • Run gmake all from the output directory (output directory +

Can I use Code Composer Studio to build my algorithm?

  • Yes. When you check the "Generate CCS Eclipse project" box, a standard eclipse project will be created that can be imported into CCS and built. See GenCodecPkg Code Composer Studio 4.x for details.

How can I check that my generated algorithm is XDAIS compliant?

After building a generated algorithm package, it can be tested for XDAIS compliance using the QualiTI compliancy tool.

How do I add a C6x-variant target to GenAlg?

It's easy to add a C6x-variant target to GenAlg as long as it is supported by XDC tools. Look at the ti.targets package in RTSC Package Documentation for supported C6x targets. The files that need to be modified are in the <xdais install dir>/packages/ti/xdais/wizards/genalg directory. They are:


Below are the steps required to add the ti.targets.elf.C67P target. To add your target, follow the exact same procedure, replacing 'C67P' with your target.


Target entries must be added to five arrays: targetList, targetDesc, targetSuffixes, ccOpts and cgTools. All of these entries must be at the same index in each array and each array must be the exact same size!

1. Add ti.targets.elf.C67P to the targetList array at index 5.

var targetList = [
    'ti.targets.elf.C67P',    // Add this

2. Add 'C67P ELF', to the targetDesc array at index 5. This is the string that is displyed in the "Targets" list box.

var targetDesc = [
    'C64P COFF',
    'C64P ELF',
    'C66 ELF',
    'C674 COFF',
    'C674 ELF',
    'C67P ELF',    // Add this
    'M3 ELF',
    'ARM v5T GCC Linux',
    'ARM v6 GCC Linux',
    'ARM v7A GCC Linux'

3. Add 'e67P', to the targetSuffixes array at index 5. The target suffix can be read from the "module-wide config parameters" section in the RTSC Package Documentation for ti.targets.elf.C67P. It is declared as const C67P.suffix = String "e67P"

var targetSuffixes = [
    'e67P',    // Add this

4. Add , to the ccOpts array at index 5.

var ccOpts = [
    '-mi10 -mo',
    '-mi10 -mo',
    '',    // Add this

5. Add 'C67P', to the cgTools array at index 5.

var cgTools = [
    'C67P',    // Add this


Modify the setState function to check if the selected target(s) have a matching 'C67P' cgTools.

if (!C6x && (wizard_constants.cgTools[i] == 'C64P' || wizard_constants.cgTools[i] == 'C674' || wizard_constants.cgTools[i] == 'C66'
    /* Add this: */ || wizard_constants.cgTools[i] == 'C67P')) {


Modify the createFiles function to check if the selected target(s) have a matching 'C67P' cgTools.

if (!C6x && (algObj.targets[i].cgTools == 'C64P' || algObj.targets[i].cgTools == 'C674' || algObj.targets[i].cgTools == 'C66'
    /* Add this: */ || algObj.targets[i].cgTools == 'C67P')) {


1. Add to the declarations:

% var C67P = false;

2. Add this conditional assignment to the % for (var i = 0; i < this.targets.length; i++) { loop:

%     else if (!C67P && this.targets[i].cgTools == 'C67P') {
%         C67P = true;
%     }

3. Add to the _rootdir declarations:

% if (C67P) {
var C67P_rootdir;
% }

4. Add to the _rootdir assignments:

% if (C67P) {
    if (arguments[x].match(/^CGTOOLS_C67P=/)) {
        C67P_rootdir = arguments[x].split("=")[1];
% }

5. Add this conditional targ.rootDir assignment to the % for (var i = 0; i < this.targets.length; i++) { loop.

% else if (this.targets[i].cgTools == 'C67P') {
targ.rootDir = C67P_rootdir;
% }


1. Add to the declarations:

% var C67P = false;

2. In the % for (var i = 0; i < this.targets.length; i++) { loop, add the condtional assignment:

%     else if (!C67P && this.targets[i].cgTools == 'C67P') {
%         C67P = true;
%     }

3. Add a C67P conditon to the CODEGEN_INSTALL_DIR assignment:

% if (C64P || C674 || C66 || C67P) {
% }

4. Add the conditional CGTOOLS_C67P assignment and xdcArgs append:

% if (C67P) {
%     xdcArgs += ' CGTOOLS_C67P=\\"$(CGTOOLS_C67P)\\"';
% }

See also

XDAIS Digital Media (XDM) Standard User's Guide

Other FAQs