However, I am not satified that tasks can not run simultaneously. So I get your information online. I read the supported list. It does support my MCU. However it is IAR not KEIL. I dont really know how to use IAR.
So I set it up by following steps on this post:
http://www.freertos.org/Creating-a-new-FreeRTOS-project.html First step I include the FreeRTOS’s files: FreeRTOS/Source/tasks.c
FreeRTOS/Source/queue.c
FreeRTOS/Source/list.c
FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c.
FreeRTOS/Source/portable/MemMang/heap_1.c 2nd step I add head path: FreeRTOS/Source/include
FreeRTOS/Source/portable/RVDS/ARM_CM4F 3rd, copy the FreeRTOSConfig.h. from DemoCORTEX_M4F_STM32F407ZG-SK under my project 4th, Interrupt Vectors , I dont understand this part. So I have no idea how to implement this in my project. And I also add this line before tasks starts:
NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); I forget when I see a post regarding this. I make simple task:
portTASK_FUNCTION( vStartMachine, pvParameters )
{
/* Block for 500ms. */
STM_EVAL_LEDToggle(LED3);
vTaskDelay(1000);
STM_EVAL_LEDToggle(LED3);
}
Built it, fix some underfinded errors. then no warning no error.Run it, well, no problem. then I add more tasks in it. I post it in another post here:
https://sourceforge.net/projects/freertos/forums/forum/382005/topic/8531370 when it is running UART related task, it will stop after minutes. When it is stopped, I click on “stop” and see it is sending out uart datas. it is Usart_SendString(USART3,”TEST STATUrn”); failed at :
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{
}
}
I tried increase the stack size to 2000, heap size to 10*10240…whatever, it still stop after almost same time.
I had searched all over this forum, tried a lot experiences from others. still no luck.
Whatelse do I miss in this setting up?
Thanks a lot.