blob: 569cb2402bbc6eed4d4638eafbb6686914206a0d [file] [log] [blame]
Pkg.uses = ["ti/apps/msp430"];
//Pkg.attrs.profile = "release";
//Pkg.attrs.copts = "--symdebug:dwarf";
/* 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;
/* set the maximum Radio message size */
var MAX_APP_PAYLOAD = 18;
/* create build options for an End Device */
var ed = BuildOpts.create({
maxHopCount: 3,
maxHopFromAP: 1,
maxAppPayload: MAX_APP_PAYLOAD,
linkToken: 0x01020304,
joinToken: 0x05060708,
frequencyAgility: true,
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: MAX_APP_PAYLOAD,
linkToken: 0x01020304,
joinToken: 0x05060708,
frequencyAgility: true,
deviceType: BuildOpts.ACCESS_POINT,
numConnections: 3,
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 lib = Pkg.addLibrary("lib/ed", targ, {
incs: ed.getIncs(),
defs: ed.getDefs()});
lib.addObjects(BuildOpts.SRCS);
lib = Pkg.addLibrary("lib/ap", targ, {
incs: ap.getIncs(),
defs: ap.getDefs()});
lib.addObjects(BuildOpts.SRCS);
var mon_AP = Pkg.addExecutable("mon_AP", targ, targ.platform);
mon_AP.addObjects(["mon_AP.c", "vlo_rand.s430"]);
var mon_ED = Pkg.addExecutable("mon_ED", targ, targ.platform);
mon_ED.addObjects(["mon_ED.c", "vlo_rand.s430"]);
}
}