summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e867eca)
raw | patch | inline | side by side (parent: e867eca)
author | Robert Tivy <rtivy@ti.com> | |
Thu, 7 May 2015 23:23:14 +0000 (16:23 -0700) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Fri, 8 May 2015 00:13:06 +0000 (17:13 -0700) |
Previously Watchdog.xs would cryptically error out if an unsupported
device tried to use Deh. This change produces a clean error statement.
device tried to use Deh. This change produces a clean error statement.
packages/ti/deh/Watchdog.xs | patch | blob | history |
index bf7c69d80d3584c5e7fe3ce8f4a6bbd83361a608..baa7aef440ad0e3aba1c03ede40a1e176992cd6f 100644 (file)
function module$use()
{
var device;
+ var found = false;
/* Only process during "cfg" phase */
if (xdc.om.$name != "cfg") {
Watchdog.timerSettings[i].clkCtrl = null;
Watchdog.timerSettings[i].intNum = device.intNum;
Watchdog.timerSettings[i].eventId = device.eventId;
+
+ found = true;
}
else {
print("Watchdog Timer configuration is not found for " +
"timer " + timerIds[id] + " for the specified device (" +
- Program.cpu.deviceName + ").");
+ Program.cpu.deviceName + "). Supported devices:");
for (device in deviceTable[catalogName]) {
print("\t" + device);
}
}
+ if (!found) {
+ print("Watchdog Timer configuration is not found for the specified " +
+ "device (" + Program.cpu.deviceName + "). Supported devices:");
+
+ for (device in deviceTable[catalogName]) {
+ print("\t" + device);
+ }
+
+ throw new Error ("Watchdog Timer unsupported on device!");
+ }
+
var Settings = xdc.module("ti.sysbios.family.Settings");
var Hwi = xdc.useModule(Settings.getDefaultHwiDelegate());