| 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.ACCESS_POINT; |
| |
| var Main = xdc.useModule("xdc.runtime.Main"); |
| var Diags = xdc.useModule("xdc.runtime.Diags"); |
| |
| /* use the LoggerSys ILogger service provider */ |
| //var Logger = xdc.useModule("xdc.runtime.LoggerSys"); |
| var Logger = xdc.useModule("local.runtime.LoggerUart"); |
| |
| /* create and bind a logger for all non-module code */ |
| Main.common$.logger = Logger.create(); |
| Main.common$.diags_ENTRY = Diags.ALWAYS_ON; |
| |
| /* minimize footprint */ |
| Program.argSize = 0; |
| Program.heap = 0; |
| Program.stack = 0x110; |
| |
| 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; |
| |
| Main.common$.diags_USER1 = Diags.ALWAYS_ON; |
| |
| var SysUart = xdc.useModule("local.runtime.SysUart"); |
| SysUart.getLineFxn = "&uartRxCallback"; |
| |
| var System = xdc.useModule("xdc.runtime.System"); |
| System.SupportProxy = SysUart; |
| System.maxAtexitHandlers = 0; |
| |
| /* 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.RUNTIME_OFF; |
| //Radio.common$.diags_USER1 = Diags.ALWAYS_OFF; |
| Radio.common$.namedModule = true; |
| |
| Stack.common$.logger = Main.common$.logger; |
| Stack.common$.diags_EXIT = Diags.RUNTIME_OFF; |
| Stack.common$.namedModule = true; |
| |
| var Text = xdc.useModule("xdc.runtime.Text"); |
| Text.isLoaded = false; |
| |