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] [October 2008 Threads] NULL pointer dereference in prvCheckDelayedTaPosted by Robert Warner on October 21, 2008 I keep getting a __dapt() on execution of the Demo for ARM7_AT91SAM7X256_Eclipse. On the first call to vTaskIncrementTick() it attempts to find if a timeout has expired using prvCheckDelayedTasks(). Unfortunately, it appears prvInitialiseTaskLists() has not executed prior to this point and pxDelayedTaskList has a NULL pointer for it. This causes all kinds of problems.
Any idea why initializations are not preformed prior to allowing ticks to generate? Has this already been found out? (I did browse/search this list and did not find any thing.) Is there a patch for this potential issue?
thnx - bob
RE: NULL pointer dereference in prvCheckDelayedTaPosted by Dave on October 22, 2008 The tick interrupt is configured as the scheduler is started and after interrupts have been disabled. Interrupts will not be enabled again until the first task is running. This means provided you have created some tasks to run you should not get any tick interrupts until everything has been initialized. The lists get initialized when the first task is created.
RE: NULL pointer dereference in prvCheckDelayedTaPosted by Robert Warner on October 22, 2008 The problem is on restart after a system reset. The PIT timer does not appear to be disabled upon reinitialization.
code snippet: static void prvSetupHardware( void ) { portDISABLE_INTERRUPTS(); ...
and portDISABLE_INTERRUPTS() does not appear to disable all interrupts, only IRQ and FIQ
code snippet ..."MRSR0, CPSR\n\t"/* Get CPSR.*/\ "ORRR0, R0, #0xC0\n\t"/* Disable IRQ, FIQ.*/\ "MSRCPSR, R0\n\t"/* Write back modified value.*/\ ...
So ... i added the following and it now works as expected.
code snippet: static void prvSetupHardware( void) { AT91F_PITDisableInt( AT91C_BASE_PITC); portDISABLE_INTERRUPTS(); ...
RE: NULL pointer dereference in prvCheckDelayedTaPosted by Richard on October 22, 2008 Are you using IAR tools? If so the most likely cause is that the debugger macro file (which contains scripts that are run on debug events, such as reset) is not correctly clearing the interrupt peripherals. Look for a file in the debugger settings that has a .mac extension.
Regards.
RE: NULL pointer dereference in prvCheckDelayedTaPosted by Robert Warner on October 22, 2008 No, this is the GCC/Yagarto tool chain example.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|