/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
#define configUSE_IDLE_HOOK 0\r
#define configUSE_TICK_HOOK 0\r
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
-#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 72000000UL ) \r
-#define configPERIPHERAL_CLOCK_HZ ( ( unsigned portLONG ) 36000000UL )\r
+#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 80000000UL ) \r
+#define configPERIPHERAL_CLOCK_HZ ( ( unsigned portLONG ) 40000000UL )\r
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )\r
#define configMINIMAL_STACK_SIZE ( 200 )\r
#define configISR_STACK_SIZE ( 400 )\r
#define configQUEUE_REGISTRY_SIZE 0\r
\r
/* Co-routine definitions. */\r
-#define configUSE_CO_ROUTINES 0\r
+#define configUSE_CO_ROUTINES 0\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
\r
/* Set the following definitions to 1 to include the API function, or zero\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
suite_state=\r
[TOOL_SETTINGS]\r
TS{CB0AF4B8-4022-429D-8F99-8A56782B2C6D}=--keep-locals --gdwarf-2\r
-TS{9C698E0A-CBC9-4EFF-AE7D-B569F93E7322}=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
+TS{9C698E0A-CBC9-4EFF-AE7D-B569F93E7322}=-g -DMPLAB_PIC32MX_PORT -Wall -fomit-frame-pointer\r
TS{77F59DA1-3C53-4677-AC5F-A03EB0125170}=--defsym=_min_heap_size=0 --defsym=_min_heap_size=0 -Map="$(BINDIR_)$(TARGETBASE).map" -o"$(BINDIR_)$(TARGETBASE).$(TARGETSUFFIX)" -O3\r
TS{0396C0A1-9052-4E4F-8B84-EF0162B1B4E9}=\r
[INSTRUMENTED_TRACE]\r
[Header]\r
MagicCookie={0b13fe8c-dfe0-40eb-8900-6712719559a7}\r
Version=1.0\r
-[File000]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\main.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File001]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\ParTest.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File002]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\port.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File003]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\list.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File004]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\queue.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File005]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\tasks.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File006]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\port_asm.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-as.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--keep-locals --gdwarf-2\r
-TraceCmdString=\r
-[File007]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\RegisterTestTasks.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-as.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--keep-locals --gdwarf-2\r
-TraceCmdString=\r
-[File008]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\heap_2.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File009]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\flash.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File010]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\QPeek.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File011]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\semtest.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File012]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\GenQTest.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File013]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\blocktim.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File014]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\lcd.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File015]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\serial.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File016]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\comtest.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File017]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\serial_isr.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-as.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--keep-locals --gdwarf-2\r
-TraceCmdString=\r
-[File018]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\timertest.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File019]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\timertest_isr.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-as.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--keep-locals --gdwarf-2\r
-TraceCmdString=\r
-[File020]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\IntQueue.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File021]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\IntQueueTimer.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File022]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\IntQueueTimer_isr.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-as.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--keep-locals --gdwarf-2\r
-TraceCmdString=\r
-[File023]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\printf-stdarg.o\r
-Folder=Intermediary\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={430F471F-7ECB-4852-A80D-DEF9A5C8E751}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=-g -DMPLAB_PIC32MX_PORT -Wall -O3 -fomit-frame-pointer\r
-TraceCmdString=\r
-[File024]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\RTOSDemo.elf\r
-Folder=Output\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={C68E5105-1196-4333-A0BF-3DC57271E614}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-ld.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--defsym=_min_heap_size=0 --defsym=_min_heap_size=0 -Map="$(BINDIR_)$(TARGETBASE).map" -o"$(BINDIR_)$(TARGETBASE).$(TARGETSUFFIX)" -O3\r
-TraceCmdString=\r
-[File025]\r
-Location=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\PIC32MX_MPLAB\RTOSDemo.hex\r
-Folder=Output\r
-DeviceName=PIC32MX360F512L\r
-LanguageToolSuiteID={14495C23-81F8-43F3-8A44-859C583D7760}\r
-LanguageToolID={C68E5105-1196-4333-A0BF-3DC57271E614}\r
-LanguageToolLocation=C:\Devtools\Microchip\MPLAB C32\bin\pic32-ld.exe\r
-PPAD=$(BINDIR)||$(TMPDIR)||$(AINDIR)|..\..\Source\portable\MPLAB\PIC32MX;.||$(INCDIR)|.;.;..\common\include;..\..\source\portable\mplab\pic32mx;..\..\source\include||$(LIBDIR)||$(LKRDIR)||\r
-SOLK=<src>|main.c|ParTest\ParTest.c|..\..\Source\portable\MPLAB\PIC32MX\port.c|..\..\Source\list.c|..\..\Source\queue.c|..\..\Source\tasks.c|..\..\Source\portable\MPLAB\PIC32MX\port_asm.S|RegisterTestTasks.s|..\..\Source\portable\MemMang\heap_2.c|..\Common\Minimal\flash.c|..\Common\Minimal\QPeek.c|..\Common\Minimal\semtest.c|..\Common\Minimal\GenQTest.c|..\Common\Minimal\blocktim.c|lcd.c|serial\serial.c|..\Common\Minimal\comtest.c|serial\serial_isr.S|timertest.c|timertest_isr.S|C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\Common\Minimal\IntQueue.c|IntQueueTimer.c|IntQueueTimer_isr.S|printf-stdarg.c||<obj>||<lib>||<lkr>||\r
-SuiteArgsString=\r
-ToolArgsString=--defsym=_min_heap_size=0 --defsym=_min_heap_size=0 -Map="$(BINDIR_)$(TARGETBASE).map" -o"$(BINDIR_)$(TARGETBASE).$(TARGETSUFFIX)" -O3\r
-TraceCmdString=\r
[TOOL_LOC_STAMPS]\r
tool_loc{92E15EC6-5E91-4BF4-B5FA-C80AD2601AA7}=C:\Devtools\Microchip\MPLAB C32\bin\pic32-as.exe\r
tool_loc{430F471F-7ECB-4852-A80D-DEF9A5C8E751}=C:\Devtools\Microchip\MPLAB C32\bin\pic32-gcc.exe\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
* In addition to the standard demo tasks, the following tasks and tests are\r
* defined and/or created within this file:\r
*\r
- * "Fast Interrupt Test" - A high frequency periodic interrupt is generated\r
- * using a free running timer to demonstrate the use of the\r
- * configKERNEL_INTERRUPT_PRIORITY configuration constant. The interrupt\r
- * service routine measures the number of processor clocks that occur between\r
- * each interrupt - and in so doing measures the jitter in the interrupt timing.\r
- * The maximum measured jitter time is latched in the ulMaxJitter variable, and\r
- * displayed on the LCD display by the 'LCD' task as described below. The\r
- * fast interrupt is configured and handled in the timertest.c source file.\r
- *\r
* "LCD" task - the LCD task is a 'gatekeeper' task. It is the only task that\r
* is permitted to access the display directly. Other tasks wishing to write a\r
* message to the LCD send the message on a queue to the LCD task instead of\r
* check that all the standard demo tasks are still operational. Should any \r
* unexpected behaviour within a demo task be discovered the check task will \r
* write an error to the LCD (via the LCD task). If all the demo tasks are \r
- * executing with their expected behaviour then the check task writes the \r
- * maximum jitter time to the LCD (as described above) - again via the LCD task.\r
+ * executing with their expected behaviour then the check task instead writes \r
+ * a count of the number of times the high frequency interrupt has incremented\r
+ * ulHighFrequencyTimerInterrupts - which is one in every 20,000 interrupts.\r
*\r
* "Register test" tasks - These tasks are used in part to test the kernel port.\r
* They set each processor register to a known value, then check that the \r
* to different values, and will get swapping in and out between setting and \r
* then subsequently checking the register values. Discovery of an incorrect\r
* value would be indicative of an error in the task switching mechanism.\r
+ *\r
+ * By way of demonstration, the demo application defines \r
+ * configMAX_SYSCALL_INTERRUPT_PRIORITY to be 3, configKERNEL_INTERRUPT_PRIORITY \r
+ * to be 1, and all other interrupts as follows:\r
+ *\r
+ * + The UART is allocated a priority of 2. This means it can interrupt the \r
+ * RTOS tick, and can also safely use queues.\r
+ * + Two timers are configured to generate interrupts just to test the nesting \r
+ * and queue access mechanisms. These timers are allocated priorities 2 and 3 \r
+ * respectively. Even though they both access the same two queues, the \r
+ * priority 3 interrupt can safely interrupt the priority 2 interrupt. Both \r
+ * can interrupt the RTOS tick.\r
+ * + Finally a high frequency timer interrupt is configured to use priority 4 - \r
+ * therefore kernel activity will never prevent the high frequency timer from \r
+ * executing immediately that the interrupt is raised (within the limitations \r
+ * of the hardware itself). It would not be safe to access a queue from this \r
+ * interrupt as it is above configMAX_SYSCALL_INTERRUPT_PRIORITY. \r
+ *\r
+ * See the online documentation for this demo for more information on interrupt\r
+ * usage.\r
*/\r
\r
/* Standard includes. */\r
#include "timertest.h"\r
#include "IntQueue.h"\r
\r
-#pragma config FPLLMUL = MUL_18, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF\r
+#pragma config FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF\r
#pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_2\r
\r
/*-----------------------------------------------------------*/\r
/* Misc. */\r
#define mainDONT_WAIT ( 0 )\r
\r
-/* Dimension the buffer used to hold the value of the maximum jitter time when\r
-it is converted to a string. */\r
+/* Dimension the buffer used to hold the value of the high frequency timer \r
+count when it is converted to a string. */\r
#define mainMAX_STRING_LENGTH ( 20 )\r
\r
/* The frequency at which the "fast interrupt test" interrupt will occur. */\r
static void prvSetupHardware( void )\r
{\r
/* Set the system and peripheral bus speeds and enable the program cache*/\r
- SYSTEMConfigPerformance( configCPU_CLOCK_HZ );\r
+ SYSTEMConfigPerformance( configCPU_CLOCK_HZ - 1 );\r
+ mOSCSetPBDIV( OSC_PB_DIV_2 );\r
\r
/* Setup to use the external interrupt controller. */\r
INTEnableSystemMultiVectoredInt();\r
unsigned portLONG ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulTicksToWait = mainNO_ERROR_PERIOD;\r
portTickType xLastExecutionTime;\r
\r
-/* Buffer into which the maximum jitter time is written as a string. */\r
+/* Buffer into which the high frequency timer count is written as a string. */\r
static portCHAR cStringBuffer[ mainMAX_STRING_LENGTH ];\r
\r
-/* The maximum jitter time measured by the fast interrupt test. */\r
-extern unsigned portLONG ulMaxJitter ;\r
+/* The count of the high frequency timer interrupts. */\r
+extern unsigned portLONG ulHighFrequencyTimerInterrupts;\r
xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };\r
\r
/* Setup the high frequency, high priority, timer test. It is setup here\r
xMessage.pcMessage = "Error: Int queue";\r
}\r
\r
- /* Write the max jitter time to the string buffer. It will only be \r
- displayed if no errors have been detected. */\r
- sprintf( cStringBuffer, "%dns max jitter", ( int ) ( ( ulMaxJitter - mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ) * mainNS_PER_CLOCK ) );\r
+ /* Write the ulHighFrequencyTimerInterrupts value to the string \r
+ buffer. It will only be displayed if no errors have been detected. */\r
+ sprintf( cStringBuffer, "Pass %u", ( unsigned int ) ulHighFrequencyTimerInterrupts );\r
\r
xQueueSend( xLCDQueue, &xMessage, mainDONT_WAIT );\r
vParTestToggleLED( mainCHECK_LED );\r
\r
void vApplicationStackOverflowHook( void )\r
{\r
+ /* Look at pxCurrentTCB to see which task overflowed its stack. */\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/* Scheduler includes. */\r
#include "FreeRTOS.h"\r
\r
-/* Demo includes. */\r
-#include "partest.h"\r
-\r
-/* The number of interrupts to pass before we start looking at the jitter. */\r
-#define timerSETTLE_TIME 200\r
-\r
/* The maximum value the 16bit timer can contain. */\r
#define timerMAX_COUNT 0xffff\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
-/* The maximum time (in processor clocks) between two consecutive timer\r
-interrupts so far. */\r
-unsigned portLONG ulMaxJitter = 0;\r
+/* Incremented every 20,000 interrupts, so should count in seconds. */\r
+unsigned portLONG ulHighFrequencyTimerInterrupts = 0;\r
+\r
+/* The frequency at which the timer is interrupting. */\r
+static unsigned portLONG ulFrequencyHz;\r
\r
/*-----------------------------------------------------------*/\r
\r
void vSetupTimerTest( unsigned portSHORT usFrequencyHz )\r
{\r
- /* T2 is used to generate interrupts. The core timer is used to provide an \r
- accurate time measurement. */\r
+ /* Remember the frequency so it can be used from the ISR. */\r
+ ulFrequencyHz = ( unsigned portLONG ) usFrequencyHz;\r
+\r
+ /* T2 is used to generate interrupts above the kernel and max syscall interrupt\r
+ priority. */\r
T2CON = 0;\r
TMR2 = 0;\r
\r
/* Timer 2 is going to interrupt at usFrequencyHz Hz. */\r
- PR2 = ( unsigned portSHORT ) ( configPERIPHERAL_CLOCK_HZ / ( unsigned portLONG ) usFrequencyHz );\r
+ PR2 = ( unsigned portSHORT ) ( ( configPERIPHERAL_CLOCK_HZ / ( unsigned portLONG ) usFrequencyHz ) - 1 );\r
\r
/* Setup timer 2 interrupt priority to be above the kernel priority so \r
the timer jitter is not effected by the kernel activity. */\r
\r
void vT2InterruptHandler( void )\r
{\r
-static unsigned portLONG ulLastCount = 0, ulSettleCount = 0;\r
-static unsigned portLONG ulThisCount, ulDifference;\r
+static unsigned portLONG ulCalls = 0;\r
\r
- /* Capture the timer value as we enter the interrupt. */\r
- ulThisCount = _CP0_GET_COUNT();\r
-\r
- if( ulSettleCount >= timerSETTLE_TIME )\r
- {\r
- /* What is the difference between the timer value in this interrupt\r
- and the value from the last interrupt. */\r
- ulDifference = ulThisCount - ulLastCount;\r
-\r
- /* Store the difference in the timer values if it is larger than the\r
- currently stored largest value. The difference over and above the \r
- expected difference will give the 'jitter' in the processing of these\r
- interrupts. */\r
- if( ulDifference > ulMaxJitter )\r
- {\r
- ulMaxJitter = ulDifference;\r
- }\r
- }\r
- else\r
+ ++ulCalls;\r
+ if( ulCalls >= ulFrequencyHz )\r
{\r
- /* Don't bother storing any values for the first couple of \r
- interrupts. */\r
- ulSettleCount++;\r
+ /* Increment the count that will be shown on the LCD. \r
+ The increment occurs once every 20,000 interrupts so\r
+ ulHighFrequencyTimerInterrupts should count in seconds. */\r
+ ulHighFrequencyTimerInterrupts++;\r
+ ulCalls = 0;\r
}\r
\r
- /* Remember what the timer value was this time through, so we can calculate\r
- the difference the next time through. */\r
- ulLastCount = ulThisCount;\r
-\r
/* Clear the timer interrupt. */\r
IFS0bits.T2IF = 0;\r
}\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
+/*\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
+\r
+ This file is part of the FreeRTOS.org distribution.\r
+\r
+ FreeRTOS.org is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ FreeRTOS.org is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with FreeRTOS.org; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+ A special exception to the GPL can be applied should you wish to distribute\r
+ a combined work that includes FreeRTOS.org, without being obliged to provide\r
+ the source code for any proprietary components. See the licensing section \r
+ of http://www.FreeRTOS.org for full details of how and when the exception\r
+ can be applied.\r
+\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *\r
+ * and even write all or part of your application on your behalf. *\r
+ * See http://www.OpenRTOS.com for details of the services we provide to *\r
+ * expedite your project. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
+\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
+\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
+\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
+*/\r
+\r
#include <p32xxxx.h>\r
#include <sys/asm.h>\r
#include "ISR_Support.h"\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
-/*
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
-
- This file is part of the FreeRTOS.org distribution.
-
- FreeRTOS.org is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- FreeRTOS.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with FreeRTOS.org; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- A special exception to the GPL can be applied should you wish to distribute
- a combined work that includes FreeRTOS.org, without being obliged to provide
- the source code for any proprietary components. See the licensing section
- of http://www.FreeRTOS.org for full details of how and when the exception
- can be applied.
-
- ***************************************************************************
- ***************************************************************************
- * *
- * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
- * and even write all or part of your application on your behalf. *
- * See http://www.OpenRTOS.com for details of the services we provide to *
- * expedite your project. *
- * *
- ***************************************************************************
- ***************************************************************************
-
- Please ensure to read the configuration and relevant port sections of the
- online documentation.
-
- http://www.FreeRTOS.org - Documentation, latest information, license and
- contact details.
-
- http://www.SafeRTOS.com - A version that is certified for use in safety
- critical systems.
-
- http://www.OpenRTOS.com - Commercial support, development, porting,
- licensing and training services.
-*/
-
-/*
- * Creates all the demo application tasks, then starts the scheduler. The WEB
- * documentation provides more details of the demo application tasks.
- *
- * In addition to the standard demo tasks, the follow demo specific tasks are
- * create:
- *
- * The "Check" task. This only executes every three seconds but has the highest
- * priority so is guaranteed to get processor time. Its main function is to
- * check that all the other tasks are still operational. Most tasks maintain
- * a unique count that is incremented each time the task successfully completes
- * its function. Should any error occur within such a task the count is
- * permanently halted. The check task inspects the count of each task to ensure
- * it has changed since the last time the check task executed. If all the count
- * variables have changed all the tasks are still executing error free, and the
- * check task toggles the onboard LED. Should any task contain an error at any time
- * the LED toggle rate will change from 3 seconds to 500ms.
- *
- * The "Register Check" tasks. These tasks fill the CPU registers with known
- * values, then check that each register still contains the expected value, the
- * discovery of an unexpected value being indicative of an error in the RTOS
- * context switch mechanism. The register check tasks operate at low priority
- * so are switched in and out frequently.
- *
- */
-
-/* Scheduler includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-
-/* Xilinx library includes. */
-#include "xcache_l.h"
-#include "xintc.h"
-
-/* Demo application includes. */
-#include "flash.h"
-#include "integer.h"
-#include "comtest2.h"
-#include "semtest.h"
-#include "BlockQ.h"
-#include "dynamic.h"
-#include "GenQTest.h"
-#include "QPeek.h"
-#include "blocktim.h"
-#include "death.h"
-#include "partest.h"
-#include "countsem.h"
-#include "recmutex.h"
-#include "flop.h"
-#include "flop-reg-test.h"
-
-/* Priorities assigned to the demo tasks. */
-#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
-#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
-#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
-#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainFLOP_PRIORITY ( tskIDLE_PRIORITY )
-
-/* The first LED used by the COM test and check tasks respectively. */
-#define mainCOM_TEST_LED ( 4 )
-#define mainCHECK_TEST_LED ( 3 )
-
-/* The baud rate used by the comtest tasks is set by the hardware, so the
-baud rate parameters passed into the comtest initialisation has no effect. */
-#define mainBAUD_SET_IN_HARDWARE ( 0 )
-
-/* Delay periods used by the check task. If no errors have been found then
-the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an
-error has been found at any time then the toggle rate will increase to
-mainERROR_CHECK_DELAY milliseconds. */
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
-
-
-/*
- * The tasks defined within this file - described within the comments at the
- * head of this page.
- */
-static void prvRegTestTask1( void *pvParameters );
-static void prvRegTestTask2( void *pvParameters );
-static void prvErrorChecks( void *pvParameters );
-
-/*
- * Called by the 'check' task to inspect all the standard demo tasks within
- * the system, as described within the comments at the head of this page.
- */
-static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );
-
-/*
- * Perform any hardware initialisation required by the demo application.
- */
-static void prvSetupHardware( void );
-
-/*-----------------------------------------------------------*/
-
-/* xRegTestStatus will get set to pdFAIL by the regtest tasks if they
-discover an unexpected value. */
-static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
-
-/* Counters used to ensure the regtest tasks are still running. */
-static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
-
-/*-----------------------------------------------------------*/
-
-int main( void )
-{
-
- /* Must be called prior to installing any interrupt handlers! */
- vPortSetupInterruptController();
-
- /* In this case prvSetupHardware() just enables the caches and and
- configures the IO ports for the LED outputs. */
- prvSetupHardware();
-
- /* Start the standard demo application tasks. Note that the baud rate used
- by the comtest tasks is set by the hardware, so the baud rate parameter
- passed has no effect. */
- vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
- vStartIntegerMathTasks( tskIDLE_PRIORITY );
- vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_SET_IN_HARDWARE, mainCOM_TEST_LED );
- vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
- vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY );
- vStartDynamicPriorityTasks();
- vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
- vStartQueuePeekTasks();
- vCreateBlockTimeTasks();
- vStartCountingSemaphoreTasks();
- vStartRecursiveMutexTasks();
-
- #if ( configUSE_FPU == 1 )
- vStartMathTasks( mainFLOP_PRIORITY );
- vStartFlopRegTests();
- #endif
-
- /* Create the tasks defined within this file. */
- xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
- xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
- xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
-
- /* The suicide tasks must be started last as they record the number of other
- tasks that exist within the system. The value is then used to ensure at run
- time the number of tasks that exists is within expected bounds. */
- vCreateSuicidalTasks( mainDEATH_PRIORITY );
-
- /* Now start the scheduler. Following this call the created tasks should
- be executing. */
- vTaskStartScheduler();
-
- /* vTaskStartScheduler() will only return if an error occurs while the
- idle task is being created. */
- for( ;; );
-
- return 0;
-}
-/*-----------------------------------------------------------*/
-
-static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
-{
-portBASE_TYPE lReturn = pdPASS;
-static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
-
- /* The demo tasks maintain a count that increments every cycle of the task
- provided that the task has never encountered an error. This function
- checks the counts maintained by the tasks to ensure they are still being
- incremented. A count remaining at the same value between calls therefore
- indicates that an error has been detected. */
-
- if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreComTestTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreSemaphoreTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreBlockingQueuesStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xIsCreateTaskStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreGenericQueueTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreQueuePeekTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- #if ( configUSE_FPU == 1 )
- if( xAreMathsTaskStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreFlopRegisterTestsStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
- #endif
-
- /* Have the register test tasks found any errors? */
- if( xRegTestStatus != pdPASS )
- {
- lReturn = pdFAIL;
- }
-
- /* Are the register test tasks still looping? */
- if( ulLastRegTest1Counter == ulRegTest1Counter )
- {
- lReturn = pdFAIL;
- }
- else
- {
- ulLastRegTest1Counter = ulRegTest1Counter;
- }
-
- if( ulLastRegTest2Counter == ulRegTest2Counter )
- {
- lReturn = pdFAIL;
- }
- else
- {
- ulLastRegTest2Counter = ulRegTest2Counter;
- }
-
- return lReturn;
-}
-/*-----------------------------------------------------------*/
-
-static void prvErrorChecks( void *pvParameters )
-{
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;
-volatile unsigned portBASE_TYPE uxFreeStack;
-\r
- /* Just to remove compiler warning. */
- ( void ) pvParameters;
-
- /* This call is just to demonstrate the use of the function - nothing is
- done with the value. You would expect the stack high water mark to be
- lower (the function to return a larger value) here at function entry than
- later following calls to other functions. */
- uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
-
- /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
- works correctly. */
- xLastExecutionTime = xTaskGetTickCount();
-
- /* Cycle for ever, delaying then checking all the other tasks are still
- operating without error. */
- for( ;; )
- {
- /* Again just for demo purposes - uxFreeStack should have a lower value
- here than following the call to uxTaskGetStackHighWaterMark() on the
- task entry. */
- uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
-
- /* Wait until it is time to check again. The time we wait here depends
- on whether an error has been detected or not. When an error is
- detected the time is shortened resulting in a faster LED flash rate. */
- vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
-
- /* See if the other tasks are all ok. */
- if( prvCheckOtherTasksAreStillRunning() != pdPASS )
- {
- /* An error occurred in one of the tasks so shorten the delay
- period - which has the effect of increasing the frequency of the
- LED toggle. */
- xDelayPeriod = mainERROR_CHECK_DELAY;
- }
-
- /* Flash! */
- vParTestToggleLED( mainCHECK_TEST_LED );
- }
-}
-/*-----------------------------------------------------------*/
-
-static void prvSetupHardware( void )
-{
- XCache_EnableICache( 0x80000000 );
- XCache_EnableDCache( 0x80000000 );
-
- /* Setup the IO port for use with the LED outputs. */
- vParTestInitialise();
-}
-/*-----------------------------------------------------------*/
-
-void prvRegTest1Pass( void )
-{
- /* Called from the inline assembler - this cannot be static
- otherwise it can get optimised away. */
- ulRegTest1Counter++;
-}
-/*-----------------------------------------------------------*/
-
-void prvRegTest2Pass( void )
-{
- /* Called from the inline assembler - this cannot be static
- otherwise it can get optimised away. */
- ulRegTest2Counter++;
-}
-/*-----------------------------------------------------------*/
-
-void prvRegTestFail( void )
-{
- /* Called from the inline assembler - this cannot be static
- otherwise it can get optimised away. */
- xRegTestStatus = pdFAIL;
-}
-/*-----------------------------------------------------------*/
-
-static void prvRegTestTask1( void *pvParameters )
+/*\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
+\r
+ This file is part of the FreeRTOS.org distribution.\r
+\r
+ FreeRTOS.org is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ FreeRTOS.org is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with FreeRTOS.org; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+ A special exception to the GPL can be applied should you wish to distribute\r
+ a combined work that includes FreeRTOS.org, without being obliged to provide\r
+ the source code for any proprietary components. See the licensing section\r
+ of http://www.FreeRTOS.org for full details of how and when the exception\r
+ can be applied.\r
+\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *\r
+ * and even write all or part of your application on your behalf. *\r
+ * See http://www.OpenRTOS.com for details of the services we provide to *\r
+ * expedite your project. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
+\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
+\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
+\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
+*/\r
+\r
+/*\r
+ * Creates all the demo application tasks, then starts the scheduler. The WEB\r
+ * documentation provides more details of the demo application tasks.\r
+ * \r
+ * In addition to the standard demo tasks, the follow demo specific tasks are\r
+ * create:\r
+ *\r
+ * The "Check" task. This only executes every three seconds but has the highest \r
+ * priority so is guaranteed to get processor time. Its main function is to \r
+ * check that all the other tasks are still operational. Most tasks maintain \r
+ * a unique count that is incremented each time the task successfully completes \r
+ * its function. Should any error occur within such a task the count is \r
+ * permanently halted. The check task inspects the count of each task to ensure \r
+ * it has changed since the last time the check task executed. If all the count \r
+ * variables have changed all the tasks are still executing error free, and the \r
+ * check task toggles the onboard LED. Should any task contain an error at any time \r
+ * the LED toggle rate will change from 3 seconds to 500ms.\r
+ *\r
+ * The "Register Check" tasks. These tasks fill the CPU registers with known\r
+ * values, then check that each register still contains the expected value, the\r
+ * discovery of an unexpected value being indicative of an error in the RTOS\r
+ * context switch mechanism. The register check tasks operate at low priority\r
+ * so are switched in and out frequently.\r
+ *\r
+ */\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Xilinx library includes. */\r
+#include "xcache_l.h"\r
+#include "xintc.h"\r
+\r
+/* Demo application includes. */\r
+#include "flash.h"\r
+#include "integer.h"\r
+#include "comtest2.h"\r
+#include "semtest.h"\r
+#include "BlockQ.h"\r
+#include "dynamic.h"\r
+#include "GenQTest.h"\r
+#include "QPeek.h"\r
+#include "blocktim.h"\r
+#include "death.h"\r
+#include "partest.h"\r
+#include "countsem.h"\r
+#include "recmutex.h"\r
+#include "flop.h"\r
+#include "flop-reg-test.h"\r
+\r
+/* Priorities assigned to the demo tasks. */\r
+#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )\r
+#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
+#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )\r
+#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainFLOP_PRIORITY ( tskIDLE_PRIORITY )\r
+\r
+/* The first LED used by the COM test and check tasks respectively. */\r
+#define mainCOM_TEST_LED ( 4 )\r
+#define mainCHECK_TEST_LED ( 3 )\r
+\r
+/* The baud rate used by the comtest tasks is set by the hardware, so the\r
+baud rate parameters passed into the comtest initialisation has no effect. */\r
+#define mainBAUD_SET_IN_HARDWARE ( 0 )\r
+\r
+/* Delay periods used by the check task. If no errors have been found then\r
+the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
+error has been found at any time then the toggle rate will increase to \r
+mainERROR_CHECK_DELAY milliseconds. */\r
+#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+\r
+\r
+/* \r
+ * The tasks defined within this file - described within the comments at the\r
+ * head of this page. \r
+ */\r
+static void prvRegTestTask1( void *pvParameters );\r
+static void prvRegTestTask2( void *pvParameters );\r
+static void prvErrorChecks( void *pvParameters );\r
+\r
+/*\r
+ * Called by the 'check' task to inspect all the standard demo tasks within\r
+ * the system, as described within the comments at the head of this page.\r
+ */\r
+static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );\r
+\r
+/*\r
+ * Perform any hardware initialisation required by the demo application.\r
+ */\r
+static void prvSetupHardware( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* xRegTestStatus will get set to pdFAIL by the regtest tasks if they\r
+discover an unexpected value. */\r
+static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;\r
+\r
+/* Counters used to ensure the regtest tasks are still running. */\r
+static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+int main( void )\r
{\r
- /* Just to remove compiler warning. */
- ( void ) pvParameters;
-
- /* The first register test task as described at the top of this file. The
- values used in the registers are different to those use in the second
- register test task. Also, unlike the second register test task, this task
- yields between setting the register values and subsequently checking the
- register values. */
- asm volatile
- (
- "RegTest1Start: \n\t" \
- " \n\t" \
- " li 0, 301 \n\t" \
- " mtspr 256, 0 #USPRG0 \n\t" \
- " li 0, 501 \n\t" \
- " mtspr 8, 0 #LR \n\t" \
- " li 0, 4 \n\t" \
- " mtspr 1, 0 #XER \n\t" \
- " \n\t" \
- " li 0, 1 \n\t" \
- " li 2, 2 \n\t" \
- " li 3, 3 \n\t" \
- " li 4, 4 \n\t" \
- " li 5, 5 \n\t" \
- " li 6, 6 \n\t" \
- " li 7, 7 \n\t" \
- " li 8, 8 \n\t" \
- " li 9, 9 \n\t" \
- " li 10, 10 \n\t" \
- " li 11, 11 \n\t" \
- " li 12, 12 \n\t" \
- " li 13, 13 \n\t" \
- " li 14, 14 \n\t" \
- " li 15, 15 \n\t" \
- " li 16, 16 \n\t" \
- " li 17, 17 \n\t" \
- " li 18, 18 \n\t" \
- " li 19, 19 \n\t" \
- " li 20, 20 \n\t" \
- " li 21, 21 \n\t" \
- " li 22, 22 \n\t" \
- " li 23, 23 \n\t" \
- " li 24, 24 \n\t" \
- " li 25, 25 \n\t" \
- " li 26, 26 \n\t" \
- " li 27, 27 \n\t" \
- " li 28, 28 \n\t" \
- " li 29, 29 \n\t" \
- " li 30, 30 \n\t" \
- " li 31, 31 \n\t" \
- " \n\t" \
- " sc \n\t" \
- " nop \n\t" \
- " \n\t" \
- " cmpwi 0, 1 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 2, 2 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 3, 3 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 4, 4 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 5, 5 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 6, 6 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 7, 7 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 8, 8 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 9, 9 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 10, 10 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 11, 11 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 12, 12 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 13, 13 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 14, 14 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 15, 15 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 16, 16 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 17, 17 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 18, 18 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 19, 19 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 20, 20 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 21, 21 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 22, 22 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 23, 23 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 24, 24 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 25, 25 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 26, 26 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 27, 27 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 28, 28 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 29, 29 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 30, 30 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 31, 31 \n\t" \
- " bne RegTest1Fail \n\t" \
- " \n\t" \
- " mfspr 0, 256 #USPRG0 \n\t" \
- " cmpwi 0, 301 \n\t" \
- " bne RegTest1Fail \n\t" \
- " mfspr 0, 8 #LR \n\t" \
- " cmpwi 0, 501 \n\t" \
- " bne RegTest1Fail \n\t" \
- " mfspr 0, 1 #XER \n\t" \
- " cmpwi 0, 4 \n\t" \
- " bne RegTest1Fail \n\t" \
- " \n\t" \
- " bl prvRegTest1Pass \n\t" \
- " b RegTest1Start \n\t" \
- " \n\t" \
- "RegTest1Fail: \n\t" \
- " \n\t" \
- " \n\t" \
- " bl prvRegTestFail \n\t" \
- " b RegTest1Start \n\t" \
- );
-}
-/*-----------------------------------------------------------*/
-
-static void prvRegTestTask2( void *pvParameters )
+\r
+ /* Must be called prior to installing any interrupt handlers! */\r
+ vPortSetupInterruptController();\r
+\r
+ /* In this case prvSetupHardware() just enables the caches and and\r
+ configures the IO ports for the LED outputs. */\r
+ prvSetupHardware();\r
+\r
+ /* Start the standard demo application tasks. Note that the baud rate used\r
+ by the comtest tasks is set by the hardware, so the baud rate parameter\r
+ passed has no effect. */\r
+ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); \r
+ vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
+ vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_SET_IN_HARDWARE, mainCOM_TEST_LED );\r
+ vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
+ vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); \r
+ vStartDynamicPriorityTasks(); \r
+ vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );\r
+ vStartQueuePeekTasks();\r
+ vCreateBlockTimeTasks();\r
+ vStartCountingSemaphoreTasks();\r
+ vStartRecursiveMutexTasks();\r
+\r
+ #if ( configUSE_FPU == 1 )\r
+ vStartMathTasks( mainFLOP_PRIORITY );\r
+ vStartFlopRegTests();\r
+ #endif\r
+\r
+ /* Create the tasks defined within this file. */\r
+ xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+\r
+ /* The suicide tasks must be started last as they record the number of other\r
+ tasks that exist within the system. The value is then used to ensure at run\r
+ time the number of tasks that exists is within expected bounds. */\r
+ vCreateSuicidalTasks( mainDEATH_PRIORITY );\r
+\r
+ /* Now start the scheduler. Following this call the created tasks should\r
+ be executing. */ \r
+ vTaskStartScheduler();\r
+\r
+ /* vTaskStartScheduler() will only return if an error occurs while the \r
+ idle task is being created. */\r
+ for( ;; );\r
+\r
+ return 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )\r
{\r
- /* Just to remove compiler warning. */
- ( void ) pvParameters;
-
- /* The second register test task as described at the top of this file.
- Note that this task fills the registers with different values to the
- first register test task. */
- asm volatile
- (
- "RegTest2Start: \n\t" \
- " \n\t" \
- " li 0, 300 \n\t" \
- " mtspr 256, 0 #USPRG0 \n\t" \
- " li 0, 500 \n\t" \
- " mtspr 8, 0 #LR \n\t" \
- " li 0, 4 \n\t" \
- " mtspr 1, 0 #XER \n\t" \
- " \n\t" \
- " li 0, 11 \n\t" \
- " li 2, 12 \n\t" \
- " li 3, 13 \n\t" \
- " li 4, 14 \n\t" \
- " li 5, 15 \n\t" \
- " li 6, 16 \n\t" \
- " li 7, 17 \n\t" \
- " li 8, 18 \n\t" \
- " li 9, 19 \n\t" \
- " li 10, 110 \n\t" \
- " li 11, 111 \n\t" \
- " li 12, 112 \n\t" \
- " li 13, 113 \n\t" \
- " li 14, 114 \n\t" \
- " li 15, 115 \n\t" \
- " li 16, 116 \n\t" \
- " li 17, 117 \n\t" \
- " li 18, 118 \n\t" \
- " li 19, 119 \n\t" \
- " li 20, 120 \n\t" \
- " li 21, 121 \n\t" \
- " li 22, 122 \n\t" \
- " li 23, 123 \n\t" \
- " li 24, 124 \n\t" \
- " li 25, 125 \n\t" \
- " li 26, 126 \n\t" \
- " li 27, 127 \n\t" \
- " li 28, 128 \n\t" \
- " li 29, 129 \n\t" \
- " li 30, 130 \n\t" \
- " li 31, 131 \n\t" \
- " \n\t" \
- " cmpwi 0, 11 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 2, 12 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 3, 13 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 4, 14 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 5, 15 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 6, 16 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 7, 17 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 8, 18 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 9, 19 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 10, 110 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 11, 111 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 12, 112 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 13, 113 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 14, 114 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 15, 115 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 16, 116 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 17, 117 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 18, 118 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 19, 119 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 20, 120 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 21, 121 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 22, 122 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 23, 123 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 24, 124 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 25, 125 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 26, 126 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 27, 127 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 28, 128 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 29, 129 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 30, 130 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 31, 131 \n\t" \
- " bne RegTest2Fail \n\t" \
- " \n\t" \
- " mfspr 0, 256 #USPRG0 \n\t" \
- " cmpwi 0, 300 \n\t" \
- " bne RegTest2Fail \n\t" \
- " mfspr 0, 8 #LR \n\t" \
- " cmpwi 0, 500 \n\t" \
- " bne RegTest2Fail \n\t" \
- " mfspr 0, 1 #XER \n\t" \
- " cmpwi 0, 4 \n\t" \
- " bne RegTest2Fail \n\t" \
- " \n\t" \
- " bl prvRegTest2Pass \n\t" \
- " b RegTest2Start \n\t" \
- " \n\t" \
- "RegTest2Fail: \n\t" \
- " \n\t" \
- " \n\t" \
- " bl prvRegTestFail \n\t" \
- " b RegTest2Start \n\t" \
- );
-}
-/*-----------------------------------------------------------*/
-
-/* This hook function will get called if there is a suspected stack overflow.
-An overflow can cause the task name to be corrupted, in which case the task
-handle needs to be used to determine the offending task. */
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
-{
-/* To prevent the optimiser removing the variables. */
-volatile xTaskHandle xTaskIn = xTask;
-volatile signed portCHAR *pcTaskNameIn = pcTaskName;
+portBASE_TYPE lReturn = pdPASS;\r
+static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;\r
+\r
+ /* The demo tasks maintain a count that increments every cycle of the task\r
+ provided that the task has never encountered an error. This function \r
+ checks the counts maintained by the tasks to ensure they are still being\r
+ incremented. A count remaining at the same value between calls therefore\r
+ indicates that an error has been detected. */\r
+\r
+ if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreComTestTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xIsCreateTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ #if ( configUSE_FPU == 1 )\r
+ if( xAreMathsTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreFlopRegisterTestsStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ #endif\r
+\r
+ /* Have the register test tasks found any errors? */\r
+ if( xRegTestStatus != pdPASS )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ /* Are the register test tasks still looping? */\r
+ if( ulLastRegTest1Counter == ulRegTest1Counter )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ ulLastRegTest1Counter = ulRegTest1Counter;\r
+ }\r
+\r
+ if( ulLastRegTest2Counter == ulRegTest2Counter )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ ulLastRegTest2Counter = ulRegTest2Counter;\r
+ }\r
+\r
+ return lReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvErrorChecks( void *pvParameters )\r
+{\r
+portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+volatile unsigned portBASE_TYPE uxFreeStack;\r
+\r
+ /* Just to remove compiler warning. */\r
+ ( void ) pvParameters;\r
+\r
+ /* This call is just to demonstrate the use of the function - nothing is\r
+ done with the value. You would expect the stack high water mark to be\r
+ lower (the function to return a larger value) here at function entry than\r
+ later following calls to other functions. */\r
+ uxFreeStack = uxTaskGetStackHighWaterMark( NULL );\r
+\r
+ /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
+ works correctly. */\r
+ xLastExecutionTime = xTaskGetTickCount();\r
+\r
+ /* Cycle for ever, delaying then checking all the other tasks are still\r
+ operating without error. */\r
+ for( ;; )\r
+ {\r
+ /* Again just for demo purposes - uxFreeStack should have a lower value\r
+ here than following the call to uxTaskGetStackHighWaterMark() on the\r
+ task entry. */\r
+ uxFreeStack = uxTaskGetStackHighWaterMark( NULL );\r
+\r
+ /* Wait until it is time to check again. The time we wait here depends\r
+ on whether an error has been detected or not. When an error is \r
+ detected the time is shortened resulting in a faster LED flash rate. */\r
+ vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );\r
+\r
+ /* See if the other tasks are all ok. */\r
+ if( prvCheckOtherTasksAreStillRunning() != pdPASS )\r
+ {\r
+ /* An error occurred in one of the tasks so shorten the delay \r
+ period - which has the effect of increasing the frequency of the\r
+ LED toggle. */\r
+ xDelayPeriod = mainERROR_CHECK_DELAY;\r
+ }\r
+\r
+ /* Flash! */\r
+ vParTestToggleLED( mainCHECK_TEST_LED );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHardware( void )\r
+{\r
+ XCache_EnableICache( 0x80000000 );\r
+ XCache_EnableDCache( 0x80000000 );\r
+\r
+ /* Setup the IO port for use with the LED outputs. */\r
+ vParTestInitialise();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void prvRegTest1Pass( void )\r
+{\r
+ /* Called from the inline assembler - this cannot be static\r
+ otherwise it can get optimised away. */\r
+ ulRegTest1Counter++;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void prvRegTest2Pass( void )\r
+{\r
+ /* Called from the inline assembler - this cannot be static\r
+ otherwise it can get optimised away. */\r
+ ulRegTest2Counter++;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void prvRegTestFail( void )\r
+{\r
+ /* Called from the inline assembler - this cannot be static\r
+ otherwise it can get optimised away. */\r
+ xRegTestStatus = pdFAIL;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTask1( void *pvParameters )\r
+{\r
+ /* Just to remove compiler warning. */\r
+ ( void ) pvParameters;\r
+\r
+ /* The first register test task as described at the top of this file. The\r
+ values used in the registers are different to those use in the second \r
+ register test task. Also, unlike the second register test task, this task\r
+ yields between setting the register values and subsequently checking the\r
+ register values. */\r
+ asm volatile\r
+ (\r
+ "RegTest1Start: \n\t" \\r
+ " \n\t" \\r
+ " li 0, 301 \n\t" \\r
+ " mtspr 256, 0 #USPRG0 \n\t" \\r
+ " li 0, 501 \n\t" \\r
+ " mtspr 8, 0 #LR \n\t" \\r
+ " li 0, 4 \n\t" \\r
+ " mtspr 1, 0 #XER \n\t" \\r
+ " \n\t" \\r
+ " li 0, 1 \n\t" \\r
+ " li 2, 2 \n\t" \\r
+ " li 3, 3 \n\t" \\r
+ " li 4, 4 \n\t" \\r
+ " li 5, 5 \n\t" \\r
+ " li 6, 6 \n\t" \\r
+ " li 7, 7 \n\t" \\r
+ " li 8, 8 \n\t" \\r
+ " li 9, 9 \n\t" \\r
+ " li 10, 10 \n\t" \\r
+ " li 11, 11 \n\t" \\r
+ " li 12, 12 \n\t" \\r
+ " li 13, 13 \n\t" \\r
+ " li 14, 14 \n\t" \\r
+ " li 15, 15 \n\t" \\r
+ " li 16, 16 \n\t" \\r
+ " li 17, 17 \n\t" \\r
+ " li 18, 18 \n\t" \\r
+ " li 19, 19 \n\t" \\r
+ " li 20, 20 \n\t" \\r
+ " li 21, 21 \n\t" \\r
+ " li 22, 22 \n\t" \\r
+ " li 23, 23 \n\t" \\r
+ " li 24, 24 \n\t" \\r
+ " li 25, 25 \n\t" \\r
+ " li 26, 26 \n\t" \\r
+ " li 27, 27 \n\t" \\r
+ " li 28, 28 \n\t" \\r
+ " li 29, 29 \n\t" \\r
+ " li 30, 30 \n\t" \\r
+ " li 31, 31 \n\t" \\r
+ " \n\t" \\r
+ " sc \n\t" \\r
+ " nop \n\t" \\r
+ " \n\t" \\r
+ " cmpwi 0, 1 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 2, 2 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 3, 3 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 4, 4 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 5, 5 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 6, 6 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 7, 7 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 8, 8 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 9, 9 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 10, 10 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 11, 11 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 12, 12 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 13, 13 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 14, 14 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 15, 15 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 16, 16 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 17, 17 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 18, 18 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 19, 19 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 20, 20 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 21, 21 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 22, 22 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 23, 23 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 24, 24 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 25, 25 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 26, 26 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 27, 27 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 28, 28 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 29, 29 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 30, 30 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 31, 31 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " \n\t" \\r
+ " mfspr 0, 256 #USPRG0 \n\t" \\r
+ " cmpwi 0, 301 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " mfspr 0, 8 #LR \n\t" \\r
+ " cmpwi 0, 501 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " mfspr 0, 1 #XER \n\t" \\r
+ " cmpwi 0, 4 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTest1Pass \n\t" \\r
+ " b RegTest1Start \n\t" \\r
+ " \n\t" \\r
+ "RegTest1Fail: \n\t" \\r
+ " \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTestFail \n\t" \\r
+ " b RegTest1Start \n\t" \\r
+ );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTask2( void *pvParameters )\r
+{\r
+ /* Just to remove compiler warning. */\r
+ ( void ) pvParameters;\r
+\r
+ /* The second register test task as described at the top of this file. \r
+ Note that this task fills the registers with different values to the\r
+ first register test task. */\r
+ asm volatile\r
+ (\r
+ "RegTest2Start: \n\t" \\r
+ " \n\t" \\r
+ " li 0, 300 \n\t" \\r
+ " mtspr 256, 0 #USPRG0 \n\t" \\r
+ " li 0, 500 \n\t" \\r
+ " mtspr 8, 0 #LR \n\t" \\r
+ " li 0, 4 \n\t" \\r
+ " mtspr 1, 0 #XER \n\t" \\r
+ " \n\t" \\r
+ " li 0, 11 \n\t" \\r
+ " li 2, 12 \n\t" \\r
+ " li 3, 13 \n\t" \\r
+ " li 4, 14 \n\t" \\r
+ " li 5, 15 \n\t" \\r
+ " li 6, 16 \n\t" \\r
+ " li 7, 17 \n\t" \\r
+ " li 8, 18 \n\t" \\r
+ " li 9, 19 \n\t" \\r
+ " li 10, 110 \n\t" \\r
+ " li 11, 111 \n\t" \\r
+ " li 12, 112 \n\t" \\r
+ " li 13, 113 \n\t" \\r
+ " li 14, 114 \n\t" \\r
+ " li 15, 115 \n\t" \\r
+ " li 16, 116 \n\t" \\r
+ " li 17, 117 \n\t" \\r
+ " li 18, 118 \n\t" \\r
+ " li 19, 119 \n\t" \\r
+ " li 20, 120 \n\t" \\r
+ " li 21, 121 \n\t" \\r
+ " li 22, 122 \n\t" \\r
+ " li 23, 123 \n\t" \\r
+ " li 24, 124 \n\t" \\r
+ " li 25, 125 \n\t" \\r
+ " li 26, 126 \n\t" \\r
+ " li 27, 127 \n\t" \\r
+ " li 28, 128 \n\t" \\r
+ " li 29, 129 \n\t" \\r
+ " li 30, 130 \n\t" \\r
+ " li 31, 131 \n\t" \\r
+ " \n\t" \\r
+ " cmpwi 0, 11 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 2, 12 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 3, 13 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 4, 14 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 5, 15 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 6, 16 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 7, 17 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 8, 18 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 9, 19 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 10, 110 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 11, 111 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 12, 112 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 13, 113 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 14, 114 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 15, 115 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 16, 116 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 17, 117 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 18, 118 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 19, 119 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 20, 120 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 21, 121 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 22, 122 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 23, 123 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 24, 124 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 25, 125 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 26, 126 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 27, 127 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 28, 128 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 29, 129 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 30, 130 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 31, 131 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " \n\t" \\r
+ " mfspr 0, 256 #USPRG0 \n\t" \\r
+ " cmpwi 0, 300 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " mfspr 0, 8 #LR \n\t" \\r
+ " cmpwi 0, 500 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " mfspr 0, 1 #XER \n\t" \\r
+ " cmpwi 0, 4 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTest2Pass \n\t" \\r
+ " b RegTest2Start \n\t" \\r
+ " \n\t" \\r
+ "RegTest2Fail: \n\t" \\r
+ " \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTestFail \n\t" \\r
+ " b RegTest2Start \n\t" \\r
+ );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* This hook function will get called if there is a suspected stack overflow.\r
+An overflow can cause the task name to be corrupted, in which case the task\r
+handle needs to be used to determine the offending task. */\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )\r
+{\r
+/* To prevent the optimiser removing the variables. */\r
+volatile xTaskHandle xTaskIn = xTask;\r
+volatile signed portCHAR *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
( void ) xTaskIn;\r
( void ) pcTaskNameIn;\r
-
- /* The following three calls are simply to stop compiler warnings about the
- functions not being used - they are called from the inline assembly. */
- prvRegTest1Pass();
- prvRegTest2Pass();
- prvRegTestFail();
-
- for( ;; );
-}
-
-
-
+\r
+ /* The following three calls are simply to stop compiler warnings about the\r
+ functions not being used - they are called from the inline assembly. */\r
+ prvRegTest1Pass();\r
+ prvRegTest2Pass();\r
+ prvRegTestFail();\r
+\r
+ for( ;; );\r
+}\r
+\r
+\r
+\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
-/*
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
-
- This file is part of the FreeRTOS.org distribution.
-
- FreeRTOS.org is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- FreeRTOS.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with FreeRTOS.org; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- A special exception to the GPL can be applied should you wish to distribute
- a combined work that includes FreeRTOS.org, without being obliged to provide
- the source code for any proprietary components. See the licensing section
- of http://www.FreeRTOS.org for full details of how and when the exception
- can be applied.
-
- ***************************************************************************
- ***************************************************************************
- * *
- * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
- * and even write all or part of your application on your behalf. *
- * See http://www.OpenRTOS.com for details of the services we provide to *
- * expedite your project. *
- * *
- ***************************************************************************
- ***************************************************************************
-
- Please ensure to read the configuration and relevant port sections of the
- online documentation.
-
- http://www.FreeRTOS.org - Documentation, latest information, license and
- contact details.
-
- http://www.SafeRTOS.com - A version that is certified for use in safety
- critical systems.
-
- http://www.OpenRTOS.com - Commercial support, development, porting,
- licensing and training services.
-*/
-
-
-/*
- BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART
-*/
-
-/* Scheduler includes. */
-#include "FreeRTOS.h"
-#include "queue.h"
-#include "task.h"
-
-/* Demo application includes. */
-#include "serial.h"
-
-/* Library includes. */
-#include "xparameters.h"
-#include "xuartlite.h"
-#include "xuartlite_l.h"
-
-/*-----------------------------------------------------------*/
-
-/* Queues used to hold received characters, and characters waiting to be
-transmitted. */
-static xQueueHandle xRxedChars;
-static xQueueHandle xCharsForTx;
-
-/* Structure that maintains information on the UART being used. */
-static XUartLite xUART;
-
-/*
- * Sample UART interrupt handler. Note this is used to demonstrate the kernel
- * features and test the port - it is not intended to represent an efficient
- * implementation.
- */
-static void vSerialISR( XUartLite *pxUART );
-
-/*-----------------------------------------------------------*/
-
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
-{
- /* NOTE: The baud rate used by this driver is determined by the hardware
- parameterization of the UART Lite peripheral, and the baud value passed to
- this function has no effect. */
- ( void ) ulWantedBaud;
-
- /* Create the queues used to hold Rx and Tx characters. */
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
-
- /* Only initialise the UART if the queues were created correctly. */
- if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )
- {
-
- XUartLite_Initialize( &xUART, XPAR_RS232_UART_DEVICE_ID );
- XUartLite_ResetFifos( &xUART );
- XUartLite_DisableInterrupt( &xUART );
-
- if( xPortInstallInterruptHandler( XPAR_XPS_INTC_0_RS232_UART_INTERRUPT_INTR, ( XInterruptHandler )vSerialISR, (void *)&xUART ) == pdPASS )
- {
- /* xPortInstallInterruptHandler() could fail if
- vPortSetupInterruptController() has not been called prior to this
- function. */
- XUartLite_EnableInterrupt( &xUART );
- }
- }
-
- /* There is only one port so the handle is not used. */
- return ( xComPortHandle ) 0;
-}
-/*-----------------------------------------------------------*/
-
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
-{
- /* The port handle is not required as this driver only supports one UART. */
- ( void ) pxPort;
-
- /* Get the next character from the buffer. Return false if no characters
- are available, or arrive before xBlockTime expires. */
- if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
- {
- return pdTRUE;
- }
- else
- {
- return pdFALSE;
- }
-}
-/*-----------------------------------------------------------*/
-
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
-{
-portBASE_TYPE xReturn = pdTRUE;
+/*\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
+\r
+ This file is part of the FreeRTOS.org distribution.\r
+\r
+ FreeRTOS.org is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ FreeRTOS.org is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with FreeRTOS.org; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+ A special exception to the GPL can be applied should you wish to distribute\r
+ a combined work that includes FreeRTOS.org, without being obliged to provide\r
+ the source code for any proprietary components. See the licensing section \r
+ of http://www.FreeRTOS.org for full details of how and when the exception\r
+ can be applied.\r
+\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *\r
+ * and even write all or part of your application on your behalf. *\r
+ * See http://www.OpenRTOS.com for details of the services we provide to *\r
+ * expedite your project. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
+\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
+\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
+\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
+*/\r
+\r
+\r
+/* \r
+ BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART\r
+*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "queue.h"\r
+#include "task.h"\r
+\r
+/* Demo application includes. */\r
+#include "serial.h"\r
+\r
+/* Library includes. */\r
+#include "xparameters.h"\r
+#include "xuartlite.h"\r
+#include "xuartlite_l.h"\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Queues used to hold received characters, and characters waiting to be\r
+transmitted. */\r
+static xQueueHandle xRxedChars; \r
+static xQueueHandle xCharsForTx; \r
+\r
+/* Structure that maintains information on the UART being used. */\r
+static XUartLite xUART;\r
+\r
+/*\r
+ * Sample UART interrupt handler. Note this is used to demonstrate the kernel\r
+ * features and test the port - it is not intended to represent an efficient\r
+ * implementation.\r
+ */\r
+static void vSerialISR( XUartLite *pxUART );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+{\r
+ /* NOTE: The baud rate used by this driver is determined by the hardware\r
+ parameterization of the UART Lite peripheral, and the baud value passed to\r
+ this function has no effect. */\r
+ ( void ) ulWantedBaud;\r
+\r
+ /* Create the queues used to hold Rx and Tx characters. */\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+\r
+ /* Only initialise the UART if the queues were created correctly. */\r
+ if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )\r
+ {\r
+\r
+ XUartLite_Initialize( &xUART, XPAR_RS232_UART_DEVICE_ID );\r
+ XUartLite_ResetFifos( &xUART );\r
+ XUartLite_DisableInterrupt( &xUART );\r
+\r
+ if( xPortInstallInterruptHandler( XPAR_XPS_INTC_0_RS232_UART_INTERRUPT_INTR, ( XInterruptHandler )vSerialISR, (void *)&xUART ) == pdPASS )\r
+ {\r
+ /* xPortInstallInterruptHandler() could fail if \r
+ vPortSetupInterruptController() has not been called prior to this \r
+ function. */\r
+ XUartLite_EnableInterrupt( &xUART );\r
+ }\r
+ }\r
+ \r
+ /* There is only one port so the handle is not used. */\r
+ return ( xComPortHandle ) 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+{\r
+ /* The port handle is not required as this driver only supports one UART. */\r
+ ( void ) pxPort;\r
+\r
+ /* Get the next character from the buffer. Return false if no characters\r
+ are available, or arrive before xBlockTime expires. */\r
+ if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )\r
+ {\r
+ return pdTRUE;\r
+ }\r
+ else\r
+ {\r
+ return pdFALSE;\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+{\r
+portBASE_TYPE xReturn = pdTRUE;\r
\r
/* Just to remove compiler warning. */\r
( void ) pxPort;\r
-
- portENTER_CRITICAL();
- {
- /* If the UART FIFO is full we can block posting the new data on the
- Tx queue. */
- if( XUartLite_mIsTransmitFull( XPAR_RS232_UART_BASEADDR ) )
- {
- if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
- {
- xReturn = pdFAIL;
- }
- }
- /* Otherwise, if there is data already in the queue we should add the
- new data to the back of the queue to ensure the sequencing is
- maintained. */
- else if( uxQueueMessagesWaiting( xCharsForTx ) )
- {
- if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
- {
- xReturn = pdFAIL;
- }
- }
- /* If the UART FIFO is not full and there is no data already in the
- queue we can write directly to the FIFO without disrupting the
- sequence. */
- else
- {
- XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cOutChar );
- }
- }
- portEXIT_CRITICAL();
-
- return xReturn;
-}
-/*-----------------------------------------------------------*/
-
-void vSerialClose( xComPortHandle xPort )
-{
- /* Not supported as not required by the demo application. */
- ( void ) xPort;
-}
-/*-----------------------------------------------------------*/
-
-static void vSerialISR( XUartLite *pxUART )
-{
-unsigned portLONG ulISRStatus;
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;
-portCHAR cChar;
+\r
+ portENTER_CRITICAL();\r
+ {\r
+ /* If the UART FIFO is full we can block posting the new data on the\r
+ Tx queue. */\r
+ if( XUartLite_mIsTransmitFull( XPAR_RS232_UART_BASEADDR ) )\r
+ {\r
+ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
+ {\r
+ xReturn = pdFAIL;\r
+ }\r
+ }\r
+ /* Otherwise, if there is data already in the queue we should add the\r
+ new data to the back of the queue to ensure the sequencing is \r
+ maintained. */\r
+ else if( uxQueueMessagesWaiting( xCharsForTx ) )\r
+ {\r
+ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
+ {\r
+ xReturn = pdFAIL;\r
+ } \r
+ }\r
+ /* If the UART FIFO is not full and there is no data already in the\r
+ queue we can write directly to the FIFO without disrupting the \r
+ sequence. */\r
+ else\r
+ {\r
+ XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cOutChar );\r
+ }\r
+ }\r
+ portEXIT_CRITICAL();\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vSerialClose( xComPortHandle xPort )\r
+{\r
+ /* Not supported as not required by the demo application. */\r
+ ( void ) xPort;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vSerialISR( XUartLite *pxUART )\r
+{\r
+unsigned portLONG ulISRStatus;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;\r
+portCHAR cChar;\r
\r
/* Just to remove compiler warning. */\r
( void ) pxUART;\r
-
- do
- {
- lDidSomething = pdFALSE;
-
- ulISRStatus = XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_STATUS_REG_OFFSET );
-
- if( ( ulISRStatus & XUL_SR_RX_FIFO_VALID_DATA ) != 0 )
- {
- /* A character is available - place it in the queue of received
- characters. This might wake a task that was blocked waiting for
- data. */
- cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );
- xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
- lDidSomething = pdTRUE;
- }
-
- if( ( ulISRStatus & XUL_SR_TX_FIFO_EMPTY ) != 0 )
- {
- /* There is space in the FIFO - if there are any characters queue for
- transmission they can be sent to the UART now. This might unblock a
- task that was waiting for space to become available on the Tx queue. */
- if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
- {
- XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cChar );
- lDidSomething = pdTRUE;
- }
- }
- } while( lDidSomething == pdTRUE );
-
- /* If we woke any tasks we may require a context switch. */
- if( xHigherPriorityTaskWoken )
- {
- portYIELD_FROM_ISR();
- }
-}
-
-
-
+\r
+ do\r
+ {\r
+ lDidSomething = pdFALSE;\r
+\r
+ ulISRStatus = XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_STATUS_REG_OFFSET );\r
+\r
+ if( ( ulISRStatus & XUL_SR_RX_FIFO_VALID_DATA ) != 0 )\r
+ {\r
+ /* A character is available - place it in the queue of received\r
+ characters. This might wake a task that was blocked waiting for \r
+ data. */\r
+ cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
+ xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
+ lDidSomething = pdTRUE;\r
+ }\r
+ \r
+ if( ( ulISRStatus & XUL_SR_TX_FIFO_EMPTY ) != 0 )\r
+ {\r
+ /* There is space in the FIFO - if there are any characters queue for\r
+ transmission they can be sent to the UART now. This might unblock a\r
+ task that was waiting for space to become available on the Tx queue. */\r
+ if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )\r
+ {\r
+ XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cChar );\r
+ lDidSomething = pdTRUE;\r
+ } \r
+ }\r
+ } while( lDidSomething == pdTRUE );\r
+\r
+ /* If we woke any tasks we may require a context switch. */\r
+ if( xHigherPriorityTaskWoken )\r
+ {\r
+ portYIELD_FROM_ISR();\r
+ }\r
+}\r
+\r
+\r
+\r
DefaultInit: EXECUTABLE\r
InitBram: 0\r
Active: 1\r
-CompilerOptLevel: 2\r
+CompilerOptLevel: 0\r
GlobPtrOpt: 0\r
DebugSym: 1\r
ProfileFlag: 0\r
-/*
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
-
- This file is part of the FreeRTOS.org distribution.
-
- FreeRTOS.org is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- FreeRTOS.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with FreeRTOS.org; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- A special exception to the GPL can be applied should you wish to distribute
- a combined work that includes FreeRTOS.org, without being obliged to provide
- the source code for any proprietary components. See the licensing section
- of http://www.FreeRTOS.org for full details of how and when the exception
- can be applied.
-
- ***************************************************************************
- ***************************************************************************
- * *
- * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
- * and even write all or part of your application on your behalf. *
- * See http://www.OpenRTOS.com for details of the services we provide to *
- * expedite your project. *
- * *
- ***************************************************************************
- ***************************************************************************
-
- Please ensure to read the configuration and relevant port sections of the
- online documentation.
-
- http://www.FreeRTOS.org - Documentation, latest information, license and
- contact details.
-
- http://www.SafeRTOS.com - A version that is certified for use in safety
- critical systems.
-
- http://www.OpenRTOS.com - Commercial support, development, porting,
- licensing and training services.
-*/
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/*-----------------------------------------------------------
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *----------------------------------------------------------*/
-#define configUSE_PREEMPTION 1
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )
-#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 200000000 ) /* Clock setup from start.asm in the demo application. */
-#define configTICK_RATE_HZ ( (portTickType) 1000 )
-#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
-#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )
-#define configMAX_TASK_NAME_LEN ( 20 )
-#define configUSE_16_BIT_TICKS 1
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_MUTEXES 1
-#define configUSE_TRACE_FACILITY 0
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configUSE_APPLICATION_TASK_TAG 1
-#define configUSE_FPU 0
-
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES ( 4 )
-
-/* Set the following definitions to 1 to include the API function, or zero
-to exclude the API function. */
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskCleanUpResources 1
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_vResumeFromISR 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 1
-#define INCLUDE_xTaskGetCurrentTaskHandle 1
-#define INCLUDE_uxTaskGetStackHighWaterMark 1
-#define configUSE_RECURSIVE_MUTEXES 1
-
-
-#if configUSE_FPU == 1
- /* Include the header that define the traceTASK_SWITCHED_IN() and
- traceTASK_SWITCHED_OUT() macros to save and restore the floating
- point registers for tasks that have requested this behaviour. */
- #include "FPU_Macros.h"
-#endif
-
-#endif /* FREERTOS_CONFIG_H */
-
-
+/*\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
+\r
+ This file is part of the FreeRTOS.org distribution.\r
+\r
+ FreeRTOS.org is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ FreeRTOS.org is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with FreeRTOS.org; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+ A special exception to the GPL can be applied should you wish to distribute\r
+ a combined work that includes FreeRTOS.org, without being obliged to provide\r
+ the source code for any proprietary components. See the licensing section\r
+ of http://www.FreeRTOS.org for full details of how and when the exception\r
+ can be applied.\r
+\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *\r
+ * and even write all or part of your application on your behalf. *\r
+ * See http://www.OpenRTOS.com for details of the services we provide to *\r
+ * expedite your project. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
+\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
+\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
+\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
+*/\r
+\r
+#ifndef FREERTOS_CONFIG_H\r
+#define FREERTOS_CONFIG_H\r
+\r
+/*-----------------------------------------------------------\r
+ * Application specific definitions.\r
+ *\r
+ * These definitions should be adjusted for your particular hardware and\r
+ * application requirements.\r
+ *\r
+ * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
+ * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. \r
+ *----------------------------------------------------------*/\r
+#define configUSE_PREEMPTION 1\r
+#define configUSE_IDLE_HOOK 0\r
+#define configUSE_TICK_HOOK 0\r
+#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 250 )\r
+#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 200000000 ) /* Clock setup from start.asm in the demo application. */\r
+#define configTICK_RATE_HZ ( (portTickType) 1000 )\r
+#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )\r
+#define configTOTAL_HEAP_SIZE ( (size_t) (80 * 1024) )\r
+#define configMAX_TASK_NAME_LEN ( 20 )\r
+#define configUSE_16_BIT_TICKS 1\r
+#define configIDLE_SHOULD_YIELD 1\r
+#define configUSE_MUTEXES 1\r
+#define configUSE_TRACE_FACILITY 0\r
+#define configCHECK_FOR_STACK_OVERFLOW 2\r
+#define configUSE_COUNTING_SEMAPHORES 1\r
+#define configUSE_APPLICATION_TASK_TAG 1\r
+#define configUSE_FPU 0\r
+\r
+\r
+/* Co-routine definitions. */\r
+#define configUSE_CO_ROUTINES 0\r
+#define configMAX_CO_ROUTINE_PRIORITIES ( 4 )\r
+\r
+/* Set the following definitions to 1 to include the API function, or zero\r
+to exclude the API function. */\r
+#define INCLUDE_vTaskPrioritySet 1\r
+#define INCLUDE_uxTaskPriorityGet 1\r
+#define INCLUDE_vTaskDelete 1\r
+#define INCLUDE_vTaskCleanUpResources 1\r
+#define INCLUDE_vTaskSuspend 1\r
+#define INCLUDE_vResumeFromISR 1\r
+#define INCLUDE_vTaskDelayUntil 1\r
+#define INCLUDE_vTaskDelay 1\r
+#define INCLUDE_xTaskGetSchedulerState 1\r
+#define INCLUDE_xTaskGetCurrentTaskHandle 1\r
+#define INCLUDE_uxTaskGetStackHighWaterMark 1\r
+#define configUSE_RECURSIVE_MUTEXES 1\r
+\r
+\r
+#if configUSE_FPU == 1\r
+ /* Include the header that define the traceTASK_SWITCHED_IN() and\r
+ traceTASK_SWITCHED_OUT() macros to save and restore the floating\r
+ point registers for tasks that have requested this behaviour. */\r
+ #include "FPU_Macros.h"\r
+#endif\r
+\r
+#endif /* FREERTOS_CONFIG_H */\r
+\r
+\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
-/*
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
-
- This file is part of the FreeRTOS.org distribution.
-
- FreeRTOS.org is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- FreeRTOS.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with FreeRTOS.org; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- A special exception to the GPL can be applied should you wish to distribute
- a combined work that includes FreeRTOS.org, without being obliged to provide
- the source code for any proprietary components. See the licensing section
- of http://www.FreeRTOS.org for full details of how and when the exception
- can be applied.
-
- ***************************************************************************
- ***************************************************************************
- * *
- * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
- * and even write all or part of your application on your behalf. *
- * See http://www.OpenRTOS.com for details of the services we provide to *
- * expedite your project. *
- * *
- ***************************************************************************
- ***************************************************************************
-
- Please ensure to read the configuration and relevant port sections of the
- online documentation.
-
- http://www.FreeRTOS.org - Documentation, latest information, license and
- contact details.
-
- http://www.SafeRTOS.com - A version that is certified for use in safety
- critical systems.
-
- http://www.OpenRTOS.com - Commercial support, development, porting,
- licensing and training services.
-*/
-
-/*
- * Creates all the demo application tasks, then starts the scheduler. The WEB
- * documentation provides more details of the demo application tasks.
- *
- * In addition to the standard demo tasks, the follow demo specific tasks are
- * create:
- *
- * The "Check" task. This only executes every three seconds but has the highest
- * priority so is guaranteed to get processor time. Its main function is to
- * check that all the other tasks are still operational. Most tasks maintain
- * a unique count that is incremented each time the task successfully completes
- * its function. Should any error occur within such a task the count is
- * permanently halted. The check task inspects the count of each task to ensure
- * it has changed since the last time the check task executed. If all the count
- * variables have changed all the tasks are still executing error free, and the
- * check task toggles the onboard LED. Should any task contain an error at any time
- * the LED toggle rate will change from 3 seconds to 500ms.
- *
- * The "Register Check" tasks. These tasks fill the CPU registers with known
- * values, then check that each register still contains the expected value, the
- * discovery of an unexpected value being indicative of an error in the RTOS
- * context switch mechanism. The register check tasks operate at low priority
- * so are switched in and out frequently.
- *
- */
-
-/* Scheduler includes. */
-#include "FreeRTOS.h"
-#include "task.h"
-
-/* Xilinx library includes. */
-#include "xcache_l.h"
-#include "xintc.h"
-
-/* Demo application includes. */
-#include "flash.h"
-#include "integer.h"
-#include "comtest2.h"
-#include "semtest.h"
-#include "BlockQ.h"
-#include "dynamic.h"
-#include "GenQTest.h"
-#include "QPeek.h"
-#include "blocktim.h"
-#include "death.h"
-#include "partest.h"
-#include "countsem.h"
-#include "recmutex.h"
-#include "flop.h"
-#include "flop-reg-test.h"
-
-/* Priorities assigned to the demo tasks. */
-#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
-#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
-#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
-#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
-#define mainFLOP_PRIORITY ( tskIDLE_PRIORITY )
-
-/* The first LED used by the COM test and check tasks respectively. */
-#define mainCOM_TEST_LED ( 4 )
-#define mainCHECK_TEST_LED ( 3 )
-
-/* The baud rate used by the comtest tasks is set by the hardware, so the
-baud rate parameters passed into the comtest initialisation has no effect. */
-#define mainBAUD_SET_IN_HARDWARE ( 0 )
-
-/* Delay periods used by the check task. If no errors have been found then
-the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an
-error has been found at any time then the toggle rate will increase to
-mainERROR_CHECK_DELAY milliseconds. */
-#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )
-#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
-
-
-/*
- * The tasks defined within this file - described within the comments at the
- * head of this page.
- */
-static void prvRegTestTask1( void *pvParameters );
-static void prvRegTestTask2( void *pvParameters );
-static void prvErrorChecks( void *pvParameters );
-
-/*
- * Called by the 'check' task to inspect all the standard demo tasks within
- * the system, as described within the comments at the head of this page.
- */
-static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );
-
-/*
- * Perform any hardware initialisation required by the demo application.
- */
-static void prvSetupHardware( void );
-
-/*-----------------------------------------------------------*/
-
-/* xRegTestStatus will get set to pdFAIL by the regtest tasks if they
-discover an unexpected value. */
-static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
-
-/* Counters used to ensure the regtest tasks are still running. */
-static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
-
-/*-----------------------------------------------------------*/
-
-int main( void )
-{
-
- /* Must be called prior to installing any interrupt handlers! */
- vPortSetupInterruptController();
-
- /* In this case prvSetupHardware() just enables the caches and and
- configures the IO ports for the LED outputs. */
- prvSetupHardware();
-
- /* Start the standard demo application tasks. Note that the baud rate used
- by the comtest tasks is set by the hardware, so the baud rate parameter
- passed has no effect. */
- vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
- vStartIntegerMathTasks( tskIDLE_PRIORITY );
- vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_SET_IN_HARDWARE, mainCOM_TEST_LED );
- vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
- vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY );
- vStartDynamicPriorityTasks();
- vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
- vStartQueuePeekTasks();
- vCreateBlockTimeTasks();
- vStartCountingSemaphoreTasks();
- vStartRecursiveMutexTasks();
-
+/*\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
+\r
+ This file is part of the FreeRTOS.org distribution.\r
+\r
+ FreeRTOS.org is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ FreeRTOS.org is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with FreeRTOS.org; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+ A special exception to the GPL can be applied should you wish to distribute\r
+ a combined work that includes FreeRTOS.org, without being obliged to provide\r
+ the source code for any proprietary components. See the licensing section\r
+ of http://www.FreeRTOS.org for full details of how and when the exception\r
+ can be applied.\r
+\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *\r
+ * and even write all or part of your application on your behalf. *\r
+ * See http://www.OpenRTOS.com for details of the services we provide to *\r
+ * expedite your project. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
+\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
+\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
+\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
+*/\r
+\r
+/*\r
+ * Creates all the demo application tasks, then starts the scheduler. The WEB\r
+ * documentation provides more details of the demo application tasks.\r
+ * \r
+ * In addition to the standard demo tasks, the follow demo specific tasks are\r
+ * create:\r
+ *\r
+ * The "Check" task. This only executes every three seconds but has the highest \r
+ * priority so is guaranteed to get processor time. Its main function is to \r
+ * check that all the other tasks are still operational. Most tasks maintain \r
+ * a unique count that is incremented each time the task successfully completes \r
+ * its function. Should any error occur within such a task the count is \r
+ * permanently halted. The check task inspects the count of each task to ensure \r
+ * it has changed since the last time the check task executed. If all the count \r
+ * variables have changed all the tasks are still executing error free, and the \r
+ * check task toggles the onboard LED. Should any task contain an error at any time \r
+ * the LED toggle rate will change from 3 seconds to 500ms.\r
+ *\r
+ * The "Register Check" tasks. These tasks fill the CPU registers with known\r
+ * values, then check that each register still contains the expected value, the\r
+ * discovery of an unexpected value being indicative of an error in the RTOS\r
+ * context switch mechanism. The register check tasks operate at low priority\r
+ * so are switched in and out frequently.\r
+ *\r
+ */\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Xilinx library includes. */\r
+#include "xcache_l.h"\r
+#include "xintc.h"\r
+\r
+/* Demo application includes. */\r
+#include "flash.h"\r
+#include "integer.h"\r
+#include "comtest2.h"\r
+#include "semtest.h"\r
+#include "BlockQ.h"\r
+#include "dynamic.h"\r
+#include "GenQTest.h"\r
+#include "QPeek.h"\r
+#include "blocktim.h"\r
+#include "death.h"\r
+#include "partest.h"\r
+#include "countsem.h"\r
+#include "recmutex.h"\r
+#include "flop.h"\r
+#include "flop-reg-test.h"\r
+\r
+/* Priorities assigned to the demo tasks. */\r
+#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )\r
+#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
+#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )\r
+#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+#define mainFLOP_PRIORITY ( tskIDLE_PRIORITY )\r
+\r
+/* The first LED used by the COM test and check tasks respectively. */\r
+#define mainCOM_TEST_LED ( 4 )\r
+#define mainCHECK_TEST_LED ( 3 )\r
+\r
+/* The baud rate used by the comtest tasks is set by the hardware, so the\r
+baud rate parameters passed into the comtest initialisation has no effect. */\r
+#define mainBAUD_SET_IN_HARDWARE ( 0 )\r
+\r
+/* Delay periods used by the check task. If no errors have been found then\r
+the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an\r
+error has been found at any time then the toggle rate will increase to \r
+mainERROR_CHECK_DELAY milliseconds. */\r
+#define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )\r
+#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
+\r
+\r
+/* \r
+ * The tasks defined within this file - described within the comments at the\r
+ * head of this page. \r
+ */\r
+static void prvRegTestTask1( void *pvParameters );\r
+static void prvRegTestTask2( void *pvParameters );\r
+static void prvErrorChecks( void *pvParameters );\r
+\r
+/*\r
+ * Called by the 'check' task to inspect all the standard demo tasks within\r
+ * the system, as described within the comments at the head of this page.\r
+ */\r
+static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );\r
+\r
+/*\r
+ * Perform any hardware initialisation required by the demo application.\r
+ */\r
+static void prvSetupHardware( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* xRegTestStatus will get set to pdFAIL by the regtest tasks if they\r
+discover an unexpected value. */\r
+static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;\r
+\r
+/* Counters used to ensure the regtest tasks are still running. */\r
+static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+int main( void )\r
+{\r
+\r
+ /* Must be called prior to installing any interrupt handlers! */\r
+ vPortSetupInterruptController();\r
+\r
+ /* In this case prvSetupHardware() just enables the caches and and\r
+ configures the IO ports for the LED outputs. */\r
+ prvSetupHardware();\r
+\r
+ /* Start the standard demo application tasks. Note that the baud rate used\r
+ by the comtest tasks is set by the hardware, so the baud rate parameter\r
+ passed has no effect. */\r
+ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); \r
+ vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
+ vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_SET_IN_HARDWARE, mainCOM_TEST_LED );\r
+ vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
+ vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); \r
+ vStartDynamicPriorityTasks(); \r
+ vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );\r
+ vStartQueuePeekTasks();\r
+ vCreateBlockTimeTasks();\r
+ vStartCountingSemaphoreTasks();\r
+ vStartRecursiveMutexTasks();\r
+\r
#if ( configUSE_FPU == 1 )\r
{\r
/* A different project is provided that has configUSE_FPU set to 1\r
in order to demonstrate all the settings required to use the floating\r
point unit. If you wish to use the floating point unit do not start\r
- with this project. */
- vStartMathTasks( mainFLOP_PRIORITY );
+ with this project. */\r
+ vStartMathTasks( mainFLOP_PRIORITY );\r
vStartFlopRegTests();\r
- }
- #endif
-
- /* Create the tasks defined within this file. */
- xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
- xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
- xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
-
- /* The suicide tasks must be started last as they record the number of other
- tasks that exist within the system. The value is then used to ensure at run
- time the number of tasks that exists is within expected bounds. */
- vCreateSuicidalTasks( mainDEATH_PRIORITY );
-
- /* Now start the scheduler. Following this call the created tasks should
- be executing. */
- vTaskStartScheduler();
-
- /* vTaskStartScheduler() will only return if an error occurs while the
- idle task is being created. */
- for( ;; );
-
- return 0;
-}
-/*-----------------------------------------------------------*/
-
-static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
-{
-portBASE_TYPE lReturn = pdPASS;
-static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
-
- /* The demo tasks maintain a count that increments every cycle of the task
- provided that the task has never encountered an error. This function
- checks the counts maintained by the tasks to ensure they are still being
- incremented. A count remaining at the same value between calls therefore
- indicates that an error has been detected. */
-
- if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreComTestTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreSemaphoreTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreBlockingQueuesStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xIsCreateTaskStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreGenericQueueTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreQueuePeekTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- #if ( configUSE_FPU == 1 )
- if( xAreMathsTaskStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
-
- if( xAreFlopRegisterTestsStillRunning() != pdTRUE )
- {
- lReturn = pdFAIL;
- }
- #endif
-
- /* Have the register test tasks found any errors? */
- if( xRegTestStatus != pdPASS )
- {
- lReturn = pdFAIL;
- }
-
- /* Are the register test tasks still looping? */
- if( ulLastRegTest1Counter == ulRegTest1Counter )
- {
- lReturn = pdFAIL;
- }
- else
- {
- ulLastRegTest1Counter = ulRegTest1Counter;
- }
-
- if( ulLastRegTest2Counter == ulRegTest2Counter )
- {
- lReturn = pdFAIL;
- }
- else
- {
- ulLastRegTest2Counter = ulRegTest2Counter;
- }
-
- return lReturn;
-}
-/*-----------------------------------------------------------*/
-
-static void prvErrorChecks( void *pvParameters )
-{
-portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;
-volatile unsigned portBASE_TYPE uxFreeStack;
-\r
- /* Just to remove compiler warning. */
- ( void ) pvParameters;
-
- /* This call is just to demonstrate the use of the function - nothing is
- done with the value. You would expect the stack high water mark to be
- lower (the function to return a larger value) here at function entry than
- later following calls to other functions. */
- uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
-
- /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
- works correctly. */
- xLastExecutionTime = xTaskGetTickCount();
-
- /* Cycle for ever, delaying then checking all the other tasks are still
- operating without error. */
- for( ;; )
- {
- /* Again just for demo purposes - uxFreeStack should have a lower value
- here than following the call to uxTaskGetStackHighWaterMark() on the
- task entry. */
- uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
-
- /* Wait until it is time to check again. The time we wait here depends
- on whether an error has been detected or not. When an error is
- detected the time is shortened resulting in a faster LED flash rate. */
- vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
-
- /* See if the other tasks are all ok. */
- if( prvCheckOtherTasksAreStillRunning() != pdPASS )
- {
- /* An error occurred in one of the tasks so shorten the delay
- period - which has the effect of increasing the frequency of the
- LED toggle. */
- xDelayPeriod = mainERROR_CHECK_DELAY;
- }
-
- /* Flash! */
- vParTestToggleLED( mainCHECK_TEST_LED );
- }
-}
-/*-----------------------------------------------------------*/
-
-static void prvSetupHardware( void )
-{
- XCache_EnableICache( 0x80000000 );
- XCache_EnableDCache( 0x80000000 );
-
- /* Setup the IO port for use with the LED outputs. */
- vParTestInitialise();
-}
-/*-----------------------------------------------------------*/
-
-void prvRegTest1Pass( void )
-{
- /* Called from the inline assembler - this cannot be static
- otherwise it can get optimised away. */
- ulRegTest1Counter++;
-}
-/*-----------------------------------------------------------*/
-
-void prvRegTest2Pass( void )
-{
- /* Called from the inline assembler - this cannot be static
- otherwise it can get optimised away. */
- ulRegTest2Counter++;
-}
-/*-----------------------------------------------------------*/
-
-void prvRegTestFail( void )
-{
- /* Called from the inline assembler - this cannot be static
- otherwise it can get optimised away. */
- xRegTestStatus = pdFAIL;
-}
-/*-----------------------------------------------------------*/
-
-static void prvRegTestTask1( void *pvParameters )
+ }\r
+ #endif\r
+\r
+ /* Create the tasks defined within this file. */\r
+ xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+ xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+\r
+ /* The suicide tasks must be started last as they record the number of other\r
+ tasks that exist within the system. The value is then used to ensure at run\r
+ time the number of tasks that exists is within expected bounds. */\r
+ vCreateSuicidalTasks( mainDEATH_PRIORITY );\r
+\r
+ /* Now start the scheduler. Following this call the created tasks should\r
+ be executing. */ \r
+ vTaskStartScheduler();\r
+\r
+ /* vTaskStartScheduler() will only return if an error occurs while the \r
+ idle task is being created. */\r
+ for( ;; );\r
+\r
+ return 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )\r
{\r
- /* Just to remove compiler warning. */
- ( void ) pvParameters;
-
- /* The first register test task as described at the top of this file. The
- values used in the registers are different to those use in the second
- register test task. Also, unlike the second register test task, this task
- yields between setting the register values and subsequently checking the
- register values. */
- asm volatile
- (
- "RegTest1Start: \n\t" \
- " \n\t" \
- " li 0, 301 \n\t" \
- " mtspr 256, 0 #USPRG0 \n\t" \
- " li 0, 501 \n\t" \
- " mtspr 8, 0 #LR \n\t" \
- " li 0, 4 \n\t" \
- " mtspr 1, 0 #XER \n\t" \
- " \n\t" \
- " li 0, 1 \n\t" \
- " li 2, 2 \n\t" \
- " li 3, 3 \n\t" \
- " li 4, 4 \n\t" \
- " li 5, 5 \n\t" \
- " li 6, 6 \n\t" \
- " li 7, 7 \n\t" \
- " li 8, 8 \n\t" \
- " li 9, 9 \n\t" \
- " li 10, 10 \n\t" \
- " li 11, 11 \n\t" \
- " li 12, 12 \n\t" \
- " li 13, 13 \n\t" \
- " li 14, 14 \n\t" \
- " li 15, 15 \n\t" \
- " li 16, 16 \n\t" \
- " li 17, 17 \n\t" \
- " li 18, 18 \n\t" \
- " li 19, 19 \n\t" \
- " li 20, 20 \n\t" \
- " li 21, 21 \n\t" \
- " li 22, 22 \n\t" \
- " li 23, 23 \n\t" \
- " li 24, 24 \n\t" \
- " li 25, 25 \n\t" \
- " li 26, 26 \n\t" \
- " li 27, 27 \n\t" \
- " li 28, 28 \n\t" \
- " li 29, 29 \n\t" \
- " li 30, 30 \n\t" \
- " li 31, 31 \n\t" \
- " \n\t" \
- " sc \n\t" \
- " nop \n\t" \
- " \n\t" \
- " cmpwi 0, 1 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 2, 2 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 3, 3 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 4, 4 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 5, 5 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 6, 6 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 7, 7 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 8, 8 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 9, 9 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 10, 10 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 11, 11 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 12, 12 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 13, 13 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 14, 14 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 15, 15 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 16, 16 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 17, 17 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 18, 18 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 19, 19 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 20, 20 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 21, 21 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 22, 22 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 23, 23 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 24, 24 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 25, 25 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 26, 26 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 27, 27 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 28, 28 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 29, 29 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 30, 30 \n\t" \
- " bne RegTest1Fail \n\t" \
- " cmpwi 31, 31 \n\t" \
- " bne RegTest1Fail \n\t" \
- " \n\t" \
- " mfspr 0, 256 #USPRG0 \n\t" \
- " cmpwi 0, 301 \n\t" \
- " bne RegTest1Fail \n\t" \
- " mfspr 0, 8 #LR \n\t" \
- " cmpwi 0, 501 \n\t" \
- " bne RegTest1Fail \n\t" \
- " mfspr 0, 1 #XER \n\t" \
- " cmpwi 0, 4 \n\t" \
- " bne RegTest1Fail \n\t" \
- " \n\t" \
- " bl prvRegTest1Pass \n\t" \
- " b RegTest1Start \n\t" \
- " \n\t" \
- "RegTest1Fail: \n\t" \
- " \n\t" \
- " \n\t" \
- " bl prvRegTestFail \n\t" \
- " b RegTest1Start \n\t" \
- );
-}
-/*-----------------------------------------------------------*/
-
-static void prvRegTestTask2( void *pvParameters )
+portBASE_TYPE lReturn = pdPASS;\r
+static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;\r
+\r
+ /* The demo tasks maintain a count that increments every cycle of the task\r
+ provided that the task has never encountered an error. This function \r
+ checks the counts maintained by the tasks to ensure they are still being\r
+ incremented. A count remaining at the same value between calls therefore\r
+ indicates that an error has been detected. */\r
+\r
+ if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreComTestTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xIsCreateTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ \r
+ if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ #if ( configUSE_FPU == 1 )\r
+ if( xAreMathsTaskStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ if( xAreFlopRegisterTestsStillRunning() != pdTRUE )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ #endif\r
+\r
+ /* Have the register test tasks found any errors? */\r
+ if( xRegTestStatus != pdPASS )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+\r
+ /* Are the register test tasks still looping? */\r
+ if( ulLastRegTest1Counter == ulRegTest1Counter )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ ulLastRegTest1Counter = ulRegTest1Counter;\r
+ }\r
+\r
+ if( ulLastRegTest2Counter == ulRegTest2Counter )\r
+ {\r
+ lReturn = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ ulLastRegTest2Counter = ulRegTest2Counter;\r
+ }\r
+\r
+ return lReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvErrorChecks( void *pvParameters )\r
+{\r
+portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
+volatile unsigned portBASE_TYPE uxFreeStack;\r
+\r
+ /* Just to remove compiler warning. */\r
+ ( void ) pvParameters;\r
+\r
+ /* This call is just to demonstrate the use of the function - nothing is\r
+ done with the value. You would expect the stack high water mark to be\r
+ lower (the function to return a larger value) here at function entry than\r
+ later following calls to other functions. */\r
+ uxFreeStack = uxTaskGetStackHighWaterMark( NULL );\r
+\r
+ /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
+ works correctly. */\r
+ xLastExecutionTime = xTaskGetTickCount();\r
+\r
+ /* Cycle for ever, delaying then checking all the other tasks are still\r
+ operating without error. */\r
+ for( ;; )\r
+ {\r
+ /* Again just for demo purposes - uxFreeStack should have a lower value\r
+ here than following the call to uxTaskGetStackHighWaterMark() on the\r
+ task entry. */\r
+ uxFreeStack = uxTaskGetStackHighWaterMark( NULL );\r
+\r
+ /* Wait until it is time to check again. The time we wait here depends\r
+ on whether an error has been detected or not. When an error is \r
+ detected the time is shortened resulting in a faster LED flash rate. */\r
+ vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );\r
+\r
+ /* See if the other tasks are all ok. */\r
+ if( prvCheckOtherTasksAreStillRunning() != pdPASS )\r
+ {\r
+ /* An error occurred in one of the tasks so shorten the delay \r
+ period - which has the effect of increasing the frequency of the\r
+ LED toggle. */\r
+ xDelayPeriod = mainERROR_CHECK_DELAY;\r
+ }\r
+\r
+ /* Flash! */\r
+ vParTestToggleLED( mainCHECK_TEST_LED );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHardware( void )\r
+{\r
+ XCache_EnableICache( 0x80000000 );\r
+ XCache_EnableDCache( 0x80000000 );\r
+\r
+ /* Setup the IO port for use with the LED outputs. */\r
+ vParTestInitialise();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void prvRegTest1Pass( void )\r
+{\r
+ /* Called from the inline assembler - this cannot be static\r
+ otherwise it can get optimised away. */\r
+ ulRegTest1Counter++;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void prvRegTest2Pass( void )\r
+{\r
+ /* Called from the inline assembler - this cannot be static\r
+ otherwise it can get optimised away. */\r
+ ulRegTest2Counter++;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void prvRegTestFail( void )\r
+{\r
+ /* Called from the inline assembler - this cannot be static\r
+ otherwise it can get optimised away. */\r
+ xRegTestStatus = pdFAIL;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTask1( void *pvParameters )\r
+{\r
+ /* Just to remove compiler warning. */\r
+ ( void ) pvParameters;\r
+\r
+ /* The first register test task as described at the top of this file. The\r
+ values used in the registers are different to those use in the second \r
+ register test task. Also, unlike the second register test task, this task\r
+ yields between setting the register values and subsequently checking the\r
+ register values. */\r
+ asm volatile\r
+ (\r
+ "RegTest1Start: \n\t" \\r
+ " \n\t" \\r
+ " li 0, 301 \n\t" \\r
+ " mtspr 256, 0 #USPRG0 \n\t" \\r
+ " li 0, 501 \n\t" \\r
+ " mtspr 8, 0 #LR \n\t" \\r
+ " li 0, 4 \n\t" \\r
+ " mtspr 1, 0 #XER \n\t" \\r
+ " \n\t" \\r
+ " li 0, 1 \n\t" \\r
+ " li 2, 2 \n\t" \\r
+ " li 3, 3 \n\t" \\r
+ " li 4, 4 \n\t" \\r
+ " li 5, 5 \n\t" \\r
+ " li 6, 6 \n\t" \\r
+ " li 7, 7 \n\t" \\r
+ " li 8, 8 \n\t" \\r
+ " li 9, 9 \n\t" \\r
+ " li 10, 10 \n\t" \\r
+ " li 11, 11 \n\t" \\r
+ " li 12, 12 \n\t" \\r
+ " li 13, 13 \n\t" \\r
+ " li 14, 14 \n\t" \\r
+ " li 15, 15 \n\t" \\r
+ " li 16, 16 \n\t" \\r
+ " li 17, 17 \n\t" \\r
+ " li 18, 18 \n\t" \\r
+ " li 19, 19 \n\t" \\r
+ " li 20, 20 \n\t" \\r
+ " li 21, 21 \n\t" \\r
+ " li 22, 22 \n\t" \\r
+ " li 23, 23 \n\t" \\r
+ " li 24, 24 \n\t" \\r
+ " li 25, 25 \n\t" \\r
+ " li 26, 26 \n\t" \\r
+ " li 27, 27 \n\t" \\r
+ " li 28, 28 \n\t" \\r
+ " li 29, 29 \n\t" \\r
+ " li 30, 30 \n\t" \\r
+ " li 31, 31 \n\t" \\r
+ " \n\t" \\r
+ " sc \n\t" \\r
+ " nop \n\t" \\r
+ " \n\t" \\r
+ " cmpwi 0, 1 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 2, 2 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 3, 3 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 4, 4 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 5, 5 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 6, 6 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 7, 7 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 8, 8 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 9, 9 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 10, 10 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 11, 11 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 12, 12 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 13, 13 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 14, 14 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 15, 15 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 16, 16 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 17, 17 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 18, 18 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 19, 19 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 20, 20 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 21, 21 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 22, 22 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 23, 23 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 24, 24 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 25, 25 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 26, 26 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 27, 27 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 28, 28 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 29, 29 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 30, 30 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " cmpwi 31, 31 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " \n\t" \\r
+ " mfspr 0, 256 #USPRG0 \n\t" \\r
+ " cmpwi 0, 301 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " mfspr 0, 8 #LR \n\t" \\r
+ " cmpwi 0, 501 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " mfspr 0, 1 #XER \n\t" \\r
+ " cmpwi 0, 4 \n\t" \\r
+ " bne RegTest1Fail \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTest1Pass \n\t" \\r
+ " b RegTest1Start \n\t" \\r
+ " \n\t" \\r
+ "RegTest1Fail: \n\t" \\r
+ " \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTestFail \n\t" \\r
+ " b RegTest1Start \n\t" \\r
+ );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTask2( void *pvParameters )\r
+{\r
+ /* Just to remove compiler warning. */\r
+ ( void ) pvParameters;\r
+\r
+ /* The second register test task as described at the top of this file. \r
+ Note that this task fills the registers with different values to the\r
+ first register test task. */\r
+ asm volatile\r
+ (\r
+ "RegTest2Start: \n\t" \\r
+ " \n\t" \\r
+ " li 0, 300 \n\t" \\r
+ " mtspr 256, 0 #USPRG0 \n\t" \\r
+ " li 0, 500 \n\t" \\r
+ " mtspr 8, 0 #LR \n\t" \\r
+ " li 0, 4 \n\t" \\r
+ " mtspr 1, 0 #XER \n\t" \\r
+ " \n\t" \\r
+ " li 0, 11 \n\t" \\r
+ " li 2, 12 \n\t" \\r
+ " li 3, 13 \n\t" \\r
+ " li 4, 14 \n\t" \\r
+ " li 5, 15 \n\t" \\r
+ " li 6, 16 \n\t" \\r
+ " li 7, 17 \n\t" \\r
+ " li 8, 18 \n\t" \\r
+ " li 9, 19 \n\t" \\r
+ " li 10, 110 \n\t" \\r
+ " li 11, 111 \n\t" \\r
+ " li 12, 112 \n\t" \\r
+ " li 13, 113 \n\t" \\r
+ " li 14, 114 \n\t" \\r
+ " li 15, 115 \n\t" \\r
+ " li 16, 116 \n\t" \\r
+ " li 17, 117 \n\t" \\r
+ " li 18, 118 \n\t" \\r
+ " li 19, 119 \n\t" \\r
+ " li 20, 120 \n\t" \\r
+ " li 21, 121 \n\t" \\r
+ " li 22, 122 \n\t" \\r
+ " li 23, 123 \n\t" \\r
+ " li 24, 124 \n\t" \\r
+ " li 25, 125 \n\t" \\r
+ " li 26, 126 \n\t" \\r
+ " li 27, 127 \n\t" \\r
+ " li 28, 128 \n\t" \\r
+ " li 29, 129 \n\t" \\r
+ " li 30, 130 \n\t" \\r
+ " li 31, 131 \n\t" \\r
+ " \n\t" \\r
+ " cmpwi 0, 11 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 2, 12 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 3, 13 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 4, 14 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 5, 15 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 6, 16 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 7, 17 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 8, 18 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 9, 19 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 10, 110 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 11, 111 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 12, 112 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 13, 113 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 14, 114 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 15, 115 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 16, 116 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 17, 117 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 18, 118 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 19, 119 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 20, 120 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 21, 121 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 22, 122 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 23, 123 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 24, 124 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 25, 125 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 26, 126 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 27, 127 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 28, 128 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 29, 129 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 30, 130 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " cmpwi 31, 131 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " \n\t" \\r
+ " mfspr 0, 256 #USPRG0 \n\t" \\r
+ " cmpwi 0, 300 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " mfspr 0, 8 #LR \n\t" \\r
+ " cmpwi 0, 500 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " mfspr 0, 1 #XER \n\t" \\r
+ " cmpwi 0, 4 \n\t" \\r
+ " bne RegTest2Fail \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTest2Pass \n\t" \\r
+ " b RegTest2Start \n\t" \\r
+ " \n\t" \\r
+ "RegTest2Fail: \n\t" \\r
+ " \n\t" \\r
+ " \n\t" \\r
+ " bl prvRegTestFail \n\t" \\r
+ " b RegTest2Start \n\t" \\r
+ );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* This hook function will get called if there is a suspected stack overflow.\r
+An overflow can cause the task name to be corrupted, in which case the task\r
+handle needs to be used to determine the offending task. */\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )\r
{\r
- /* Just to remove compiler warning. */
- ( void ) pvParameters;
-
- /* The second register test task as described at the top of this file.
- Note that this task fills the registers with different values to the
- first register test task. */
- asm volatile
- (
- "RegTest2Start: \n\t" \
- " \n\t" \
- " li 0, 300 \n\t" \
- " mtspr 256, 0 #USPRG0 \n\t" \
- " li 0, 500 \n\t" \
- " mtspr 8, 0 #LR \n\t" \
- " li 0, 4 \n\t" \
- " mtspr 1, 0 #XER \n\t" \
- " \n\t" \
- " li 0, 11 \n\t" \
- " li 2, 12 \n\t" \
- " li 3, 13 \n\t" \
- " li 4, 14 \n\t" \
- " li 5, 15 \n\t" \
- " li 6, 16 \n\t" \
- " li 7, 17 \n\t" \
- " li 8, 18 \n\t" \
- " li 9, 19 \n\t" \
- " li 10, 110 \n\t" \
- " li 11, 111 \n\t" \
- " li 12, 112 \n\t" \
- " li 13, 113 \n\t" \
- " li 14, 114 \n\t" \
- " li 15, 115 \n\t" \
- " li 16, 116 \n\t" \
- " li 17, 117 \n\t" \
- " li 18, 118 \n\t" \
- " li 19, 119 \n\t" \
- " li 20, 120 \n\t" \
- " li 21, 121 \n\t" \
- " li 22, 122 \n\t" \
- " li 23, 123 \n\t" \
- " li 24, 124 \n\t" \
- " li 25, 125 \n\t" \
- " li 26, 126 \n\t" \
- " li 27, 127 \n\t" \
- " li 28, 128 \n\t" \
- " li 29, 129 \n\t" \
- " li 30, 130 \n\t" \
- " li 31, 131 \n\t" \
- " \n\t" \
- " cmpwi 0, 11 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 2, 12 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 3, 13 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 4, 14 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 5, 15 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 6, 16 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 7, 17 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 8, 18 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 9, 19 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 10, 110 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 11, 111 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 12, 112 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 13, 113 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 14, 114 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 15, 115 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 16, 116 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 17, 117 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 18, 118 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 19, 119 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 20, 120 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 21, 121 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 22, 122 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 23, 123 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 24, 124 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 25, 125 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 26, 126 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 27, 127 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 28, 128 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 29, 129 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 30, 130 \n\t" \
- " bne RegTest2Fail \n\t" \
- " cmpwi 31, 131 \n\t" \
- " bne RegTest2Fail \n\t" \
- " \n\t" \
- " mfspr 0, 256 #USPRG0 \n\t" \
- " cmpwi 0, 300 \n\t" \
- " bne RegTest2Fail \n\t" \
- " mfspr 0, 8 #LR \n\t" \
- " cmpwi 0, 500 \n\t" \
- " bne RegTest2Fail \n\t" \
- " mfspr 0, 1 #XER \n\t" \
- " cmpwi 0, 4 \n\t" \
- " bne RegTest2Fail \n\t" \
- " \n\t" \
- " bl prvRegTest2Pass \n\t" \
- " b RegTest2Start \n\t" \
- " \n\t" \
- "RegTest2Fail: \n\t" \
- " \n\t" \
- " \n\t" \
- " bl prvRegTestFail \n\t" \
- " b RegTest2Start \n\t" \
- );
-}
-/*-----------------------------------------------------------*/
-
-/* This hook function will get called if there is a suspected stack overflow.
-An overflow can cause the task name to be corrupted, in which case the task
-handle needs to be used to determine the offending task. */
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )
-{
-/* To prevent the optimiser removing the variables. */
-volatile xTaskHandle xTaskIn = xTask;
-volatile signed portCHAR *pcTaskNameIn = pcTaskName;
+/* To prevent the optimiser removing the variables. */\r
+volatile xTaskHandle xTaskIn = xTask;\r
+volatile signed portCHAR *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
( void ) xTaskIn;\r
( void ) pcTaskNameIn;\r
-
- /* The following three calls are simply to stop compiler warnings about the
- functions not being used - they are called from the inline assembly. */
- prvRegTest1Pass();
- prvRegTest2Pass();
- prvRegTestFail();
-
- for( ;; );
-}
-
-
-
+\r
+ /* The following three calls are simply to stop compiler warnings about the\r
+ functions not being used - they are called from the inline assembly. */\r
+ prvRegTest1Pass();\r
+ prvRegTest2Pass();\r
+ prvRegTestFail();\r
+\r
+ for( ;; );\r
+}\r
+\r
+\r
+\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
-/*
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.
-
- This file is part of the FreeRTOS.org distribution.
-
- FreeRTOS.org is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- FreeRTOS.org is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with FreeRTOS.org; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- A special exception to the GPL can be applied should you wish to distribute
- a combined work that includes FreeRTOS.org, without being obliged to provide
- the source code for any proprietary components. See the licensing section
- of http://www.FreeRTOS.org for full details of how and when the exception
- can be applied.
-
- ***************************************************************************
- ***************************************************************************
- * *
- * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *
- * and even write all or part of your application on your behalf. *
- * See http://www.OpenRTOS.com for details of the services we provide to *
- * expedite your project. *
- * *
- ***************************************************************************
- ***************************************************************************
-
- Please ensure to read the configuration and relevant port sections of the
- online documentation.
-
- http://www.FreeRTOS.org - Documentation, latest information, license and
- contact details.
-
- http://www.SafeRTOS.com - A version that is certified for use in safety
- critical systems.
-
- http://www.OpenRTOS.com - Commercial support, development, porting,
- licensing and training services.
-*/
-
-
-/*
- BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART
-*/
-
-/* Scheduler includes. */
-#include "FreeRTOS.h"
-#include "queue.h"
-#include "task.h"
-
-/* Demo application includes. */
-#include "serial.h"
-
-/* Library includes. */
-#include "xparameters.h"
-#include "xuartlite.h"
-#include "xuartlite_l.h"
-
-/*-----------------------------------------------------------*/
-
-/* Queues used to hold received characters, and characters waiting to be
-transmitted. */
-static xQueueHandle xRxedChars;
-static xQueueHandle xCharsForTx;
-
-/* Structure that maintains information on the UART being used. */
-static XUartLite xUART;
-
-/*
- * Sample UART interrupt handler. Note this is used to demonstrate the kernel
- * features and test the port - it is not intended to represent an efficient
- * implementation.
- */
-static void vSerialISR( XUartLite *pxUART );
-
-/*-----------------------------------------------------------*/
-
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
-{
- /* NOTE: The baud rate used by this driver is determined by the hardware
- parameterization of the UART Lite peripheral, and the baud value passed to
- this function has no effect. */
- ( void ) ulWantedBaud;
-
- /* Create the queues used to hold Rx and Tx characters. */
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
-
- /* Only initialise the UART if the queues were created correctly. */
- if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )
- {
-
- XUartLite_Initialize( &xUART, XPAR_RS232_UART_DEVICE_ID );
- XUartLite_ResetFifos( &xUART );
- XUartLite_DisableInterrupt( &xUART );
-
- if( xPortInstallInterruptHandler( XPAR_XPS_INTC_0_RS232_UART_INTERRUPT_INTR, ( XInterruptHandler )vSerialISR, (void *)&xUART ) == pdPASS )
- {
- /* xPortInstallInterruptHandler() could fail if
- vPortSetupInterruptController() has not been called prior to this
- function. */
- XUartLite_EnableInterrupt( &xUART );
- }
- }
-
- /* There is only one port so the handle is not used. */
- return ( xComPortHandle ) 0;
-}
-/*-----------------------------------------------------------*/
-
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
-{
- /* The port handle is not required as this driver only supports one UART. */
- ( void ) pxPort;
-
- /* Get the next character from the buffer. Return false if no characters
- are available, or arrive before xBlockTime expires. */
- if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
- {
- return pdTRUE;
- }
- else
- {
- return pdFALSE;
- }
-}
-/*-----------------------------------------------------------*/
-
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
-{
-portBASE_TYPE xReturn = pdTRUE;
+/*\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
+\r
+ This file is part of the FreeRTOS.org distribution.\r
+\r
+ FreeRTOS.org is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation; either version 2 of the License, or\r
+ (at your option) any later version.\r
+\r
+ FreeRTOS.org is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with FreeRTOS.org; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+ A special exception to the GPL can be applied should you wish to distribute\r
+ a combined work that includes FreeRTOS.org, without being obliged to provide\r
+ the source code for any proprietary components. See the licensing section \r
+ of http://www.FreeRTOS.org for full details of how and when the exception\r
+ can be applied.\r
+\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * SAVE TIME AND MONEY! We can port FreeRTOS.org to your own hardware, *\r
+ * and even write all or part of your application on your behalf. *\r
+ * See http://www.OpenRTOS.com for details of the services we provide to *\r
+ * expedite your project. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
+ online documentation.\r
+\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
+\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
+\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
+*/\r
+\r
+\r
+/* \r
+ BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART\r
+*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "queue.h"\r
+#include "task.h"\r
+\r
+/* Demo application includes. */\r
+#include "serial.h"\r
+\r
+/* Library includes. */\r
+#include "xparameters.h"\r
+#include "xuartlite.h"\r
+#include "xuartlite_l.h"\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Queues used to hold received characters, and characters waiting to be\r
+transmitted. */\r
+static xQueueHandle xRxedChars; \r
+static xQueueHandle xCharsForTx; \r
+\r
+/* Structure that maintains information on the UART being used. */\r
+static XUartLite xUART;\r
+\r
+/*\r
+ * Sample UART interrupt handler. Note this is used to demonstrate the kernel\r
+ * features and test the port - it is not intended to represent an efficient\r
+ * implementation.\r
+ */\r
+static void vSerialISR( XUartLite *pxUART );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+{\r
+ /* NOTE: The baud rate used by this driver is determined by the hardware\r
+ parameterization of the UART Lite peripheral, and the baud value passed to\r
+ this function has no effect. */\r
+ ( void ) ulWantedBaud;\r
+\r
+ /* Create the queues used to hold Rx and Tx characters. */\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+\r
+ /* Only initialise the UART if the queues were created correctly. */\r
+ if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )\r
+ {\r
+\r
+ XUartLite_Initialize( &xUART, XPAR_RS232_UART_DEVICE_ID );\r
+ XUartLite_ResetFifos( &xUART );\r
+ XUartLite_DisableInterrupt( &xUART );\r
+\r
+ if( xPortInstallInterruptHandler( XPAR_XPS_INTC_0_RS232_UART_INTERRUPT_INTR, ( XInterruptHandler )vSerialISR, (void *)&xUART ) == pdPASS )\r
+ {\r
+ /* xPortInstallInterruptHandler() could fail if \r
+ vPortSetupInterruptController() has not been called prior to this \r
+ function. */\r
+ XUartLite_EnableInterrupt( &xUART );\r
+ }\r
+ }\r
+ \r
+ /* There is only one port so the handle is not used. */\r
+ return ( xComPortHandle ) 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+{\r
+ /* The port handle is not required as this driver only supports one UART. */\r
+ ( void ) pxPort;\r
+\r
+ /* Get the next character from the buffer. Return false if no characters\r
+ are available, or arrive before xBlockTime expires. */\r
+ if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )\r
+ {\r
+ return pdTRUE;\r
+ }\r
+ else\r
+ {\r
+ return pdFALSE;\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+{\r
+portBASE_TYPE xReturn = pdTRUE;\r
\r
/* Just to remove compiler warning. */\r
( void ) pxPort;\r
-
- portENTER_CRITICAL();
- {
- /* If the UART FIFO is full we can block posting the new data on the
- Tx queue. */
- if( XUartLite_mIsTransmitFull( XPAR_RS232_UART_BASEADDR ) )
- {
- if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
- {
- xReturn = pdFAIL;
- }
- }
- /* Otherwise, if there is data already in the queue we should add the
- new data to the back of the queue to ensure the sequencing is
- maintained. */
- else if( uxQueueMessagesWaiting( xCharsForTx ) )
- {
- if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
- {
- xReturn = pdFAIL;
- }
- }
- /* If the UART FIFO is not full and there is no data already in the
- queue we can write directly to the FIFO without disrupting the
- sequence. */
- else
- {
- XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cOutChar );
- }
- }
- portEXIT_CRITICAL();
-
- return xReturn;
-}
-/*-----------------------------------------------------------*/
-
-void vSerialClose( xComPortHandle xPort )
-{
- /* Not supported as not required by the demo application. */
- ( void ) xPort;
-}
-/*-----------------------------------------------------------*/
-
-static void vSerialISR( XUartLite *pxUART )
-{
-unsigned portLONG ulISRStatus;
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;
-portCHAR cChar;
+\r
+ portENTER_CRITICAL();\r
+ {\r
+ /* If the UART FIFO is full we can block posting the new data on the\r
+ Tx queue. */\r
+ if( XUartLite_mIsTransmitFull( XPAR_RS232_UART_BASEADDR ) )\r
+ {\r
+ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
+ {\r
+ xReturn = pdFAIL;\r
+ }\r
+ }\r
+ /* Otherwise, if there is data already in the queue we should add the\r
+ new data to the back of the queue to ensure the sequencing is \r
+ maintained. */\r
+ else if( uxQueueMessagesWaiting( xCharsForTx ) )\r
+ {\r
+ if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )\r
+ {\r
+ xReturn = pdFAIL;\r
+ } \r
+ }\r
+ /* If the UART FIFO is not full and there is no data already in the\r
+ queue we can write directly to the FIFO without disrupting the \r
+ sequence. */\r
+ else\r
+ {\r
+ XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cOutChar );\r
+ }\r
+ }\r
+ portEXIT_CRITICAL();\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vSerialClose( xComPortHandle xPort )\r
+{\r
+ /* Not supported as not required by the demo application. */\r
+ ( void ) xPort;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vSerialISR( XUartLite *pxUART )\r
+{\r
+unsigned portLONG ulISRStatus;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;\r
+portCHAR cChar;\r
\r
/* Just to remove compiler warning. */\r
( void ) pxUART;\r
-
- do
- {
- lDidSomething = pdFALSE;
-
- ulISRStatus = XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_STATUS_REG_OFFSET );
-
- if( ( ulISRStatus & XUL_SR_RX_FIFO_VALID_DATA ) != 0 )
- {
- /* A character is available - place it in the queue of received
- characters. This might wake a task that was blocked waiting for
- data. */
- cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );
- xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
- lDidSomething = pdTRUE;
- }
-
- if( ( ulISRStatus & XUL_SR_TX_FIFO_EMPTY ) != 0 )
- {
- /* There is space in the FIFO - if there are any characters queue for
- transmission they can be sent to the UART now. This might unblock a
- task that was waiting for space to become available on the Tx queue. */
- if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
- {
- XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cChar );
- lDidSomething = pdTRUE;
- }
- }
- } while( lDidSomething == pdTRUE );
-
- /* If we woke any tasks we may require a context switch. */
- if( xHigherPriorityTaskWoken )
- {
- portYIELD_FROM_ISR();
- }
-}
-
-
-
+\r
+ do\r
+ {\r
+ lDidSomething = pdFALSE;\r
+\r
+ ulISRStatus = XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_STATUS_REG_OFFSET );\r
+\r
+ if( ( ulISRStatus & XUL_SR_RX_FIFO_VALID_DATA ) != 0 )\r
+ {\r
+ /* A character is available - place it in the queue of received\r
+ characters. This might wake a task that was blocked waiting for \r
+ data. */\r
+ cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
+ xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
+ lDidSomething = pdTRUE;\r
+ }\r
+ \r
+ if( ( ulISRStatus & XUL_SR_TX_FIFO_EMPTY ) != 0 )\r
+ {\r
+ /* There is space in the FIFO - if there are any characters queue for\r
+ transmission they can be sent to the UART now. This might unblock a\r
+ task that was waiting for space to become available on the Tx queue. */\r
+ if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )\r
+ {\r
+ XIo_Out32( XPAR_RS232_UART_BASEADDR + XUL_TX_FIFO_OFFSET, cChar );\r
+ lDidSomething = pdTRUE;\r
+ } \r
+ }\r
+ } while( lDidSomething == pdTRUE );\r
+\r
+ /* If we woke any tasks we may require a context switch. */\r
+ if( xHigherPriorityTaskWoken )\r
+ {\r
+ portYIELD_FROM_ISR();\r
+ }\r
+}\r
+\r
+\r
+\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
-# FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+# FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
#\r
# This file is part of the FreeRTOS.org distribution.\r
#\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r
/*\r
- FreeRTOS.org V5.0.0 - Copyright (C) 2003-2008 Richard Barry.\r
+ FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.\r
\r
This file is part of the FreeRTOS.org distribution.\r
\r