felis_co wrote on Tuesday, February 17, 2009:
Hi Mike,
Thank you for the information. When I’m trying to compile with configUSE_TRACE_FACILITY I get the following error:
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4520 /i"C:\MCC18\h" -I"Z:\projects\RTOS_USB_Host\RTOS_Source" "RTOS_Source\tasks.c" -fo="tasks.o" -D__DEBUG -D__MPLAB_DEBUGGER_ICD2=1 -w3 -DMPLAB_PIC18F_PORT -Ls -Opa- -nw 2074 -nw 2066
MPLAB C18 v3.22 (demo)
Copyright 2000-2008 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 24
Z:\projects\RTOS_USB_Host\RTOS_Source\tasks.c:1820:Error [1131] type mismatch in assignment
Z:\projects\RTOS_USB_Host\RTOS_Source\tasks.c:1823:Error [1131] type mismatch in assignment
pointing to two listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList ); lines in the follwing fragment of code:
#if ( configUSE_TRACE_FACILITY == 1 )
static void prvListTaskWithinSingleList( const signed portCHAR *pcWriteBuffer, xList *pxList, signed portCHAR cStatus )
{
volatile tskTCB *pxNextTCB, *pxFirstTCB;
unsigned portSHORT usStackRemaining;
/* Write the details of all the TCB’s in pxList into the buffer. */
listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList );
do
{
listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );
usStackRemaining = usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxNextTCB->pxStack );
sprintf( pcStatusString, ( portCHAR * ) “%s\t\t%c\t%u\t%u\t%u\r\n”, pxNextTCB->pcTaskName, cStatus, ( unsigned int ) pxNextTCB->uxPriority, usStackRemaining, ( unsigned int ) pxNextTCB->uxTCBNumber );
strcat( ( portCHAR * ) pcWriteBuffer, ( portCHAR * ) pcStatusString );
} while( pxNextTCB != pxFirstTCB );
}
#endif
my FreeRTOSConfig.h definitions are as follows:
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 10000000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 3 )
#define configMINIMAL_STACK_SIZE ( 105 ) //init.105
#define configTOTAL_HEAP_SIZE ( ( size_t ) 796 /* 1052 */)
#define configMAX_TASK_NAME_LEN ( 4 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 1
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
//#define configCHECK_FOR_STACK_OVERFLOW 1
#define configUSE_APPLICATION_TASK_TAG 1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 1 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 0
#define INCLUDE_uxTaskPriorityGet 0
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_uxTaskGetStackHighWaterMark 1
Could you please take a look and tell me what’s wrong?
Thank you,
Oleg.