cmsis_os add MailQueue

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
Bogdan
Posts: 12
Joined: Fri Apr 08, 2016 4:33 pm
Location: Ukraine Lviv
Contact:

cmsis_os add MailQueue

Postby Bogdan » Mon Feb 17, 2020 10:54 pm

Hi Giovanni,

I've added by analogue as "Messages" and "Pools" the "MailQueue" abstraction into the cmsis_os layer. Without MailQueue abstraction, "cmsis" was not fully compatible with the standard.
Also, I've fixed problem with returning incorrect event in GetMessage.
CMSIS API osMessageGet doesn't initialise local variable "osEvent event" and it causes a problem on AVR Architecture where chMBFetchI function filling by address only 16-bit (msg_t) instead 32 bit that variable "event.value.v" has. That causes that we have in most significant bytes of 32-bit variable "event.value.v" garbage from the stack.

If you are interesting, you can find a patch in the attachment.

If you will have any questions I will glad to answer them.

Thanks.
Attachments
cmsis_patch.zip
(2.45 KiB) Downloaded 9 times

User avatar
Giovanni
Site Admin
Posts: 12589
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 647 times
Been thanked: 543 times
Contact:

Re: cmsis_os add MailQueue

Postby Giovanni » Tue Feb 18, 2020 7:51 am

Hi,

I am interested, our CMSIS wrapper has not seen much use so it has not been touched for a while.

Does a test suite exist for validating a CMSIS RTOS implementation?

GIovanni

Bogdan
Posts: 12
Joined: Fri Apr 08, 2016 4:33 pm
Location: Ukraine Lviv
Contact:

Re: cmsis_os add MailQueue

Postby Bogdan » Tue Feb 18, 2020 1:47 pm

Hi,

In the repository, I've found only one project that uses a cmsis_os API. It is "os\demos\STM32\CMSIS-STM32F407-DISCOVERY\main.c" and it is very simple uses osThreadCreate and osDelay APIs.
I will try to write some test suite for this file. When it will be ready, I will provide the patch in this thread.

Thanks


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 2 guests