[sub1ghz-sensor-to-cloud/tida01476.git] / sensor_cc1310lp / TIDA00488 / configPkg / package / cfg / app_pem3.cfg
1 /*
2 * ======== package/cfg/app_pem3.cfg ========
3 * This generated configuration script runs the user's configuration script
4 * the context of a specific target and platform in order to generate
5 * all the files necessary to create an executable; e.g., linker command
6 * files, static C/C++ data structures, etc.
7 */
9 /*
10 * ======== _applyChanges ========
11 * Changes that bring the build target to the state at the end of the build
12 * model
13 */
14 function _applyChanges(obj, chgObj) {
15 var wasSealed = false;
16 if (obj.$sealed) {
17 wasSealed = true;
18 obj.$unseal();
19 }
20 for (var prop in chgObj) {
21 if (typeof obj[prop] == 'object' && obj[prop] != undefined) {
22 if ("$category" in obj[prop] && obj[prop].$category == "Vector") {
23 obj[prop].length = chgObj[prop].length;
24 for (var i = 0; i < chgObj[prop].length; i++) {
25 if (obj[prop].length < i + 1) {
26 obj[prop].length++;
27 }
28 obj[prop][i] = chgObj[prop][i];
29 }
30 }
31 else {
32 _applyChanges(obj[prop], chgObj[prop]);
33 }
34 }
35 else {
36 obj[prop] = chgObj[prop];
37 }
38 }
39 if (wasSealed) {
40 obj.$seal();
41 }
42 }
44 /*
45 * ======== _runescape ========
46 * Recursive unescape to decode serialized strings
47 */
48 function _runescape(obj) {
49 for (var i in obj) {
50 if (obj[i] != null) {
51 if (typeof obj[i] == 'string') {
52 obj[i] = unescape(obj[i]);
53 }
54 else if (typeof obj[i] == 'object') {
55 _runescape(obj[i]);
56 }
57 }
58 }
59 }
61 /*
62 * ======== _getPlatCfg ========
63 */
64 function _getPlatCfg() {
65 var tmp = {};
66 _runescape(tmp);
67 return (tmp);
68 }
69 /*
70 * ======== _cfginit ========
71 */
72 function _cfginit() {
73 xdc.loadPackage('xdc.services.intern.cmd');
74 var prog = xdc.om['xdc.cfg.Program'];
76 /* initialize prog attrs from build model */
77 var build = {
78 profile: "release",
79 cfgScript: "C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/Tools/app.cfg",
80 cfgHome: "configPkg",
81 cfgArgs: "USE_UART_PRINTF%253D0",
82 cfgArgsEncoded: true,
83 releases: {
84 0: {
85 name: "configPkg",
86 attrs: {
87 prefix: "",
88 label: "default"
89 },
90 otherFiles: {},
91 excludeDirs: {}
92 }
93 },
94 prelink: false
95 };
96 _runescape(build);
97 build.cfgArgs = USE_UART_PRINTF=0;
98 build.target = xdc.module("ti.targets.arm.elf.M3");
99 var targChange = {
100 platforms: [
101 "ti.platforms.simCM3"
102 ],
103 version: "ti.targets.arm.elf.M3%7B1%2C0%2C16.9%2C2",
104 extensions: {
105 ".sem3e": {
106 suf: ".sem3e",
107 typ: "asm"
108 },
109 ".sem3": {
110 suf: ".sem3",
111 typ: "asm"
112 },
113 ".sv7M": {
114 suf: ".sv7M",
115 typ: "asm"
116 }
117 },
118 rootDir: "C%3A/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.2.LTS",
119 ccOpts: {
120 prefix: "-mv7M3%20--code_state%3D16%20--float_support%3Dvfplib%20-me%20-O4%20--opt_for_speed%3D0%20--include_path%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp%22%20--include_path%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/Application%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common/boards%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common/boards/CC1350_LAUNCHXL%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common/boards/CC1310_CC1190%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common/api/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common/util%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/common/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/stack/src%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/ti154stack/stack/tirtos/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/heapmgr%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/hal/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/hal/src/target/_common%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/hal/src/target/_common/cc13xx%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/icall/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/osal/src/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/services/src/aes%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/services/src/appasrt%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/services/src/nv%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/services/src/nv/cc26xx%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/services/src/saddr%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/services/src/sdata%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/stack/src/icall%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/fh%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/high_level%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/inc/cc13xx%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/low_level/cc13xx%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/tracer%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/uble/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/ti154mac/uble/controller/inc%22%20--include_path%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/Application/microBLE%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/devices/cc13x0%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/devices/cc13x0/inc%22%20--include_path%3D%22C%3A/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/devices/cc13x0/driverlib%22%20--include_path%3D%22C%3A/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.2.LTS/include%22%20--preinclude%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/Application/features.h%22%20--define%3DTIDA00488%20--define%3DLIGHT_SENSOR%20--define%3DHUMIDITY_SENSOR%20--define%3DTEMP_SENSOR%20--define%3DAUTO_START%20--define%3DxASSERT_LEDS%20--define%3DNV_RESTORE%20--define%3DRF_MULTI_MODE%20--define%3DFEATURE_FH_OPT%20--define%3DPOWER_MEAS%20--define%3DMAC_PNM_MAX_NUMBER_OF_NODE%3D3%20--define%3DMAX_DEVICE_TABLE_ENTRIES%3D3%20--define%3DxTI_DRIVERS_LCD_INCLUDED%20--define%3DxUSE_UART_PRINTF%20--define%3DBOARD_DISPLAY_EXCLUDE_UART%20--define%3DONE_PAGE_NV%20--define%3DONE_PAGE_NV_FULL_HDR%20--define%3DDEVICE_FAMILY%3Dcc13x0%20--define%3DxCC13XX_LAUNCHXL%20--define%3DMODULE_CC13XX_7X7%20--define%3DCCFG_FORCE_VDDR_HH%3D0%20--define%3DxSET_CCFG_BL_CONFIG_BL_LEVEL%3D0x00%20--define%3DxSET_CCFG_BL_CONFIG_BL_ENABLE%3D0xC5%20--define%3DxSET_CCFG_BL_CONFIG_BL_PIN_NUMBER%3D0x0D%20--define%3DxSET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE%3D0xC5%20--define%3DHEAPMGR_SIZE%3D0%20--define%3DUSE_ICALL%20--define%3DSTACK_LIBRARY%20--define%3DICALL_LITE%20--define%3DRCN_APP_ASSERT%20--define%3DHAL_ASSERT_SPIN%20--define%3DICALL_HOOK_ABORT_FUNC%3DhalAssertHandler%20--define%3Dxdc_runtime_Log_DISABLE_ALL%20--define%3Dxdc_runtime_Assert_DISABLE_ALL%20--define%3DxPREAMBLE_COMPATIBILITY%20--define%3DFEATURE_ENHANCED_ACK%20--define%3DFEATURE_SYSTEM_STATS%20--c99%20--plain_char%3Dunsigned%20--diag_warning%3D225%20--diag_wrap%3Doff%20--display_error_number%20--gen_func_subsections%3Don%20--embedded_constants%3Don%20--unaligned_access%3Don%20--enum_type%3Dpacked%20--wchar_t%3D16%20--abi%3Deabi%20--common%3Don%20--fp_reassoc%3Doff%20--sat_reassoc%3Doff%20--asm_directory%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/TIDA00488%22%20--list_directory%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/TIDA00488/obj%22%20--obj_directory%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/TIDA00488/obj%22%20--temp_directory%3D%22C%3A/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/TIDA00488%22%20%20%20-qq%20-pdsw225"
121 },
122 rawVersion: "16.9.2"
123 };
124 _runescape(targChange);
125 _applyChanges(build.target, targChange);
127 prog.build = build;
129 prog.name = "app.xem3";
130 prog.cfgBase = "package/cfg/app_pem3";
132 prog.endian = prog.build.target.model.endian;
133 prog.codeModel = prog.build.target.model.codeModel;
135 /* use the platform package's Platform module */
136 var Platform = xdc.useModule("ti.platforms.simplelink.Platform");
137 var platParams = _getPlatCfg();
138 var invalidParams = [];
139 for (var prop in platParams) {
140 if (!(prop in Platform.PARAMS)) {
141 delete platParams[prop];
142 invalidParams.push(prop);
143 }
144 }
145 prog.platformName = "ti.platforms.simplelink:CC1350F128";
146 prog.platform = Platform.create("CC1350F128", platParams);
147 for (var i = 0; i < invalidParams.length; i++) {
148 Platform.$logWarning("The parameter '" + invalidParams[i] + "' is " +
149 "passed to this platform instance through Build.platformTable, " +
150 "but the instance does not have a configuration parameter with " +
151 "that name.", prog.platform, "CC1350F128");
152 }
154 /* record the executable's package name */
155 prog.buildPackage = "configPkg";
157 /* record build-model information required during config generation */
158 prog.$$bind("$$isasm", 0);
159 prog.$$bind("$$isrom", 0);
160 prog.$$bind("$$gentab", [
161 ]);
163 /* bind prog to an appropriate execution context */
164 prog.cpu = prog.platform.getExeContext(prog);
166 /* import the target's run-time support pkg */
167 xdc.loadPackage("ti.targets.arm.rtsarm");
168 }
170 /* function to import the cfg script's package */
171 function _userscript(script) {
172 var home;
173 var spath;
174 home = xdc.loadPackage("configPkg");
176 xdc.om.$$bind('$homepkg', home);
178 var cfgScript = "C:/Users/a0227110/Git/TI-15.4-Stack_Workspaces/TI-15-4_exampleApplications/sensor_cc1310lp/Tools/app.cfg";
179 if (!script) {
180 utils.loadCapsule(cfgScript, false, spath);
181 }
182 else {
183 /* set up the same environment that loadCapsule would */
184 var $saveCsd = utils.csd;
185 var $cfgFile = utils.findFile(cfgScript, spath);
186 var cname = cfgScript;
187 if ($cfgFile) {
188 $cfgFile = java.io.File($cfgFile);
189 utils.csd = $cfgFile.getParentFile().getCanonicalPath();
190 cname = "" + $cfgFile.getCanonicalPath();
191 }
193 /* create the capsule object */
194 var cap = {
195 prototype: utils.global,
196 $path: cname,
197 $private: {path: cname},
198 $capsule: undefined, /* set to cap below */
199 };
201 /* 'this.$capsule' is always cap object */
202 cap.$capsule = cap;
204 /* save the capsule object */
205 utils.$$capmap[cname] = cap;
207 try {
208 var cx =
209 Packages.org.mozilla.javascript.Context.getCurrentContext();
210 var rdr = new
211 java.io.BufferedReader(new java.io.StringReader(script));
212 Packages.config.Shell.evaluateLoad(cx, cap, rdr, cname, 1);
213 }
214 finally {
215 rdr.close();
216 utils.csd = $saveCsd;
217 }
218 }
219 }
221 function _postinit() {
222 var cout = null;
224 var Program = xdc.om['xdc.cfg.Program'];
225 /* get the exec command for this executable */
226 if (Program.execCmd == null) {
227 Program.execCmd = Program.platform.getExecCmd(Program,
228 xdc.om["ti.platforms.simplelink"].packageBase);
229 }
230 cout = "define EXEC." + Program.name + '\n\n';
231 cout += Program.execCmd;
232 cout += "\nendef\n\n";
234 /* if SourceDir generates a makefile, we need to run it */
235 _genSourceDirMak("package/cfg/app_pem3", "app.pem3");
237 utils.genDep("package/cfg/app_pem3", "configPkg", utils.loadedFiles, cout, null);
238 }
240 function _genSourceDirMak(cfgBase, cfgName)
241 {
242 var SourceDir = xdc.om['xdc.cfg.SourceDir'];
244 if (SourceDir && SourceDir.$instances.length > 0) {
245 /* construct rule to run SourceDir generated makefile */
246 var make = "\t$(MAKE) -f "
247 + SourceDir.outputDir + "/" + SourceDir.makefileName;
249 /* this file is included by package.mak (if it exists) */
250 var file = new java.io.File(cfgBase + ".cfg.mak");
251 file["delete"]();
252 var out = new java.io.BufferedWriter(new java.io.FileWriter(file));
254 /* add rules to run SourceDir generated makefile */
255 out.write("# invoke SourceDir generated makefile for " + cfgName
256 + "\n" + cfgName + ": .libraries," + cfgName
257 + "\n.libraries," + cfgName + ": " + cfgBase + ".xdl\n"
258 + make + "\n\n"
259 + "clean::\n" + make + " clean\n\n"
260 );
261 out.close();
262 out = null;
263 }
264 }