With STM32Cube_FW_F4_V1.13.1 and FreeRTOS V8.2.3 you need to define the symbol USE_RTOS_SYSTICK
.
Here is a working example:
#include "stm32f4xx.h"
#include "stm32f4xx_nucleo_144.h"
// don't forget to define USE_RTOS_SYSTICK globally!
#include <cmsis_os.h>
#define LED_PIN GPIO_PIN_0
#define LED_PORT GPIOB
void blinky_task( void* pvParameters)
{
for(;;)
{
vTaskDelay( 1000 / portTICK_PERIOD_MS);
HAL_GPIO_WritePin( LED_PORT, LED_PIN, GPIO_PIN_SET);
vTaskDelay( 200 / portTICK_PERIOD_MS);
HAL_GPIO_WritePin( LED_PORT, LED_PIN, GPIO_PIN_RESET);
}
}
int main(void)
{
HAL_Init();
__HAL_RCC_GPIOB_CLK_ENABLE();
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStructure.Pin = LED_PIN;
HAL_GPIO_Init( LED_PORT, &GPIO_InitStructure);
xTaskCreate( blinky_task, (char*) "blinky", configMINIMAL_STACK_SIZE, 0, 1, 0);
vTaskStartScheduler();
}