author | Chris Ring <cring@ti.com> | |
Fri, 11 Jul 2014 05:19:11 +0000 (22:19 -0700) | ||
committer | Chris Ring <cring@ti.com> | |
Fri, 11 Jul 2014 05:19:11 +0000 (22:19 -0700) |
packages/ti/deh/Deh.xs | patch | blob | history |
diff --git a/packages/ti/deh/Deh.xs b/packages/ti/deh/Deh.xs
index ab4911af95373cc75042322091f039374edf7c6f..baa024d8b4949e224f5f1e4ae468bd4b6b61631a 100644 (file)
--- a/packages/ti/deh/Deh.xs
+++ b/packages/ti/deh/Deh.xs
var Deh = null;
var MultiProc = null;
-var Hwi = null;
+
+function module$meta$init()
+{
+ var Settings = xdc.module("ti.sysbios.family.Settings");
+ var Hwi;
+
+ /* Only process during "cfg" phase */
+ if (xdc.om.$name != "cfg") {
+ return;
+ }
+
+ Deh = this;
+
+ /*
+ * It's possible for the Hwi delegate to later be assigned to something
+ * other than what it is at the time of this method's execution, but
+ * we know there exists only one that can be used at the time of this
+ * comment's writing (SYS/BIOS will never have more than one for a
+ * particular architecture). If another choice comes into existence
+ * at some future time then we must take that into account here, since
+ * the Hwi delegate to which we're assigning here might not be the one
+ * in use at the end of the configuration.
+ */
+ Hwi = xdc.useModule(Settings.getDefaultHwiDelegate());
+ if ((Program.build.target.name.match(/M3/)) ||
+ (Program.build.target.name.match(/M4/))) {
+ /* Need to do this early before it gets sealed */
+ Hwi.excHandlerFunc = Deh.excHandler;
+ }
+}
/*
* ======== module$use ========
var Swi = null;
var Task = null;
var Exception = null;
- var Settings = xdc.module("ti.sysbios.family.Settings");
-
- Deh = this;
xdc.useModule('xdc.runtime.System');
- Hwi = xdc.useModule(Settings.getDefaultHwiDelegate());
MultiProc = xdc.module('ti.sdo.utils.MultiProc');
if ((Program.build.target.name.match(/C64T/)) ||
else {
mod.isrStackSize = Program.stack;
mod.isrStackBase = $externPtr('__TI_STACK_BASE');
- Hwi.excHandlerFunc = Deh.excHandler;
}
}