This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

idata

Hello,

Q1: This is a part of my project code flow explanation. I want to allocate seperate memory location in internal data for the formal parameter local variable - lid. How is it possible using Keil options. By default, it is being allocated in the overlaid DATA_GROUP . I cannot use NOOVERLAY, as the runLineTask() routine is too large.

void runLineTask(unsigned char volatile lid)    //this runs forever
{
        unsigned char volatile idata i;

        switch(stateChange[lid])//depending on the change in state, a case is selected
                                // and its related piece of code is executed
        {
                case ON:

                case OFF:

                .       .
                .       .
                .       .

                default: -----
        }

        -----
        -----
        -----
        -----
}

void main(void)
{
        --      //The basic hardware initialization and variables dseclaration
        --      // is done here
        --
        --
        while(1)//this is the loop which runs forever in real-time
        {
                for(i=0;i<NUM_TASKS;i++) //NUM_TASKS = 10
                        runLineTask(i);
        }

        --
        --
        --
}

Q2: What are the overhead problems on the controller if we use idata type for most most frequently used local variables (in while loops) in my project code?

Please advise.

0