Quality RTOS & Embedded Software

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


Loading

Porting from FreeRTOS v4.7.2 to v5.0

Posted 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.0

Posted 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.0

Posted 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.0

Posted by Richard on December 12, 2008
Which port are you using?

Regards.

RE: Porting from FreeRTOS v4.7.2 to v5.0

Posted by Victor Nilsson on December 12, 2008
I am using AVR32UC3 for GCC

RE: Porting from FreeRTOS v4.7.2 to v5.0

Posted 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.0

Posted 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.


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


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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