About Trace
I want to use trace macros.
In my FreeRTOSConfig file the maro configUSE_TRACE_FACILITY is = 1.
Then I have the following task:
static void vPeriodicTask( void *pvParameters )
{
vTaskSetApplicationTaskTag(NULL, (void *)1);
for( ;; )
{
vTaskDelay(5);
mPORTAToggleBits(BIT_0);
IFS0bits.CS1IF = 1;
}
}
but when I try to compile it the following error appear:
………………………………………………..
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "main.c" -o"main.o" -MMD -MF"main.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "tasks.c" -o"tasks.o" -MMD -MF"tasks.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
tasks.c:1837: warning: ‘prvListTaskWithinSingleList’ defined but not used
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -c -MMD -MF"port_asm.d" -I"D:ProyectosPanelSoftwarePrograma5" "port_asm.S" -o"port_asm.o" -I"D:ProyectosPanelSoftwarePrograma5" -I"." -Wa,–keep-locals,–gdwarf-2
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "heap_2.c" -o"heap_2.o" -MMD -MF"heap_2.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "list.c" -o"list.o" -MMD -MF"list.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "port.c" -o"port.o" -MMD -MF"port.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "croutine.c" -o"croutine.o" -MMD -MF"croutine.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -x c -c "queue.c" -o"queue.o" -MMD -MF"queue.d" -I"D:ProyectosPanelSoftwarePrograma5" -g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer
Executing: "C:Archivos de programaMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L "main.o" "tasks.o" "port_asm.o" "heap_2.o" "list.o" "port.o" "croutine.o" "queue.o" -o"Programa5.elf" -Wl,–defsym=__MPLAB_BUILD=1,–defsym=_min_heap_size=0,-Map="Programa5.map"
main.o: In function `vPeriodicTask’:
D:ProyectosPanelSoftwarePrograma5/main.c:46: undefined reference to `vTaskSetApplicationTaskTag’
D:ProyectosPanelSoftwarePrograma5/main.c:46: relocation truncated to fit: R_MIPS_26 against `vTaskSetApplicationTaskTag’
Link step failed.
-———————————————————————
Release build of project `D:ProyectosPanelSoftwarePrograma5Programa5.mcp’ failed.
Thu Feb 12 18:28:40 2009
-———————————————————————
BUILD FAILED
I have the task.c and task.h file in the project.
What is wrong?. Thank you in avanced.
About Trace
Make sure that configUSE_APPLICATION_TASK_TAG =1
Below links may help you.
http://www.freertos.org/vTaskSetApplicationTag.html
http://www.freertos.org/rtos-trace-macros.html
Regards,
Prithwee.
About Trace
confgUSE_TRACE_FACILITY is not required to use the trace macros. It is only for the old trace system. Best to set to 0.
About Trace
The problem was that the macro ConfigUSE_APPLICATION_TASK_TAG =1
was not in the FreeRTOSConfig file. After add this macro to the file the program compiled without any problem.
Thank you.