FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2014 Threads] data abort in heap_4.cPosted 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.cPosted 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.cPosted 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.cPosted by agnishant on February 10, 2014 Yes I have done that, called vTaskSuspendAll for protect and xTaskResumeAll for unprotect.
data abort in heap_4.cPosted 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.cPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|