Not seeing Queue List (Other than TmrQ)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Not seeing Queue List (Other than TmrQ)

ソリューションへジャンプ
833件の閲覧回数
myke_predko
Senior Contributor III

Hopefully an easy one.  

I'm dealing with an apparent messaging issue and I want to see what's in a specific queue, but when I suspend execution (MCUXpresso v11.1.1) I don't get any informatino in the "Queue List (FreeRTOS)" tab except "TmrQ".  

I should point out that I've added Erich's code for listing tasks (Tutorial: Using Runtime Statistics with Amazon FreeRTOS V10) but queue information has never been presented.

I did do a search and it seems like when you suspend/pause execution, the queue information should be presented but I've never set it.  

Thanx,

myke

タグ(2)
0 件の賞賛
1 解決策
769件の閲覧回数
myke_predko
Senior Contributor III

Found it - you have to call the FreeRTOS "vQueuAddToRegistry" API after your "xQueueCreate" API call.  

If anybody cares, I define a structure with my queue information (along with pointers to the variables storing the handles):

typedef struct makeQueuesStruct {
  uint8_t queueName[20];
  QueueHandle_t* queueHandlePointer;
  UBaseType_t queueElements;
  UBaseType_t queueElementSize;
} makeQueues;
makeQueues makeQueuesArray[] =
//  "01234567890123456789"
{ { "flashQUEUE\0", &flashQUEUE_Handle, MAKEQUEUES_ELEMENTS, sizeof(struct flashQueueMsg) }
, { "flashRXQUEUE\0", &flashRXQUEUE_Handle, MAKEQUEUES_ELEMENTS, sizeof(struct flashQueueMsg) }
, { "panelQUEUE\0", &panelQUEUE_Handle, MAKEQUEUES_ELEMENTS, sizeof(struct panelQueueMsg) }
//... and so on through all the Queues
, { "\0", NULL, 0, 0 }
};

and then read through it, create the queues and then add to the registry:

for (i = 0; '\0' != makeQueuesArray[i].queueName[0]; ++i) {
  if (0 == (*makeQueuesArray[i].queueHandlePointer
                         = xQueueCreate(makeQueuesArray[i].queueElements
                                      , makeQueuesArray[i].queueElementSize))) {
#if (2 != SDK_DEBUGCONSOLE)
    PRINTF("Unable to Create \"%s\"\n"
         , makeQueuesArray[i].queueName);
#endif
    for (;;) { }
  }
  else {
    vQueueAddToRegistry(*makeQueuesArray[i].queueHandlePointer
                      , (const char*)makeQueuesArray[i].queueName);
  }
}

Works nicely and immediately helped me identify my error (two tasks that are blocked waiting for replies from each other - I didn't think through on one execution workflow).  

元の投稿で解決策を見る

0 件の賞賛
1 返信
770件の閲覧回数
myke_predko
Senior Contributor III

Found it - you have to call the FreeRTOS "vQueuAddToRegistry" API after your "xQueueCreate" API call.  

If anybody cares, I define a structure with my queue information (along with pointers to the variables storing the handles):

typedef struct makeQueuesStruct {
  uint8_t queueName[20];
  QueueHandle_t* queueHandlePointer;
  UBaseType_t queueElements;
  UBaseType_t queueElementSize;
} makeQueues;
makeQueues makeQueuesArray[] =
//  "01234567890123456789"
{ { "flashQUEUE\0", &flashQUEUE_Handle, MAKEQUEUES_ELEMENTS, sizeof(struct flashQueueMsg) }
, { "flashRXQUEUE\0", &flashRXQUEUE_Handle, MAKEQUEUES_ELEMENTS, sizeof(struct flashQueueMsg) }
, { "panelQUEUE\0", &panelQUEUE_Handle, MAKEQUEUES_ELEMENTS, sizeof(struct panelQueueMsg) }
//... and so on through all the Queues
, { "\0", NULL, 0, 0 }
};

and then read through it, create the queues and then add to the registry:

for (i = 0; '\0' != makeQueuesArray[i].queueName[0]; ++i) {
  if (0 == (*makeQueuesArray[i].queueHandlePointer
                         = xQueueCreate(makeQueuesArray[i].queueElements
                                      , makeQueuesArray[i].queueElementSize))) {
#if (2 != SDK_DEBUGCONSOLE)
    PRINTF("Unable to Create \"%s\"\n"
         , makeQueuesArray[i].queueName);
#endif
    for (;;) { }
  }
  else {
    vQueueAddToRegistry(*makeQueuesArray[i].queueHandlePointer
                      , (const char*)makeQueuesArray[i].queueName);
  }
}

Works nicely and immediately helped me identify my error (two tasks that are blocked waiting for replies from each other - I didn't think through on one execution workflow).  

0 件の賞賛