| var System = xdc.useModule("xdc.runtime.System"); |
| var Clock = xdc.useModule("local.runtime.utils.Clock"); |
| |
| /* minimize footprint for MSP430 targets */ |
| if (Program.build.target.isa.match(/430/)) { |
| print("optimizing footprint for the MSP430 ..."); |
| Program.argSize = 0; /* don't need arc/argv support */ |
| Program.stack = 0x100; /* don't need much stack for this app */ |
| Program.heap = 0; /* don't need any heap from the runtime */ |
| |
| /* set STATIC_POLICY, runtime creation support/overhead is eliminated */ |
| var Types = xdc.module('xdc.runtime.Types'); |
| var Defaults = xdc.useModule("xdc.runtime.Defaults"); |
| Defaults.common$.memoryPolicy = Types.STATIC_POLICY; |
| |
| /* use SysUart to eliminate buffers used by SysMin/SysStd */ |
| var SysUart = xdc.useModule("local.runtime.SysUart"); |
| |
| System.SupportProxy = SysUart; |
| System.maxAtexitHandlers = 0; /* save 20B RAM; don't need atexit() */ |
| |
| /* the following saves almost 1KB of FLASH (strings are eliminated) */ |
| var Text = xdc.useModule("xdc.runtime.Text"); |
| Text.isLoaded = false; |
| } |