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

data abort in heap_4.c

Posted by agnishant on February 10, 2014

I get a data abort, at a random point of program execution inside the heap_4 function prvInsertBlockIntoFreeList, at the line "pxIterator->pxNextFreeBlock = pxBlockToInsert;". I went through the application to see if there is are memory leaks and greatly reduced the memory allocation calls to the required minimum. But the same heap is also being used by lwIP. What could have caused the problem or at which should I test to pin point the cause.


data abort in heap_4.c

Posted by agnishant on February 10, 2014

I further checked and found that the value of pxIterator is 0. If I am correct, if pxIterator was 0 from the start, the code would not reach here, but when this function is being called, all the tasks are suspended so I dont see how this problem could occur. Desperately need some feedback. If it would help, the controller in use is LPC2387.


data abort in heap_4.c

Posted by davedoors on February 10, 2014

Have you implemented the functions in sysarch.c to make lwip safe to use with FreeRTOS? Search for sysarch in FreeRTOSDemoCommonethernetlwip-1.4.0ports to see examples.


data abort in heap_4.c

Posted by agnishant on February 10, 2014

Yes I have done that, called vTaskSuspendAll for protect and xTaskResumeAll for unprotect.


data abort in heap_4.c

Posted by agnishant on February 10, 2014

I also changed the sys_arch functions to disable/enable the interrupts as well but still the problem exists. Also variable "pxIterator" is 0 after the for loop at the start of the function "prvInsertBlockIntoFreeList" which is causing the data abort.


data abort in heap_4.c

Posted by rtel on February 10, 2014

heap4.c has been thoroughly tested, both systematically and by thrashing. Although obviously we can't guarantee there aren't any problems with heap4 it is most likely that your problem lies elsewhere in your system. lwIP being the most obvious place, but also it could simply be a configuration problem.

Which port of FreeRTOS are you using? Is it up to date (newer version have more configASSERT() statements to trap common misconfigurations). Do you have configASSERT() defined? Do you have a stack overflow hook defined? Have you looked through the "my application does not run what could be wrong?" page of the FAQ?

Regards.


[ 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