rtel wrote on Monday, July 02, 2007:
The Microblaze port does work really nicely with the tool version with which it was developed. New versions of the tools have been released a couple of times since then though, so suspect this is the cause of the problem. I would suggest stripping down the demo to its minimum to locate the cause of the problem. Something along the following lines:
1) Write a simple program that does not use FreeRTOS.org to check that the LEDs are working as expected:
void main( void )
{
____for( ;; )
____{
________vParTestToggleLED( n );
____}
}
where ‘n’ is various LED numbers. Stepping through on the debugger to check the LED toggles (running the program will toggle the LED too quickly to see).
2) Edit main so it starts the LED flash tasks only:
int main (void)
{
____portDISABLE_INTERRUPTS();
____prvSetupHardware();
____vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
____vTaskStartScheduler();
____/* Should not get here as the processor is now under control of the
____scheduler! */
____return 0;
}
3) Set configUSE_PREEMPTION to 0 in FreeRTOS.org and run this edited main(). The LED’s should toggle as described on the FreeRTOS.org documentation page for the Microblaze.
4) Assuming (3) words, set configUSE_PREEMPTION to 1 and try again.
5) Add in the register check and check task tasks to main(), and see if everything still runs as expected.
int main (void)
{
____portDISABLE_INTERRUPTS();
____prvSetupHardware();
____vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
____xTaskCreate( vRegisterTest, "Reg1", mainTINY_STACK, ( void * ) 10, tskIDLE_PRIORITY, NULL );
____xTaskCreate( vRegisterTest, "Reg2", mainTINY_STACK, ( void * ) 20, tskIDLE_PRIORITY, NULL );
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
____vTaskStartScheduler();
____/* Should not get here as the processor is now under control of the
____scheduler! */
____return 0;
}
The register check tasks will only work when using preemption.
See how far you get.
Regards.