fixed build errors for TI-RTOS.

This commit is contained in:
Vikram Adiga 2014-11-17 14:49:31 -08:00
parent 59e62b7c49
commit e0bec88f76
6 changed files with 65 additions and 53 deletions

1
tirtos/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
**/.xdcenv.mak

View File

@ -32,5 +32,5 @@ Included Files
Examples Application
--------------------
A simple 'TCP echo server with SSL' example application is provided with TI-RTOS
A simple 'TCP echo server with TLS' example application is provided with TI-RTOS
product. Look in the TI-RTOS user guide for instructions to build examples.

View File

@ -11,7 +11,7 @@ var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory');
var System = xdc.useModule('xdc.runtime.System');
var Text = xdc.useModule('xdc.runtime.Text');
var TimeStamp = xdc.useModule('xdc.runtime.Timestamp');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
@ -21,9 +21,20 @@ var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var Timer = xdc.useModule('ti.sysbios.hal.Timer');
BIOS.heapSize = 100000;
BIOS.heapSize = 86016;
Task.idleTaskStackSize = 768;
Program.stack = 2048;
/*
* Program.stack is ignored with IAR. Use the project options in
* IAR Embedded Workbench to alter the system stack size.
*/
if (!Program.build.target.$name.match(/iar/)) {
/*
* Reducing the system stack size (used by ISRs and Swis) to reduce
* RAM usage.
*/
Program.stack = 2048;
}
/* ================ System configuration ================ */
var SysMin = xdc.useModule('xdc.runtime.SysMin');
@ -38,8 +49,6 @@ if (Program.build.target.$name.match(/gnu/)) {
/* ================ NDK configuration ================ */
var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
var Ip = xdc.useModule('ti.ndk.config.Ip');
var Udp = xdc.useModule('ti.ndk.config.Udp');
var Tcp = xdc.useModule('ti.ndk.config.Tcp');
Global.IPv6 = false;
@ -57,11 +66,8 @@ Tcp.receiveBufSize = 1024;
/* ================ Driver configuration ================ */
var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
var EMAC = xdc.useModule('ti.drivers.EMAC');
EMAC.libType = EMAC.LibType_NonInstrumented;
var GPIO = xdc.useModule('ti.drivers.GPIO');
GPIO.libType = GPIO.LibType_NonInstrumented;
TIRTOS.useEMAC = true;
TIRTOS.useGPIO = true;
/* ================ CyaSSL configuration ================ */
try {

View File

@ -14,10 +14,10 @@ var Pkg = xdc.useModule('xdc.bld.PackageContents');
Pkg.makePrologue = "vpath %.c $(subst ;, ,$(XPKGPATH))";
var srcs = [
"main.c",
"ctaocrypt/benchmark/benchmark.c",
"examples/EK_TM4C1294XL/EK_TM4C1294XL.c",
];
"main.c",
"ctaocrypt/benchmark/benchmark.c",
"examples/boards/EK_TM4C1294XL/EK_TM4C1294XL.c",
];
for each (var targ in Build.targets) {
@ -28,26 +28,26 @@ for each (var targ in Build.targets) {
lnkOpts += " -x ";
}
else if (targ.$name.match(/^iar/)) {
lnkOpts = TivaWareDir + "/driverlib/ewarm/Exe/driverlib.a"
lnkOpts = TivaWareDir + "/driverlib/ewarm/Exe/driverlib.a"
+ " --config TM4C1294NC.icf";
platform = "ti.platforms.tiva:TM4C1294NCPDT";
platform = "ti.platforms.tiva:TM4C1294NCPDT";
/* Floating point print support */
var suffix = targ.$orig.lnkOpts.suffix;
targ.$orig.lnkOpts.suffix = suffix.replace(/PrintfSmall/, "PrintfFull");
/* Floating point print support */
var suffix = targ.$orig.lnkOpts.suffix;
targ.$orig.lnkOpts.suffix = suffix.replace(/PrintfSmall/, "PrintfFull");
}
else if (targ.$name.match(/^gnu/)) {
targ.$orig.lnkOpts.suffix += " -L" + TivaWareDir + "/driverlib/gcc " + " -Wl,--start-group -ldriver -Wl,--end-group ";
targ.$orig.lnkOpts.suffix += " -L" + TivaWareDir + "/driverlib/gcc "
+ " -Wl,--start-group -ldriver -Wl,--end-group ";
targ.$orig.bspLib = "rdimon";
}
var exeOptions = {incs: cyasslPathInclude
+ " -DNO_MAIN_DRIVER -D_INCLUDE_NIMU_CODE -DBENCH_EMBEDDED "
+ " -DTIVAWARE -DPART_TM4C1294NCPDT",
lopts: lnkOpts
};
var exeOptions = { incs: cyasslPathInclude
+ " -DNO_MAIN_DRIVER -D_INCLUDE_NIMU_CODE -DBENCH_EMBEDDED "
+ " -DTIVAWARE -DPART_TM4C1294NCPDT",
lopts: lnkOpts
};
var exe = Pkg.addExecutable("benchmark", targ,
platform, exeOptions);
var exe = Pkg.addExecutable("benchmark", targ, platform, exeOptions);
exe.addObjects(srcs);
}

View File

@ -14,10 +14,10 @@ var Pkg = xdc.useModule('xdc.bld.PackageContents');
Pkg.makePrologue = "vpath %.c $(subst ;, ,$(XPKGPATH))";
var srcs = [
"main.c",
"ctaocrypt/test/test.c",
"examples/EK_TM4C1294XL/EK_TM4C1294XL.c",
];
"main.c",
"ctaocrypt/test/test.c",
"examples/boards/EK_TM4C1294XL/EK_TM4C1294XL.c",
];
for each (var targ in Build.targets) {
@ -28,22 +28,22 @@ for each (var targ in Build.targets) {
lnkOpts += " -x ";
}
else if (targ.$name.match(/^iar/)) {
lnkOpts = TivaWareDir + "/driverlib/ewarm/Exe/driverlib.a"
lnkOpts = TivaWareDir + "/driverlib/ewarm/Exe/driverlib.a"
+ " --config TM4C1294NC.icf";
platform = "ti.platforms.tiva:TM4C1294NCPDT";
platform = "ti.platforms.tiva:TM4C1294NCPDT";
}
else if (targ.$name.match(/^gnu/)) {
targ.$orig.lnkOpts.suffix += " -L" + TivaWareDir + "/driverlib/gcc " + " -Wl,--start-group -ldriver -Wl,--end-group ";
targ.$orig.lnkOpts.suffix += " -L" + TivaWareDir + "/driverlib/gcc "
+ " -Wl,--start-group -ldriver -Wl,--end-group ";
targ.$orig.bspLib = "rdimon";
}
var exeOptions = {incs: cyasslPathInclude
+ " -DNO_MAIN_DRIVER -D_INCLUDE_NIMU_CODE -DBENCH_EMBEDDED "
+ " -DTIVAWARE -DPART_TM4C1294NCPDT",
lopts: lnkOpts,
};
var exeOptions = { incs: cyasslPathInclude
+ " -DNO_MAIN_DRIVER -D_INCLUDE_NIMU_CODE -DBENCH_EMBEDDED "
+ " -DTIVAWARE -DPART_TM4C1294NCPDT",
lopts: lnkOpts,
};
var exe = Pkg.addExecutable("test", targ,
platform, exeOptions);
var exe = Pkg.addExecutable("test", targ, platform, exeOptions);
exe.addObjects(srcs);
}

