| var Stack = xdc.useModule('local.runtime.utils.Stack'); |
| var Radio = xdc.useModule('local.rf.Radio'); |
| var Bsp = xdc.useModule('local.rf.Bsp'); |
| var Settings = xdc.useModule("local.rf.Settings"); |
| Settings.type = Settings.END_DEVICE; |
| |
| var Main = xdc.useModule("xdc.runtime.Main"); |
| var Diags = xdc.useModule("xdc.runtime.Diags"); |
| |
| /* use LoggerCallback so we can handle events in the app */ |
| var Logger = xdc.useModule("local.runtime.LoggerCallback"); |
| Logger.callbackFxn = "&loggerCallback"; |
| |
| /* create and bind a logger for all non-module code */ |
| Main.common$.logger = Logger.create(); |
| Main.common$.diags_ENTRY = Diags.ALWAYS_ON; |
| Main.common$.diags_USER1 = Diags.ALWAYS_ON; |
| |
| /* use the same logger for the Radio, but enable runtime switch */ |
| Radio.common$.logger = Main.common$.logger; |
| Radio.common$.diags_ENTRY = Diags.RUNTIME_OFF; |
| Radio.common$.diags_EXIT = Diags.RUNTIME_OFF; |
| Radio.common$.diags_USER1 = Diags.ALWAYS_OFF; |
| Radio.common$.namedModule = true; |
| |
| /* minimize footprint */ |
| Program.argSize = 0; |
| Program.heap = 0; |
| Program.stack = 0x100; |
| |
| var Err = xdc.useModule("xdc.runtime.Error"); |
| Err.raiseHook = null; |
| |
| var Defaults = xdc.useModule("xdc.runtime.Defaults"); |
| Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; |
| Defaults.common$.fxntab = false; |
| Defaults.common$.memoryPolicy = xdc.module('xdc.runtime.Types').STATIC_POLICY; |
| Defaults.common$.namedModule = false; |
| |
| var SysUart = xdc.useModule("local.runtime.SysUart"); |
| |
| var System = xdc.useModule("xdc.runtime.System"); |
| System.SupportProxy = SysUart; |
| System.maxAtexitHandlers = 0; |
| |
| var Text = xdc.useModule("xdc.runtime.Text"); |
| Text.isLoaded = false; |
| |