Quality RTOS & Embedded Software

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


Loading

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)
{
vTaskDelay(100);
}


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)
{
for(;;){
vTaskDelay(100);
}
}

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