cancel
Showing results for 
Search instead for 
Did you mean: 

why does cubemx has no support for Freertos mailbox cues

MK..1
Associate III

Hi

why is it not possible to configure mailbox queues in Cube graphically?

Shoudl they be avioded from the toolchain prespective?

Thx

3 REPLIES 3
Bob S
Principal

FreeRTOS does not provide a "mailbox" container. Mailboxes are typically constructed by combining a queue and a mutex. You need to make your own mailbox from the FreeRTOS primitives. You can configure the queue and mutex in CubeMX, but combining them into a mailbox is your own responsibility.

MK..1
Associate III

Hi @Bob S​ 

 osMailQDef (objectPoolQ, 10, MEM_memberTypeDef); // Declare mail queue

 osMessageQDef(myQueue01, 16, uint16_t);

you want to say osMailQDef is a wrapper for mailboxes?

Bob S
Principal

ST's FreeRTOS port only supports mail queues in CMSIS v1. CMSIS v2 has some defines/declarations in cmsis_os.h, but it doesn't look like there is any code in cmsis_os.c to support them. Yes, even when using CMSIS V1, CubeMX doesn't give you the option to create/configure them. However, looking at the CMSIS V1 code, the osMailXXXX functions are pretty much just wrappers for regular FreeeRTOS queues.

So unless you are porting existing code that uses osMail functions, why not just use queues?