Quality RTOS & Embedded Software

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




Loading

configASSERT does not catch errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY

Posted by beefc0de on May 9, 2016

Problem: If the Idle Task could not be created in vTaskStartScheduler we try to catch this with
configAssert( xReturn );. But we miss it if errCOULDNOTALLOCATEREQUIREDMEMORY is returned and configAssert only checks for 0, as in #define configASSERT( ( x ) ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ )

*Fix: * use configASSERT( bdFALSE);in case the Idle Task could not be created.


configASSERT does not catch errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY

Posted by rtel on May 9, 2016

Thanks for pointing this out.

configASSERT( pdFALSE ) will generate compiler warnings about the expression always evaluating to true, so this has instead been changed to:

configASSERT( xReturn != errCOULDNOTALLOCATEREQUIREDMEMORY );


[ 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