Hi
So I start to play with RTT on a very simple program with 4 task on FreeRTOS
Each task is very simple. Basically it displays the task name and toggle a led
(dbg_printf_write function just add some data before using SEGGER_RTT_printf)
Display All
When the last task try to release the mutex, I got stuck on an assert
After some research I found that the cullprit was the va_start inside SEGGER_RTT_printf.
edit: I add a mutex just to be sure
For some unknown reason, on the last printf call, the va_start function modify some data use by the mutex and so the assert function catch it!
Is there something special to do when using with RTT and FreeRTOS ?
So I start to play with RTT on a very simple program with 4 task on FreeRTOS
Each task is very simple. Basically it displays the task name and toggle a led
(dbg_printf_write function just add some data before using SEGGER_RTT_printf)
C Source Code
- void start_generic_task(void *argument)
- {
- osMutexAcquire(mutex_rttHandle, osWaitForever);
- dbg_printf_write(DBG_CODE_GENERIC_TASK, DBG_SEV_INFO, "Start task: %s", osThreadGetName(osThreadGetId()));
- osMutexRelease(mutex_rttHandle);
- for(;;)
- {
- osDelay(500);
- LL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
- }
- }
When the last task try to release the mutex, I got stuck on an assert
After some research I found that the cullprit was the va_start inside SEGGER_RTT_printf.
edit: I add a mutex just to be sure
For some unknown reason, on the last printf call, the va_start function modify some data use by the mutex and so the assert function catch it!
Is there something special to do when using with RTT and FreeRTOS ?
The post was edited 1 time, last by Brice_38_FR ().