View File

@ -11,7 +11,7 @@ var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory');
var System = xdc.useModule('xdc.runtime.System');
var Text = xdc.useModule('xdc.runtime.Text');
var TimeStamp = xdc.useModule('xdc.runtime.Timestamp');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
@ -19,11 +19,21 @@ var Task = xdc.useModule('ti.sysbios.knl.Task');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var Timer = xdc.useModule('ti.sysbios.hal.Timer');
BIOS.heapSize = 100000;
BIOS.heapSize = 86016;
Task.idleTaskStackSize = 768;
Program.stack = 2048;
/*
* Program.stack is ignored with IAR. Use the project options in
* IAR Embedded Workbench to alter the system stack size.
*/
if (!Program.build.target.$name.match(/iar/)) {
/*
* Reducing the system stack size (used by ISRs and Swis) to reduce
* RAM usage.
*/
Program.stack = 2048;
}
/* ================ System configuration ================ */
var SysMin = xdc.useModule('xdc.runtime.SysMin');
@ -38,8 +48,6 @@ if (Program.build.target.$name.match(/gnu/)) {
/* ================ NDK configuration ================ */
var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
var Ip = xdc.useModule('ti.ndk.config.Ip');
var Udp = xdc.useModule('ti.ndk.config.Udp');
var Tcp = xdc.useModule('ti.ndk.config.Tcp');
Global.IPv6 = false;
@ -57,11 +65,8 @@ Tcp.receiveBufSize = 1024;
/* ================ Driver configuration ================ */
var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
var EMAC = xdc.useModule('ti.drivers.EMAC');
EMAC.libType = EMAC.LibType_NonInstrumented;
var GPIO = xdc.useModule('ti.drivers.GPIO');
GPIO.libType = GPIO.LibType_NonInstrumented;
TIRTOS.useEMAC = true;
TIRTOS.useGPIO = true;
/* ================ CyaSSL configuration ================ */
try {