Compiler: [CC2640]How to use NOINIT on stack 4.2

Tool/software: TI C/C++ Compiler

Hi All

I have a case need to upgrade stack4.0 to stack4.2.

I have two versions of CCS(7.4 and 8.1) in different PC.

Then add "pargma NOINIT" in the glucose sample code of stack 4.0 & 4.2

In stack 4.0 is success.(sample code not modified)

In Stack 4.2, glucose sample code, CCS7.4 & 8.1
<main.c>
#pragma NOINIT (GLUValue)
uint8_t GLUValue;
.......
int main()
{
     RegisterAssertCback()
     PIN_init()
     ICall_init()
     ICall_createRemoteTask()
     GAPRole_createTask()

GLUValue = 1;   <== if have assign value, The program will stop in create task.

     GlucoseSensor_createTask()
     BIOS_start()
     return 0;
}


<glucose.c>
GlucoseSensor_createTask(void)
{
          .........
          Task_construct(&glucoseTask, GlucoseSensor_taskFxn, &taskParams, NULL);  <== stop here(CCS 7.4 & 8.1 are the same )
}

---------------------------

Have tried to tune the optimization leve on CCS. The same situation.

What should I do?

3 Replies