AT91SAM: data abort starting first task

Hi, I want to use freeRTOS together with the AT91SAM9263 controller. At the moment I always get a data abort error at this position: vPortStartFirstTask
portRESTORE_CONTEXT It seams that there`s somehting not defined – but I don`t know what… At the starting point, I use one sample project from freeRTOS, and made only a few changes according to this controller. Here`s my main-function: int main( void )
{
/* Setup the ports. */
prvSetupHardware(); /* Setup the IO required for the LED’s. */
vParTestInitialise(); vStartLEDFlashTasks( mainFLASH_PRIORITY ); vTaskStartScheduler(); return(0); The scheduler will be started. I hope someone could give me some hints to find this error… best regards
Bernd  

AT91SAM: data abort starting first task

Do you set the SAM9 into Supervisor mode before calling main()? It must be in Supervisor mode before portRESTORE_CONTEXT is called doing this before main() is called in normally the easiest way of achieving this.

AT91SAM: data abort starting first task

ah ok… now the led is flashing – but only for a short time, then I also get a data abort error…. (within the vListInsert() function…)

AT91SAM: data abort starting first task

I found the reason for this second data abort:
the pxList item is 0x00! vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); It seams that pxQueue->xTasksWaitingToSend  is 0x00 and therefore  the pxList item is 0x00: Which tasks are essential to be initializied at the startup? I think this problem will occur, because I didn`t made any inits to the queues? best regards
Bernd

AT91SAM: data abort starting first task

I presume you are creating the queue before using it?

AT91SAM: data abort starting first task

I didn`t create any queue… I only use the “simple” example from freeRTOS… vStartLEDFlashTasks( mainFLASH_PRIORITY ); That`s the only function befor the scheduler starts… 

AT91SAM: data abort starting first task

by the way: it is only important to be in the supervisor mode if I start the scheduler? vTaskStartScheduler(); Because within the normal user functions, the arm mode is always the user mode.

AT91SAM: data abort starting first task

Tasks run in System mode.  The kernel runs in Supervisor mode. Regards.

AT91SAM: data abort starting first task

I`ve still another question: ; chip specific addresses and constants:
AT91C_BASE_PITC EQU 0xFFFFFD30
PITC_PIVR EQU 8 
AT91C_BASE_AIC EQU 0xFFFFF000
AIC_EOICR EQU 304 ; 130 ; 304 Is the definition for AIC_EOICR correct? Because in the “AT91SAM9263.H” header file:
#define AIC_EOICR       (AT91_CAST(AT91_REG *) 0x00000130) Moreover if someone had a idea why the led task is only running for round about 10sec – I appreciate the solution *g* regards

AT91SAM: data abort starting first task

Look the address up in the data sheet.

AT91SAM: data abort starting first task

if I change this setting according to the data sheet from the controller, the led is not flashing at all. The prvIdleTask() is running the whole time.

AT91SAM: data abort starting first task

everything is working fine now: the problem was the dbug interface (which was not installed and therefore the default printf() call in the IdleTaks generates an data abort). best regards (and many thanks for your help)