Hi I use Sysbios 6.41.00.26 and Tiva tm4c1231h6pge.
Whit ROV I can see that idle task has its own stack:
This idle task is 2048 bytes and after a normal usage of the firmware only 384 bytes are used.
I wonder how to reduce the idle task allocation.
my cfg fil is:
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 LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); var Main = xdc.useModule('xdc.runtime.Main'); var Memory = xdc.useModule('xdc.runtime.Memory') var Sys = xdc.useModule('xdc.runtime.SysMin'); var System = xdc.useModule('xdc.runtime.System'); var Text = xdc.useModule('xdc.runtime.Text'); var BIOS = xdc.useModule('ti.sysbios.BIOS'); var Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); var Clock = xdc.useModule('ti.sysbios.knl.Clock'); var Task = xdc.useModule('ti.sysbios.knl.Task'); var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS'); TIRTOS.libType = TIRTOS.LibType_NonInstrumented; TIRTOS.useUART = true TIRTOS.useI2C = true TIRTOS.useWatchdog = true var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi'); m3Hwi.resetVectorAddress = 0x2000; // New address /* * Program.argSize sets the size of the .args section. * The examples don't use command line args so argSize is set to 0. */ Program.argSize = 0x0; /* * Uncomment this line to globally disable Asserts. * All modules inherit the default from the 'Defaults' module. You * can override these defaults on a per-module basis using Module.common$. * Disabling Asserts will save code space and improve runtime performance. Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; */ /* * Uncomment this line to keep module names from being loaded on the target. * The module name strings are placed in the .const section. Setting this * parameter to false will save space in the .const section. Error and * Assert messages will contain an "unknown module" prefix instead * of the actual module name. Defaults.common$.namedModule = false; */ /* * Minimize exit handler array in System. The System module includes * an array of functions that are registered with System_atexit() to be * called by System_exit(). */ System.maxAtexitHandlers = 4; /* * Uncomment this line to disable the Error print function. * We lose error information when this is disabled since the errors are * not printed. Disabling the raiseHook will save some code space if * your app is not using System_printf() since the Error_print() function * calls System_printf(). Error.raiseHook = null; */ /* * Uncomment this line to keep Error, Assert, and Log strings from being * loaded on the target. These strings are placed in the .const section. * Setting this parameter to false will save space in the .const section. * Error, Assert and Log message will print raw ids and args instead of * a formatted message. Text.isLoaded = false; */ /* * Uncomment this line to disable the output of characters by SysMin * when the program exits. SysMin writes characters to a circular buffer. * This buffer can be viewed using the SysMin Output view in ROV. SysMin.flushAtExit = false; */ /* * The BIOS module will create the default heap for the system. * Specify the size of this default heap. */ /* create a default heap */ var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); var heapMemParams = new HeapMem.Params(); heapMemParams.size = 0x3800; var Memory = xdc.useModule('xdc.runtime.Memory'); Memory.defaultHeapInstance = HeapMem.create(heapMemParams); /* System stack size (used by ISRs and Swis) */ Program.stack = 0x0C00; /* * Create and install logger for the whole system */ var loggerBufParams = new LoggerBuf.Params(); loggerBufParams.numEntries = 32; var logger0 = LoggerBuf.create(loggerBufParams); Defaults.common$.logger = logger0; Main.common$.diags_INFO = Diags.ALWAYS_ON; System.SupportProxy = Sys; var Boot = xdc.useModule('ti.catalog.arm.cortexm4.tiva.ce.Boot'); Boot.enhancedClockMode = false; Boot.configureClock = false; Boot.configureLdo = false; Boot.pllBypass = true; Reset = xdc.useModule('xdc.runtime.Reset'); Reset.fxns[Reset.fxns.length++] = '&myResetFxn'; BIOS.cpuFreq.lo = 24576000; // Tell the Clock module that YOU are providing the periodic interrupt Clock.tickSource = Clock.TickSource_USER; // this example uses the ti.sysbios.timers.dmtimer.Timer module var Timer = xdc.useModule('ti.sysbios.family.arm.m3.Timer'); // create a dmtimer config parameter object var timerParams = new Timer.Params(); // make sure you set the period to 1000 us (1ms) timerParams.period = 1000; // custom dmtimer config parameters here... //timerParams.twer.ovf_wup_ena = 1; // Create the timer. // This example uses timer id 3. // The timer interrupt handler must be set to 'Clock.tick'. Timer.create(0, Clock.doTick, timerParams); var Idle = xdc.useModule('ti.sysbios.knl.Idle'); Idle.addFunc('&wdt_Man_idleFcnt'); // add wdt_Man_idleFcnt()
best regards
Max