| Pkg.uses = ["ti/apps/msp430"]; |
| |
| /* get SimpliciTI build options support */ |
| BuildOpts = xdc.module('local.rf.BuildOpts'); |
| |
| /* SimpliciTI is installed relative to local.runtime.rf's repository */ |
| BuildOpts.rootDir = BuildOpts.$package.packageRepository |
| + "../SimpliciTI-CCE-1.1.0/Components"; |
| |
| /* tell make how to find the SimpliciTI sources */ |
| Pkg.makePrologue = BuildOpts.getMakePrologue(); |
| |
| /* select radio and mcu device */ |
| BuildOpts.mcu = BuildOpts.MSP430F2274; |
| BuildOpts.radio = BuildOpts.CC2500; |
| |
| /* create build options for an End Device */ |
| var ed = BuildOpts.create({ |
| maxHopCount: 3, |
| maxHopFromAP: 1, |
| maxAppPayload: 10, |
| linkToken: 0x01020304, |
| joinToken: 0x05060708, |
| |
| deviceType: BuildOpts.END_DEVICE, |
| numConnections: 2, |
| inFrameQSize: 2, |
| outFrameQSize: 2, |
| deviceAddress: "{0x77, 0x56, 0x34, 0x12}", |
| rxMode: BuildOpts.RX_ALWAYS |
| }); |
| |
| /* build End Device library and two peer End Device apps */ |
| for (var i = 0; i < Build.targets.length; i++) { |
| var targ = Build.targets[i]; |
| |
| if (targ.isa.match(/430/)) { |
| var lib = Pkg.addLibrary("lib/ed", targ, { |
| incs: ed.getIncs(), |
| defs: ed.getDefs()}); |
| lib.addObjects(BuildOpts.SRCS); |
| |
| var talk = Pkg.addExecutable("talk", targ, targ.platform); |
| talk.addObjects(["talk.c"]); |
| |
| var listen = Pkg.addExecutable("listen", targ, targ.platform); |
| listen.addObjects(["listen.c"]); |
| } |
| } |