collab/mm20

git clone https://git.julia.blue/collab/mm20

Allen Jiangmodify codeed897ff

firmware
2.4 KiB78 linesraw
1/* THIS IS A GENERATED FILE -- DO NOT EDIT */
2
3var targ = xdc.module('ti.targets.arm.elf.M4F');
4/* configuro was told the platform explicitly */
5var platform = 'ti.platforms.tiva:TM4C123GH6PM';
6
7/* decide whether to make an assembly or an executable */
8var makeAssembly = false;
9
10
11var Executable = xdc.module('xdc.bld.Executable');
12
13var exeOpts = new Executable.Attrs({
14        cfgScript: 'C:/Users/Allen/Documents/GitHub/mm20/CCS/mm/gpiointerrupt.cfg',
15        profile: 'release',
16        cfgHome: 'configPkg',
17});
18
19exeOpts.cfgArgs = 'null';
20exeOpts.cfgArgsEncoded = true;
21
22var exe = Pkg[makeAssembly ? 'addAssembly': 'addExecutable'](
23    'gpiointerrupt',
24    targ,
25    platform,
26    exeOpts
27);
28
29/*
30 * Generate the compiler.opt file
31 * Do this here instead of during the initial creation of the configuro
32 * package, because the contents of any config.bld script are unknown
33 * at that time. Config.bld can't be executed until the XDC build phase.
34 */
35if (makeAssembly) {
36    var suffix = targ.dllExt || '.p' + targ.suffix;
37}
38else {
39    var suffix = '.p' + targ.suffix;
40}
41
42var thisObj = {
43    cfg:        '../gpiointerrupt.cfg',
44    outputPath: 'C:/Users/Allen/Documents/GitHub/mm20/CCS/mm/Debug/configPkg',
45    exeName:    'gpiointerrupt' + suffix,
46    exeIntName: 'gpiointerrupt' + suffix.replace('.', '_'),
47    targ:       targ,
48    linkerCommandFile: 'linker.cmd',
49    compilerOptFile: 'compiler.opt',
50    compilerDefsFile: 'compiler.opt' + ".defs",
51    makeAssembly: makeAssembly
52};
53var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/compiler.opt.xdt');
54tmpl.genFile('compiler.opt', thisObj, [], false);
55
56/*
57 * Generate the custom makefile.
58 */
59var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/' + 
60    (makeAssembly? 'custom.mak.asm.xdt' : 'custom.mak.exe.xdt'));
61tmpl.genFile('custom.mak', thisObj, [], false);
62Pkg.makeEpilogue = "include custom.mak";
63
64/*
65 * Generate the package script.
66 */
67var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/package.xs.xdt');
68tmpl.genFile('package.xs', thisObj, [], false);
69
70if (makeAssembly) {
71/*
72 * Generate the linker options into a staging file, so that the presence or
73 * age of the advertised linker command file can be the makefile trigger to
74 * rebuild the package from the user's config script.
75 */
76    var tmpl = xdc.loadTemplate('xdc/tools/configuro/template/linker.cmd.asm.xdt');
77    tmpl.genFile('linker.cmd.cp', thisObj, [], false);
78}