| var System = xdc.useModule('xdc.runtime.System'); |
| |
| if (Program.cpu.deviceName.match(/MSP430/)) { |
| /* SysUart only works on MSP430 */ |
| var SysUart = xdc.useModule("local.runtime.SysUart"); |
| System.SupportProxy = SysUart; |
| Program.heap = 0; /* don't need heap for this app */ |
| Program.stack = 0x100; /* don't need much stack for this app */ |
| } |
| |
| /* minimize footprint for resource constrained targets */ |
| System.maxAtexitHandlers = 0; /* save 20B RAM; don't need atexit() */ |
| Program.argSize = 0; /* don't need arc/argv support */ |
| |
| /* set STATIC_POLICY, runtime creation support/overhead is eliminated */ |
| var Types = xdc.useModule('xdc.runtime.Types'); |
| var Defaults = xdc.useModule("xdc.runtime.Defaults"); |
| Defaults.common$.memoryPolicy = Types.STATIC_POLICY; |
| Defaults.common$.fxntab = false; |
| |
| /* the following saves almost 1KB of code (strings are eliminated) */ |
| var Text = xdc.useModule("xdc.runtime.Text"); |
| Text.isLoaded = false; |