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

Section fails to compile (list.h)

Posted by Vyperin on June 6, 2007
Hello,

I have started a project, using a PIC18F452 & MPLAB 7.52 & MPLAB C18 3.11 Student Edition.

During some of my tests with FreeRTOS, I came to the conclusion that I should use vTaskSuspendAll() / xTaskResumeAll() instead of taskENTER_CRITICAL() / taskEXIT_CRITICAL().

Normally I assume that I need the following to be enabled:
#define INCLUDE_vTaskSuspend 1
in my FreeRtosConfig header file.

But, enabling this, gives me a compile time error: Error [1131] type mismatch in assignment,
the offender being: void vTaskCleanUpResources( void ) , (I also defined INCLUDE_vTaskCleanUpResources)
at the statement type: listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &( pxReadyTasksLists[ usQueue ] ) ); ,
which calls the following define in list.h (i am using the heap_2.c allocator):

#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
( pxList )->pxIndex = ( pxList )->pxIndex->pxNext; \
if( ( pxList )->pxIndex == ( xListItem * ) &( ( pxList )->xListEnd ) ) \
{ \
( pxList )->pxIndex = ( pxList )->pxIndex->pxNext; \
} \
pxTCB = ( pxList )->pxIndex->pvOwner

I have tried to figure it out, but I must admit, the inlining and data structures simply dazzle me. It is way beyond my programming skills.

So can you help me ? Maby a hint, or what structure may be mismatching: pxList or pxTCB. Maby some added paranthesis, or some explicit cast ?

Hope this can be done. I am just starting to like the RTOS and I really want to use it in my project.
Thank you in advance.
Best Regards,
V.

RE: Section fails to compile (list.h)

Posted by Dave on June 6, 2007
Do you really need INCLUDE_vTaskCleanUpResources set to 1? I think this is unlikely on a PIC. Can you not just set it back to 0?

Dave.

RE: RE: Section fails to compile (list.h)

Posted by Vyperin on June 6, 2007
Indeed your solution is competent and it constitutes as a bypass for the problem.

Can you tell me exactly what INCLUDE_vTaskCleanUpResources manages ?

I wished to use some dynamic allocated variables in my project. I must know if omitting this setting will incrementally take up heap space if allocating and deallocating, so if needed to re-think the solution.

Thank you,
V.

RE: RE: Section fails to compile (list.h)

Posted by sotd on June 6, 2007
The clean up resources function is only used when you stop or end the scheduler. In most systems this is never done as there is nothing to return to if the scheduler ends.


[ 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