Quality RTOS & Embedded Software

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




Loading

generalise the stack checking functions

Posted by Friedrich Lobenstock on February 9, 2013
Hi Richard!

I've just posted the patch

generalise the stack checking functions
on the Feature Requests tracker.

This patch enables ports of FreeRTOS to architectures which use/need more than
one stack.

To support the stack overflow checking functionality on such a port for the
additional stack(s), we need to have general (inline) functions where the stack
and such is not hard-coded.

Tested on a real hw with configCHECK_FOR_STACK_OVERFLOW == 2 and
portSTACK_GROWTH == -1.

Just compile tested for portSTACK_GROWTH == +1.

Would be nice if you could mainline this.

Regards
Friedl

RE: generalise the stack checking functions

Posted by Richard on February 11, 2013
I have not done more than glance at this one yet. I understand the desire to generalise the stack checking, but the patch is not there yet because it uses inline functions (remember FreeRTOS officially compiles with 18 different compilers so avoids using inline as different standards treat it differently [if at all]). Also, the checking has to be very fast, hence the macros that are expanded inline rather than function calls. I'm not sure (because I don't use them often) if the compiler will always perform a direct substitution for an inline function without any parameter overhead. I suspect most compilers will as soon as you turn any kind of optimisation on.

I will look at what you are trying to achieve to see if there is an alternative that does not use the inlines.

Regards.

RE: generalise the stack checking functions

Posted by Richard on February 11, 2013
Only partially related - I would be interested to know what you are porting to.

Regards.

RE: generalise the stack checking functions

Posted by Friedrich Lobenstock on February 11, 2013

I will look at what you are trying to achieve to see if there is an alternative that does
not use the inlines.


I used the inline to get type checking while using defines.

Because the inlines are in a .h file the compiler has to put
the code where the define goes. Am I wrong?

Regards Friedl

RE: generalise the stack checking functions

Posted by Friedrich Lobenstock on February 11, 2013

I would be interested to know what you are porting to.


It's not 8051 :-)

Regards
Friedl


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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