This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C2000 v6.4.9: volatile variable not showing up in memory map

Guru 20045 points

Hello,

A variable defined as volatile static Uint16 u16SineWaveIndex = 0; is not showing up in the memory map file.  u16SineWaveIndex  is used in an inlined function and that function is also used in an inlined function (please see example code below that describes the situation).   the optimization is set to "whole program".

Why isn't the function showing up in the memory map?

Stephen

volatile static Uint16 u16SineWaveIndex = 0;

__inline void function1(void)
{
    u16SineWaveIndex++;
}

__inline void function2(void)
{
    function1();
}

int main(void)
{
    function2();
}