Cannot debug in Embedded GDB mode

No… ADL is event-driven, functioning on callbacks.
To setup the timer, you need to:

  • put a timer subscription (with a callback function!) in your task initialization function, and just return.
  • move all your processing to the callback function

Just have a look to the hello world sample to see how it works…

I thought there would be no problem as far as my generated.c looks like this:

const adl_InitTasks_t adl_InitTasks [] =
{
{ iqm2m_init, 3072, “main”, 2 },// my library initialization function
{ main_task, 3072, “task1”, 1 }, //task execution(just write some messages to the console)

{ 0, 0, 0, 0 }

};

Now main_task looks do this:

void main_task ( adl_InitType_e InitType )
{
adl_tmr_t *tt;

tt = adl_tmrSubscribe ( FALSE,
30,
ADL_TMR_TYPE_100MS,
tmr_handler);
}

and tmr_handler prints the messages to console. Neither it stops in the breakpoints, nor it prints any message. :blush:

3s sounds a little bit short for breakpoint…
For the messages, can’t imagine any reason; maybe try to compare with Hello World app?

You were right, with 30 seconds it start to work, even with 10 looks to be enough, I hope this will help me with other problems. Thank you!