FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2010 Threads] Task is not startingPosted by Bart on June 3, 2010 I managed to adapt the FreeRTOS demo to my board, deleted all the demo tasks and began to work on my own. My problem is that Parport initialization of the LED's is working (they turn on before any tasks and scheduler) int main( void ) { /* Setup any hardware that has not already been configured by the low level init routines. */ prvSetupHardware();
xTaskCreate( vTestTaskB, "Hello", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
vTaskStartScheduler();
/* We should never get here as control is now taken by the scheduler. */ return 0; }
Parport test is within the prvSetupHardware() function. But the simple task doesn't start. Is it possible something went wrong in the task code and the processor got an error from the RTOS? Here's the code for the task: static void vTestTaskB( void *pvParameters ) { AT91C_BASE_PIOA->PIO_SODR = (1<<17);
/* Tasks must be implemented as continuous loops */ while(1); }
It should only turn one led off.
RE: Task is not startingPosted by Bart on June 3, 2010 It turned out I had to change the configTOTAL_HEAP_SIZE from 1024 to 4*24 and everything goes as it was planned. But can anyone tell why? And how can I calculate the minimal heap size for my program?
RE: Task is not startingPosted by Bart on June 3, 2010 4*1024 of course.
RE: Task is not startingPosted by Dave on June 3, 2010 “But can anyone tell why?” I can only speculate that 1024 is not big enough. You don't say which CPU you are using or what configMINIMAL_STACK_SIZE is set to. Did you check the return value of xTaskCreate()? Did you check to see if vTaskStartScheduler() returned? If you are using heap_1.c or heap_2.c then you can call xPortGetFreeHeapSize().
RE: Task is not startingPosted by Bart on June 3, 2010 I'm using Olimex SAM7-P64 board. My configMINIMAL_STACK_SIZE is set to 130. I did not check the return values of xTaskCreate(), nor vTaskStartScheduler. I'm using heap_2.c, but I don't think I can debug the program, because it's loaded into flash and for all I know, you can only add breakpoints if the program lies in ram. I'm sorry my questions can seem quite dumb, but I'm just starting my adventure with FreeRTOS and I'm trying to get to know it better. How are the return values related?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|