Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

FreeRTOS Demo on Microblaze

Posted by xilmic on July 2, 2007
Hello,

I'm using the ML403 board from Xilinx and want to run the freertos demo
on the board using the Microblaze, but it does not work.
I have the EDK 9.1 version.
After updating and implementation of the xmp project, I got only some characters and not a repeating string, and the LED aren't flashing either. Does anybody have an idea want to do.

RE: FreeRTOS Demo on Microblaze

Posted by Richard on July 2, 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.

RE: FreeRTOS Demo on Microblaze

Posted by xilmic on July 3, 2007
Toggling the LED without FreeRTOS is working fine, but the second example is not running. I'll try to check if starting the LEDFlashTask is OK.

RE: FreeRTOS Demo on Microblaze

Posted by embeddedc on July 3, 2007
You might also want to just check that the first task is starting.

If you defined a single task that does nothing, eg

void aTask( void * pv )
{
volatile int i;

for(;;)
{
i++;
}
}

Create this task at a priority above the idle priority, and don't create any other tasks. Then set a break point on the entry to this task. After starting the scheduler the break point should be hit. If not then it does not look like the scheduler is even starting.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

New FAQ page about the FreeRTOS kernel and Amazon FreeRTOS.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner