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] [December 2008 Threads] Porting from FreeRTOS v4.7.2 to v5.0Posted by Victor Nilsson on December 12, 2008 Hi.
I am using the Control Panel Demo for my EVK1100 board for the cpu : AVR32UC3A0512. I am using AVR Studio with GCC which includes Software Framework 1.3 and FreeRTOS v4.7.2 for the example project.
I need to upgrade into FreeRtos v5.0 and have tried it by replacing the files and followed the guide at : http://www.freertos.org/upgrading.html
I replaced the third parameter into the ISR functions by doing the following :
xSwitchRequired = xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken );
instead of sending pdFalse as a third parameter.
The GCC compiler builds fine without warning but now my control panel demo hangs. If I try to debug the demo it get stucks at the following module in the file macb.c
// wait for PHY to be ready do { status = macb->nsr; } while (!(status & AVR32_MACB_NSR_IDLE_MASK));
Have I missed something for my upgrade?
RE: Porting from FreeRTOS v4.7.2 to v5.0Posted by Dave on December 12, 2008 Set xHigherPriorityTaskWoken to false before calling xSemaphoreGiveFromISR, then use its value after the function call to determine if a context switch is required. The return value is now a true or false as to whether the 'give' passed or not.
To upgrade the code you should be able to drop the Source directory from the latest FreeRTOS download into your project. Back up your original files first though!
Also make sure you do a clean build.
RE: Porting from FreeRTOS v4.7.2 to v5.0Posted by Victor Nilsson on December 12, 2008 Thnx for the reply.
I have tried to use the value of xHigherPriorityTaskWoken to determine if a context switch is required after I am calling xSemaphoreGiveFromISR, but still my application hangs at the same place. I have no idea why it is.
RE: Porting from FreeRTOS v4.7.2 to v5.0Posted by Richard on December 12, 2008 Which port are you using?
Regards.
RE: Porting from FreeRTOS v4.7.2 to v5.0Posted by Victor Nilsson on December 12, 2008 I am using AVR32UC3 for GCC
RE: Porting from FreeRTOS v4.7.2 to v5.0Posted by Victor Nilsson on December 12, 2008 in port.c for freertos v4.7.2 the function prvSetupTimerInterrupt used to call on the following function : INTC_register_interrupt(&vTick, AVR32_CORE_COMPARE_IRQ, AVR32_INTC_INT0);
but in freertos v5.0.0 the function was called like this INTC_register_interrupt(&vTick, AVR32_CORE_COMPARE_IRQ, INT0);
I didnt have the INT0 defined anywhere, so I had to change it back like it was for the version 4.7.2. AVR32_INTC_INT0 I found defined as 0x00000000 in intc.h in my avr toolchain lib.
It feels like my application receives a strange interrupt somewhere, maybe this is why it occurs ?
RE: Porting from FreeRTOS v4.7.2 to v5.0Posted by Victor Nilsson on December 16, 2008 I solved it by replacing all my files, except port.c which is written specifically for my demo project by atmel.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|