L6218E: Undefined symbol wait_ms

Hello,
I tried to upgrade to mbed os 6.5 with my DISCO-F429ZI_Board.
I obtained this error :
L6218E: Undefined symbol wait_ms (referred from BUILD/DISCO_F429ZI/ARMC6/BSP_DISCO_F429ZI/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery.o).
Could you help me ?
Thanks for advance
Didier

wait_ms is deprecated and has been removed from Mbed OS6, you should use ThisThread::sleep_for() now.

https://os.mbed.com/docs/mbed-os/v6.5/mbed-os-api-doxy/namespacertos_1_1_this_thread.html

Hello,
I need to change wait_ms() by ThisThread::sleep_for() in library BSP_DISCO_F429ZI ?
Thanks for advance

Hello,

if any library contains the wait() or wait_ms() functions, then yes, you must to replace it.

  • old wait(1) to new thread_sleep_for(1000) or ThisThread::sleep_for(1000)
  • old wait_ms(1) to new thread_sleep_for(1) or ThisThread::sleep_for(1)

The thread_sleep_for() function will also work with the Bare metal profile without further settings.

BR, Jan

2 Likes