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.

Created Task never gets called after changing ICALL_STACK0_ADDR

Other Parts Discussed in Thread: CC2640

Hi

My setup:

CC2640

IAR workbench 7.50

SimpleBLE-project.

I compiled TI BLE stack with setting

-DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG

To be able to compile that I needed to increase the used stack Flash size. So I changed:

in IAR-boundary.bdef:    -D ICALL_STACK0_ADDR=0x0000D000

in IAR-boundary.xcl

--config_def ICALL_STACK0_ADDR=0x0000D000
--config_def ICALL_RAM0_ADDR=0x200043C4

Everything compiles well

But when debugging i notice that my created Task (scheduler_taskFxn)never gets called.

This is how I create the task.

#define SCHEDULER_TASK_STACK_SIZE       800
#define SCHEDULER_TASK_PRIORITY         2
Char schedulerTaskStack[SCHEDULER_TASK_STACK_SIZE];

void SchedulerTask_Create(void) { Task_Params taskParams; // Configure task Task_Params_init(&taskParams); taskParams.stack = schedulerTaskStack; taskParams.stackSize = SCHEDULER_TASK_STACK_SIZE; taskParams.priority = SCHEDULER_TASK_PRIORITY; Task_construct(&schedulerTask, scheduler_taskFxn, &taskParams, NULL); }

  • Hi Harsmar,

    Can you check the Task view in ROV and determine the state (ready, running, blocked, ...) of different tasks in the system ? What state is the scheculerTask in ?

    Also, can you share what version of TI-RTOS are you using ?

    Best,
    Ashish
  • My tasks. See above. Task is created.

    Also notified that when halting debugger I get this error.

    Tue Jun 21, 2016 15:14:16: The stack pointer for stack 'CSTACK' (currently 0x20001F18) is outside the stack range (0x20003FC0 to 0x200043C0)

    I guess this is the reason that the task never gets called.

    Do you have any ideas how CSTACK pointer can be way off?

  • The CSTACK error may not be relevant here. IAR does not know about the per Task stacks. It is only aware of the system stack and is probably trying to comparing SP against system stack range.

    Something seems off in the Task ROV view. More than one task is in the running state which is not possible. Can you share the detailed Task view ? Also, is it possible for you to share an application that we can use to reproduce this on our end ?

    Thanks,

    Ashish