Skip to main content
Dirk Vermaak
Associate
September 12, 2018
Question

HAL + FreeRTOS + FatFS Bug

  • September 12, 2018
  • 1 reply
  • 996 views

Hi,

We have come across a bug in the code generated if you use FreeRTOS in STATIC memory mode (rather than the default dynamic mode) , with FatFs. (All generated from the CubeMX).

When we run the code we get two CONFIG ASSERTS in the RTOS and it is due to the fact that the FatFS code is calling xQueueCreateStatic and xBinarySemaphoreCreateStatic, but because it isn't aware that the RTOS is in static configuration, it doesn't allocate any memory for the queue or semaphore.

It's as simple as that. The fix we have is to simply override the creation of the queue and the semaphore with the correct static calls, with pre-allocated memory.

    This topic has been closed for replies.

    1 reply

    Explorer
    November 13, 2023

    Same problem still observed with STM32CubeIDE 1.13.2 on STM32L4R5, CMSIS V1, FreeRTOS 10.3.1.