I am using FreeRTOS Kernel Version V8.0.1 with version 3.2 of the Roweley Crossworks for ARM
toolchain which uses the GCC compiler. The target environment for the code is the Embedded
Artist’s LPC4088 dev. board with an NXP LPC4088 Cortex M4 MCU. The Crossworks toolchain is
running under Debian Linux. (NOTE: configASSERT() is defined in the normal way in
FreeRTOSConfig.h()) Also, the following problem does not occur with version XXX of Crossworks.
The problem is that after using xTimerStart() to start a timer the following
completely reproducable HardFault crash occurs during a call to vListInsertEnd().
149 DEFAULT_ISR_HANDLER HardFault_Handler
It occurs in VListInsertEnd() at the line labled CRASH below.
void VListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
ListItem_t * const pxIndex = pxList->pxIndex;
/* Insert a new list item into pxList, but rather than sort the list,
makes the new list item the last item to be removed by a call to
pxNewListItem->pxNext = pxIndex;
pxNewListItem->pxPrevious = pxIndex->pxPrevious; // CRASH
The attached file, stack.png, shows the stack trace.
These are some other relevant clues.
- pxPortInitialize() stack appears to have executed many times at the time of the crash
and the last instance is as follows:
0x0000937E void pxPortIntialiseStack(StackTypet* pxTopStack=0xaaaaaaa, TaskFunctiont* pxCode=0xaaaaaaaa port.c : 239
- In VlistInsertEnd(), all fields of pxIndex have the value 0xaaaaaaaa.
I think, but don’t know, the problem is something technical rather than a normal stack crash.