What is the return type here

The error message tells you exactly why. FreeRTOS tasks cannot return and your displayMessage function returns. The signature of displayMessage is also wrong. I’d recommend first doing these tutorials to learn basics of FreeRTOS: GitHub - FreeRTOS/Lab-Project-FreeRTOS-Tutorials: Tutorials to learn FreeRTOS Kernel..