Skip to main content
Visitor II
August 31, 2020
Question

STM32F205 FATFS + FreeRTOS CMSIS_V2 f_mount not working: undefined reference to `osSemaphoreWait'

  • August 31, 2020
  • 1 reply
  • 2457 views

Hi all,

Just find a problem whenI trying to use STM32F205 w/ FreeRTOS CMSIS_V2. When I call f_mount in FATFS libraries, complier return "Middlewares/Third_Party/FatFs/src/option/syscall.c:65: undefined reference to `osSemaphoreCreate'".

Once I go deeper, I find the problem occurs in f_mount > find_volume > ENTER_FF > lock_fs > ff_req_grant > osSemaphoreWait. So I go and have a look in cmsis_os.h. And I find the following comments:

 *     - replaced osSemaphoreCreate with osSemaphoreNew

 *     - renamed osSemaphoreWait to osSemaphoreAcquire (changed return value)

The problem doesn't occurs in CMSIS_V1. So how can I workaround? Or shall I change the function directly?

Attach please find my projects

    This topic has been closed for replies.

    1 reply

    Visitor II
    March 31, 2021

    I have the same problem, In ​CMSIS_V2 stm32CubeIDE generate the ff_conf.h contains #include "cmsis_os.h"    /* _FS_REENTRANT set to 1 */ but not cmsis_os2.h