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

V7.01 task create problem

Posted by skidev on July 27, 2011
New processor, new environment, and a new version of FreeRTOS...

Using an LPCXpresso LPC1769 with the Code Red LPCXpresso 4 gcc compiler and CMSISv2p00. Compiled (clean) the Example01 project modified to use the new CMSIS and FreeRTOS ports. When running, only Task 1 is created; Task 2 never sees the light of day. Pushing into vTaskCreate for Task 2, it seems neither sufficient heap or stack space can be created... odd.

Old version (older gcc, v6.01 of FreeRTOS worked fine. Any clues to what to investigate?

Thanks,

Mike

RE: V7.01 task create problem

Posted by skidev on July 27, 2011
To be more specific, it's Example01 from the FreeRTOS book, creating 2 tasks that merely advertise their presence. The only includes and libraries referenced are from the latest CMSISv2p00_LPC17xx and FreeRTOS libraries (CMSIS first in the paths) fresh from ARM and Richard.

Mike

RE: V7.01 task create problem

Posted by Richard on July 27, 2011
What does the second call to xTaskCreate() return?
Have you installed the FreeRTOS interrupt handlers?
What happens when you step into the second call to xTaskCreate(). How far does it get?

Regards.

RE: V7.01 task create problem

Posted by skidev on July 27, 2011
Hi Richard,

The second xTaskCreate() call returns -1.

Not sure about the interrupt handlers; I installed all the FreeRTOS v7.01 code for the Source and portable ARM_CM3_MPU code - the library builds fine

The second xTaskCreate runs all the way through, but neither the stack or heap create succeeded due to inability to allocate space.

Regards,

Mike

RE: V7.01 task create problem

Posted by Richard on July 27, 2011
I have to assume you have set the heap size large enough to create both tasks - if you are running the book code unmodified it will be. In which case, my guess is that the start up code is not correctly initialising the variables, so variables are starting with random values, and hence the memory allocation is failing. You will have to step through the code, where the failure to allocate memory occurs, and find the reason - i.e. is there genuinely no memory, or does a variable contain a bum value, or maybe even the flash memory has not been programmed correctly.

Regards.

RE: V7.01 task create problem

Posted by skidev on July 29, 2011
I rebuilt the Example01 by creating a FreeRTOS project with the LPCXpresso 4 tools, and tweaking the demo main.c to provide the same task function.

Inserting printfs (using Code Red consoleprint.c), the default min stack size of 80 allows 21 iterations of the scheduler loop before regurgitating an error at iteration 21. A fresh minimum of 100 seems to do the trick, has run for a day+ with no errors.

Moving on... thanks for the suggestions.

Mike


[ 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