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

config assert at heap 5

Posted by crippler1 on March 10, 2015

Hi

I have a problem,

my config assert pops at configASSERT( pxEnd ) in pvPortMalloc function, when I try to create task

it means that pxEnd is not initialized.

any suggestions?


config assert at heap 5

Posted by andymcc0 on March 10, 2015

Does this provide a clue?

void *pvPortMalloc( size_t xWantedSize )
{
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
void *pvReturn = NULL;

/* The heap must be initialised before the first call to
        prvPortMalloc(). */
configASSERT( pxEnd );

i.e. have you called vPortDefineHeapRegions() ?

Do you need heap_5.c with its segmented, user defined heap?


config assert at heap 5

Posted by crippler1 on March 10, 2015

at the heap5.c pxEnd = NULL at declaration as static.

I don't see any change at pxEnd to any non zero value, at the all file.


config assert at heap 5

Posted by crippler1 on March 10, 2015

as for the heap5 question

I am new to free rtos and i wrote simple main func that creates a task and runs it.


config assert at heap 5

Posted by rtel on March 10, 2015

Andy made some suggestions as to what the problem might be, but I don't think you have answered either of his questions.

Regards.


config assert at heap 5

Posted by crippler1 on March 10, 2015

I see that vPortDefineHeapRegions() contains the same assert check, but I don't see the code that change the pxEnd before the assert check.


config assert at heap 5

Posted by rtel on March 10, 2015

I see that vPortDefineHeapRegions() contains the same assert check,

Actually, it doesn't. It checks pxEnd is NULL to ensure you don't call the function twice.

but I don't see the code that change the pxEnd before the assert check.

It is done in vPortDefineHeapRegions().

Regards.


config assert at heap 5

Posted by crippler1 on March 10, 2015

Where is it done?


config assert at heap 5

Posted by rtel on March 10, 2015

Didn't I tell you that in my very last post in this thread?


config assert at heap 5

Posted by crippler1 on March 10, 2015

Sorry for the dumb question:

should I use heap for every program that I write?

I have watch some tutorials for free RTOS, and I never saw heap functions at main.


config assert at heap 5

Posted by rtel on March 10, 2015

http://www.freertos.org/a00111.html


[ 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