Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists