Tool/software: TI-RTOS
/* ================ General configuration ================ */ var Defaults = xdc.useModule('xdc.runtime.Defaults'); var Diags = xdc.useModule('xdc.runtime.Diags'); var Error = xdc.useModule('xdc.runtime.Error'); var Log = xdc.useModule('xdc.runtime.Log'); var Main = xdc.useModule('xdc.runtime.Main'); var Memory = xdc.useModule('xdc.runtime.Memory'); var System = xdc.useModule('xdc.runtime.System'); var Text = xdc.useModule('xdc.runtime.Text'); var BIOS = xdc.useModule('ti.sysbios.BIOS'); var Clock = xdc.useModule('ti.sysbios.knl.Clock'); var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); var Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); //var FatFS = xdc.useModule('ti.sysbios.fatfs.FatFS'); /* ================ System configuration ================ */ var SysMin = xdc.useModule('xdc.runtime.SysMin'); var Swi = xdc.useModule('ti.sysbios.knl.Swi'); System.SupportProxy = SysMin; /* ================ Logging configuration ================ */ var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup'); /* ================ Kernel configuration ================ */ /* Use Custom library */ var BIOS = xdc.useModule('ti.sysbios.BIOS'); BIOS.libType = BIOS.LibType_Custom; BIOS.logsEnabled = true; BIOS.assertsEnabled = true; var hwi0Params = new Hwi.Params(); hwi0Params.instance.name = "Timer_2A_INT"; Program.global.Timer_2A_INT = Hwi.create(39, "&Timer_ISR", hwi0Params); Program.stack = 1024; BIOS.heapSize = 0; BIOS.cpuFreq.lo = 40000000; var swi0Params = new Swi.Params(); swi0Params.instance.name = "LEDSwi"; swi0Params.priority = 1; Program.global.LEDSwi = Swi.create("&ledToggle", swi0Params); Swi.numPriorities = 32; LoggingSetup.sysbiosSwiLogging = true;