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


AVR32 + FreeRTOS + LwIP create task problem

Posted by garypty on May 28, 2012
I am modifing the demo example : AVR32 with FreeRTOS and LwIP provided by Atmel for my application.

I removed the original created task: Basic Web, Basic SMTP and BASIC TFTP, and added my own tasks: SIP_UAC, SIP_UAS and RTP.

The stask size parameter in the create- task function is: SIP_UAC: 256, SIP_UAS: 256, RTP:128. They are smaller than the original provided tasks. When I run the software, I found that the SIP_UAS task can not be created and return NULL. So I removed almost all the things inside the SIP_UAS task and set the stack size parameter to 32 only, the code is now:

#include "FreeRTOS.h"
#include "task.h"

portTASK_FUNCTION( vUASTask, pvParameters)

However, the task still can not be created. Then I removed the SIP_UAC, the SIP_UAS task now can be created. And then I remove SIP_UAS and restore SIP_UAC, the task can be created. I found that it has problem if both SIP_UAC and SIP_UAS exist.....but the SIP_UAS task basically has nothing inside except the vTaskDelay() funcion..... anybody can give me some advice? Thank you very much

RE: AVR32 + FreeRTOS + LwIP create task problem

Posted by garypty on May 28, 2012
Sorry the code should be:

#include "FreeRTOS.h"
#include "task.h"

portTASK_FUNCTION( vUASTask, pvParameters)

RE: AVR32 + FreeRTOS + LwIP create task problem

Posted by Dave on May 28, 2012
When you converted the Atmel project, did you change any setting in FreeRTOSConfig.h? If the project used to create more tasks with bigger stacks than your application is trying to do then you should not have an issue with the task stack sizes. Step through the xTaskCreate() function to see where it fails. If you are using heap_1.c or heap_2.c then you can also define a malloc failed hook function (vApplicationMallocFailed() I think) to trap memory allocation problems.

What is configTOTAL_HEAP_SIZE set to in FreeRTOSConfig.h (only relevant if heap_1.c or heap_2.c is used)?

[ 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