my code :
#include "stm32f4xx.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_gpio.h"
#include "FreeRTOS.h"
#include "task.h"
//#include "queue.h"
#define LED4 GPIO_Pin_12
#define LED5 GPIO_Pin_14
void InitGPIO(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD,ENABLE);
GPIO_InitStructure.GPIO_Pin = LED4|LED5;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_Init(GPIOD, &GPIO_InitStructure);
}
void prvSetupHardware( void )
{
InitGPIO();
}
void vTaskLED4(void *pvParameters)
{
for (;;)
{
GPIO_ToggleBits(GPIOD,LED4);
vTaskDelay(500);
}
}
void vTaskLED5(void *pvParameters)
{
for (;;)
{
GPIO_SetBits(GPIOD,LED5);
vTaskDelay(300);
GPIO_ResetBits(GPIOD,LED5);
vTaskDelay(700);
}
}
int main(void)
{
prvSetupHardware();
xTaskCreate(vTaskLED4,(signed char*)"LED4",configMINIMAL_STACK_SIZE,
NULL, tskIDLE_PRIORITY + 1, NULL);
xTaskCreate(vTaskLED4,(signed char*)"LED5",configMINIMAL_STACK_SIZE,
NULL, tskIDLE_PRIORITY + 1, NULL);
vTaskStartScheduler(); // Start the scheduler.
while(1);
}
After compiling project I have seen more error:
Rebuild target ‘STM32F4′assembling startup_stm32f4xx.s…
compiling system_stm32f4xx.c…
compiling stm32f4xx_rcc.c…
compiling stm32f4xx_gpio.c…
compiling main.c…
compiling croutine.c…
compiling list.c…
compiling queue.c…
compiling tasks.c…
compiling timers.c…
linking…
STM32F4.axf: Error: L6218E: Undefined symbol pvPortMalloc (referred from croutine.o).
STM32F4.axf: Error: L6218E: Undefined symbol ulPortSetInterruptMask (referred from croutine.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortClearInterruptMask (referred from croutine.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortEnterCritical (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortExitCritical (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortFree (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortYield (referred from queue.o).
STM32F4.axf: Error: L6218E: Undefined symbol pxPortInitialiseStack (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vApplicationIdleHook (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vApplicationStackOverflowHook (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vApplicationTickHook (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol vPortEndScheduler (referred from tasks.o).
STM32F4.axf: Error: L6218E: Undefined symbol xPortStartScheduler (referred from tasks.o).
Target not created How I can fix this?