summaryrefslogtreecommitdiff
path: root/recipes/ti/files/config.bld
blob: 2e99cab0b00a5fac05b52b227919dff2fa258f46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* 
 * CROSS_DIR   - toolchain installation location
 * PLATFORM    - platform to be build
 * doBuildArm  - true (to build arm)
 * doBuildDsp  - true (to build dsp)
 * buildDualCpu - build example for dual cpu 
 */
       
var buildTable = {
    "Arm":    [{doBuild: doBuildArm,
                target:  "gnu.targets.arm.GCArmv5T",
                cgtoolsRootDir: "CROSS_DIR",
                platforms: [ 
                  {platform: "PLATFORM", dualCpu: buildDualCpu, outDir: "bin/PLATFORM"},
                ],
              }],
    "DSP":    [{doBuild: doBuildDsp, 
                target:  "ti.targets.C64P",
                cgtoolsRootDir: "TICGTOOLSDIR",
                platforms: [ 
                  {platform: "PLATFORM", outDir: "bin/PLATFORM"},
                ],
              }]

};

var targets = [];
var userbldBuildPlatforms = {};
for each (var cpu in buildTable) {
    for (var t = 0; t < cpu.length; t++) {
        if (cpu[t].doBuild) {
            var targ = xdc.useModule(cpu[t].target);
            targets.push(targ);
            targ.rootDir = cpu[t].cgtoolsRootDir;
            userbldBuildPlatforms[targ.name] = cpu[t].platforms;
        }
    }
}

Build.targets = targets;
for (var i = 0; i < Build.targets.length; i++) {
    var t = targets[i];

    if (t.name == "GCArmv5T") {
    t.LONGNAME = "bin/CROSS_PREFIX";
    }
}