ozsmit wrote on Monday, October 22, 2012:
Hi,
I am new to FreeRTOS. I am trying to create a simple blinky application to test out my hardware target, MTek MV8750(ARM926EJ-S). I followed the instructions “Creating a New FreeRTOS Port” from FreeRTOS-porting-guide.html page.
I have the Rowley CrossStudio compiling and linking. I used the LPC23xx project as a reference only. And,
The code hangs in the following thread:
From Main:
->vTaskStartScheduler()
-> /* Create the idle task without storing its handle. */
-> xReturn = xTaskCreate( prvIdleTask, ( signed char * ) “IDLE”, tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL );
-> pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters );
-> prvAddTaskToReadyQueue( pxNewTCB );
This eventuall calls:
void vListInsertEnd( xList *pxList, xListItem *pxNewListItem )
{
volatile xListItem * 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
pvListGetOwnerOfNextEntry. This means it has to be the item pointed to by
the pxIndex member. */
pxIndex = pxList->pxIndex;
THE ABOVE LINE BLOWS THE STACK AWAY and code gets lost.
pxNewListItem->pxNext = pxIndex->pxNext;
THE ABOVE LINE indexes memory off in the weeds.
I implemented the stub, pxPortInitializeStack() like the web page says. I simply copied the contents from the LPC23xx port.c file.
Its obvious that my FreeRTOS is missing some #defines, etc that are crucial to setting up memory.
SHould I stay on this path? Or should I try to convert one of the ARM7 projects to my ARM926EJ-S platform.
Thanks in Advance,
Ozsmit