Skip to main content
kelvin2
Visitor II
May 29, 2017
Solved

Bug in osMailCAlloc (cmsis_os.c)

  • May 29, 2017
  • 2 replies
  • 761 views
Posted on May 29, 2017 at 16:50

I believe there is a bug in the osMailCAlloc function from cmsis_os.c V1.02 (STM32Cube_FW_F1_V1.4.0).

The function will always assign 0 to the first 4 bytes of the block, since sizeof an uint32_t is 4.

if (p) {

  for (i = 0; i < sizeof(queue_id->queue_def->item_sz); i++) {

    ((uint8_t *)p)[i] = 0;

  }

}

#stm32cube #freertos #cmsis
This topic has been closed for replies.
Best answer by Imen.D
Posted on February 08, 2018 at 15:19

Hello,

This issue is fixed in the FreeRTOS V9 tag 03032017, already integrated in the STM32CubeF1 firmware package version 1.6.0.

Best Regards

Imen.

2 replies

ST Technical Moderator
May 30, 2017
Posted on May 30, 2017 at 10:41

Hi

Nogueira_da_Silva.Ke

,

Thanks for highlighting this issue.

I confirm this bug and it isreported internallyto be fixed in coming versions.

Thanks

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Imen.DBest answer
ST Technical Moderator
February 8, 2018
Posted on February 08, 2018 at 15:19

Hello,

This issue is fixed in the FreeRTOS V9 tag 03032017, already integrated in the STM32CubeF1 firmware package version 1.6.0.

Best Regards

Imen.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks