blob: 99fe092f6c123bba03f13af5647fe7224ff3ca15 [file] [log] [blame]
Pkg.uses = ["ti/apps/msp430"];
/* get SimpliciTI build options support */
BuildOpts = xdc.module('local.rf.BuildOpts');
/* SimpliciTI is installed relative to local.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
});
/* create build options for an Access Point */
var ap = BuildOpts.create({
maxHopCount: 3,
maxHopFromAP: 1,
maxAppPayload: 10,
linkToken: 0x01020304,
joinToken: 0x05060708,
deviceType: BuildOpts.ACCESS_POINT,
numConnections: 7,
inFrameQSize: 6,
outFrameQSize: 2,
deviceAddress: "{0x78, 0x56, 0x34, 0x12}",
isDataHub: true,
numStoreAndFwdClients: 3
});
/* build both the access point and end device libraries */
for (var i = 0; i < Build.targets.length; i++) {
var targ = Build.targets[i];
if (targ.isa.match(/430/)) {
var apLib = Pkg.addLibrary("lib/ap", targ, {
incs: ap.getIncs(),
defs: ap.getDefs()});
apLib.addObjects(BuildOpts.SRCS);
var edLib = Pkg.addLibrary("lib/ed", targ, {
incs: ed.getIncs(),
defs: ed.getDefs()});
edLib.addObjects(BuildOpts.SRCS);
}
}