-I "..\..\Source\include"\r
-I "..\..\Source\portable\Softune\MB91460"\r
-I ".\SRC\utility"\r
--O 0\r
+-O 4\r
+-K SPEED\r
-K SHORTADDRESS\r
-B\r
--K NOSCHEDULE\r
+-K SCHEDULE\r
-K A1\r
-K SARG\r
-Xdof\r
-INF STACK\r
-x vTaskIncrementTick,vTaskSwitchContext\r
--K NOEOPT\r
--K NOLIB\r
--K NOUNROLL\r
+-K EOPT\r
+-K LIB\r
+-K UNROLL\r
$other\r
-Xalign\r
-D__91467D\r
$time\r
-1202736093\r
+1202935848\r
$end\r
$1\r
-g\r
-Xdof\r
$other\r
$time\r
-1202753534\r
+1203105777\r
$end\r
$3\r
-dt s,d,r,a\r
-Xdof\r
$other\r
$time\r
-1202753534\r
+1203105777\r
$end\r
$4\r
-Xdof\r
-Xdof\r
$other\r
$time\r
-1202753534\r
+1203105777\r
$end\r
$3\r
-dt s,d,r,a\r
-Xdof\r
$other\r
$time\r
-1202753534\r
+1203105777\r
$end\r
$4\r
-Xdof\r
Active=STANDALONE\r
\r
[MEMBER]\r
-F0=38\r
+F0=37\r
F1=0 f Source Files\r
-F2=0 c SRC\main.c\r
-F3=0 a SRC\mb91467d.asm\r
-F4=0 a SRC\Start91460.asm\r
-F5=0 c SRC\vectors.c\r
-F6=0 f Source Files\watchdog\r
-F7=0 c SRC\watchdog\watchdog.c\r
-F8=0 f Source Files\utility\r
-F9=0 c SRC\utility\taskutility.c\r
-F10=0 f Source Files\FreeRTOS Source\r
-F11=0 c ..\..\Source\croutine.c\r
-F12=0 c ..\..\Source\list.c\r
-F13=0 c ..\..\Source\queue.c\r
-F14=0 c ..\..\Source\tasks.c\r
-F15=0 f Source Files\FreeRTOS Source\portable\r
-F16=0 c ..\..\Source\portable\Softune\MB91460\__STD_LIB_sbrk.c\r
-F17=0 c ..\..\Source\portable\Softune\MB91460\port.c\r
-F18=0 f Source Files\FreeRTOS Source\portable\MemMang\r
-F19=0 c ..\..\Source\portable\MemMang\heap_1.c\r
-F20=0 c ..\..\Source\portable\MemMang\heap_2.c\r
+F2=0 c SRC\crflash_modified.c\r
+F3=0 c SRC\main.c\r
+F4=0 a SRC\mb91467d.asm\r
+F5=0 a SRC\Start91460.asm\r
+F6=0 c SRC\vectors.c\r
+F7=0 f Source Files\watchdog\r
+F8=0 c SRC\watchdog\watchdog.c\r
+F9=0 f Source Files\utility\r
+F10=0 c SRC\utility\printf-stdarg.c\r
+F11=0 c SRC\utility\taskutility.c\r
+F12=0 f Source Files\FreeRTOS Source\r
+F13=0 c ..\..\Source\croutine.c\r
+F14=0 c ..\..\Source\list.c\r
+F15=0 c ..\..\Source\queue.c\r
+F16=0 c ..\..\Source\tasks.c\r
+F17=0 f Source Files\FreeRTOS Source\portable\r
+F18=0 c ..\..\Source\portable\Softune\MB91460\__STD_LIB_sbrk.c\r
+F19=0 c ..\..\Source\portable\Softune\MB91460\port.c\r
+F20=0 f Source Files\FreeRTOS Source\MemMang\r
F21=0 c ..\..\Source\portable\MemMang\heap_3.c\r
F22=0 f Source Files\Demo Source\r
F23=0 c ..\Common\Minimal\BlockQ.c\r
F30=0 c ..\Common\Minimal\GenQTest.c\r
F31=0 c ..\Common\Minimal\integer.c\r
F32=0 c SRC\partest\partest.c\r
-F33=0 c ..\Common\Minimal\PollQ.c\r
-F34=0 c ..\Common\Minimal\QPeek.c\r
-F35=0 c ..\Common\Minimal\semtest.c\r
-F36=0 f Source Files\Demo Source\serial\r
-F37=0 c SRC\serial\serial.c\r
-F38=0 f Include Files\r
+F33=0 c ..\Common\Minimal\QPeek.c\r
+F34=0 c ..\Common\Minimal\semtest.c\r
+F35=0 f Source Files\Demo Source\serial\r
+F36=0 c SRC\serial\serial.c\r
+F37=0 f Include Files\r
\r
[OPTIONFILE]\r
FILE=91460_template_91467d.dat\r
OPT=STANDALONE\OPT\\r
\r
[MEMBER-STANDALONE]\r
-F0=30\r
+F0=29\r
F1=0 m 1 STANDALONE\ABS\91467d_FreeRTOS.abs\r
F2=9 c 1 ..\..\Source\portable\Softune\MB91460\port.c\r
F2-1=- ..\..\Source\include\FreeRTOS.h\r
F19-9=- ..\Common\include\integer.h\r
F19-10=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
F19-11=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F20=12 c 1 ..\Common\Minimal\PollQ.c\r
+F20=13 c 1 ..\Common\Minimal\QPeek.c\r
F20-1=- ..\..\Source\include\FreeRTOS.h\r
F20-2=- ..\..\Source\include\projdefs.h\r
F20-3=- SRC\FreeRTOSConfig.h\r
F20-7=- ..\..\Source\include\task.h\r
F20-8=- ..\..\Source\include\list.h\r
F20-9=- ..\..\Source\include\queue.h\r
-F20-10=- ..\Common\include\PollQ.h\r
+F20-10=- ..\Common\include\QPeek.h\r
F20-11=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
F20-12=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F21=13 c 1 ..\Common\Minimal\QPeek.c\r
+F20-13=- ..\..\Source\include\semphr.h\r
+F21=13 c 1 ..\Common\Minimal\semtest.c\r
F21-1=- ..\..\Source\include\FreeRTOS.h\r
F21-2=- ..\..\Source\include\projdefs.h\r
F21-3=- SRC\FreeRTOSConfig.h\r
F21-7=- ..\..\Source\include\task.h\r
F21-8=- ..\..\Source\include\list.h\r
F21-9=- ..\..\Source\include\queue.h\r
-F21-10=- ..\Common\include\QPeek.h\r
+F21-10=- ..\Common\include\semtest.h\r
F21-11=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
F21-12=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
F21-13=- ..\..\Source\include\semphr.h\r
-F22=13 c 1 ..\Common\Minimal\semtest.c\r
+F22=10 c 1 ..\..\Source\portable\MemMang\heap_3.c\r
F22-1=- ..\..\Source\include\FreeRTOS.h\r
F22-2=- ..\..\Source\include\projdefs.h\r
F22-3=- SRC\FreeRTOSConfig.h\r
F22-6=- SRC\mb91467d.h\r
F22-7=- ..\..\Source\include\task.h\r
F22-8=- ..\..\Source\include\list.h\r
-F22-9=- ..\..\Source\include\queue.h\r
-F22-10=- ..\Common\include\semtest.h\r
-F22-11=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
-F22-12=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F22-13=- ..\..\Source\include\semphr.h\r
-F23=10 c 1 ..\..\Source\portable\MemMang\heap_3.c\r
+F22-9=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
+F22-10=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F23=12 c 1 SRC\serial\serial.c\r
F23-1=- ..\..\Source\include\FreeRTOS.h\r
F23-2=- ..\..\Source\include\projdefs.h\r
F23-3=- SRC\FreeRTOSConfig.h\r
F23-4=- ..\..\Source\include\portable.h\r
F23-5=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
F23-6=- SRC\mb91467d.h\r
-F23-7=- ..\..\Source\include\task.h\r
-F23-8=- ..\..\Source\include\list.h\r
-F23-9=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
-F23-10=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F24=10 c 0 ..\..\Source\portable\MemMang\heap_1.c\r
-F24-1=- ..\..\Source\include\FreeRTOS.h\r
-F24-2=- ..\..\Source\include\projdefs.h\r
-F24-3=- SRC\FreeRTOSConfig.h\r
-F24-4=- ..\..\Source\include\portable.h\r
-F24-5=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F24-6=- SRC\mb91467d.h\r
+F23-7=- ..\..\Source\include\queue.h\r
+F23-8=- ..\..\Source\include\task.h\r
+F23-9=- ..\..\Source\include\list.h\r
+F23-10=- ..\Common\include\serial.h\r
+F23-11=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
+F23-12=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F24=10 c 1 SRC\watchdog\watchdog.c\r
+F24-1=- SRC\mb91467d.h\r
+F24-2=- ..\..\Source\include\FreeRTOS.h\r
+F24-3=- ..\..\Source\include\projdefs.h\r
+F24-4=- SRC\FreeRTOSConfig.h\r
+F24-5=- ..\..\Source\include\portable.h\r
+F24-6=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
F24-7=- ..\..\Source\include\task.h\r
F24-8=- ..\..\Source\include\list.h\r
-F24-9=- ..\..\..\..\..\SoftuneV6_32bit_REV600008\LIB\911\INCLUDE\stdlib.h\r
-F24-10=- ..\..\..\..\..\SoftuneV6_32bit_REV600008\LIB\911\INCLUDE\stddef.h\r
-F25=10 c 0 ..\..\Source\portable\MemMang\heap_2.c\r
-F25-1=- ..\..\Source\include\FreeRTOS.h\r
-F25-2=- ..\..\Source\include\projdefs.h\r
-F25-3=- SRC\FreeRTOSConfig.h\r
-F25-4=- ..\..\Source\include\portable.h\r
-F25-5=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F25-6=- SRC\mb91467d.h\r
-F25-7=- ..\..\Source\include\task.h\r
-F25-8=- ..\..\Source\include\list.h\r
-F25-9=- ..\..\..\..\..\SoftuneV6_32bit_REV600008\LIB\911\INCLUDE\stdlib.h\r
-F25-10=- ..\..\..\..\..\SoftuneV6_32bit_REV600008\LIB\911\INCLUDE\stddef.h\r
-F26=12 c 1 SRC\serial\serial.c\r
-F26-1=- ..\..\Source\include\FreeRTOS.h\r
-F26-2=- ..\..\Source\include\projdefs.h\r
-F26-3=- SRC\FreeRTOSConfig.h\r
-F26-4=- ..\..\Source\include\portable.h\r
-F26-5=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F26-6=- SRC\mb91467d.h\r
-F26-7=- ..\..\Source\include\queue.h\r
-F26-8=- ..\..\Source\include\task.h\r
-F26-9=- ..\..\Source\include\list.h\r
-F26-10=- ..\Common\include\serial.h\r
-F26-11=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stdlib.h\r
-F26-12=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F27=10 c 1 SRC\watchdog\watchdog.c\r
+F24-9=- SRC\watchdog\watchdog.h\r
+F24-10=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F25=11 c 1 SRC\utility\taskutility.c\r
+F25-1=- SRC\mb91467d.h\r
+F25-2=- SRC\vectors.h\r
+F25-3=- ..\..\Source\include\FreeRTOS.h\r
+F25-4=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F25-5=- ..\..\Source\include\projdefs.h\r
+F25-6=- SRC\FreeRTOSConfig.h\r
+F25-7=- ..\..\Source\include\portable.h\r
+F25-8=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
+F25-9=- ..\..\Source\include\task.h\r
+F25-10=- ..\..\Source\include\list.h\r
+F25-11=- ..\..\Source\include\queue.h\r
+F26=25 c 1 SRC\main.c\r
+F26-1=- SRC\mb91467d.h\r
+F26-2=- SRC\vectors.h\r
+F26-3=- SRC\watchdog\watchdog.h\r
+F26-4=- ..\..\Source\include\FreeRTOS.h\r
+F26-5=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F26-6=- ..\..\Source\include\projdefs.h\r
+F26-7=- SRC\FreeRTOSConfig.h\r
+F26-8=- ..\..\Source\include\portable.h\r
+F26-9=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
+F26-10=- ..\..\Source\include\task.h\r
+F26-11=- ..\..\Source\include\list.h\r
+F26-12=- ..\Common\include\flash.h\r
+F26-13=- ..\Common\include\integer.h\r
+F26-14=- ..\Common\include\comtest2.h\r
+F26-15=- ..\Common\include\semtest.h\r
+F26-16=- ..\Common\include\BlockQ.h\r
+F26-17=- ..\Common\include\dynamic.h\r
+F26-18=- ..\Common\include\flop.h\r
+F26-19=- ..\Common\include\GenQTest.h\r
+F26-20=- ..\Common\include\QPeek.h\r
+F26-21=- ..\Common\include\blocktim.h\r
+F26-22=- ..\Common\include\death.h\r
+F26-23=- SRC\utility\taskutility.h\r
+F26-24=- ..\Common\include\partest.h\r
+F26-25=- ..\Common\include\crflash.h\r
+F27=9 c 1 SRC\partest\partest.c\r
F27-1=- SRC\mb91467d.h\r
F27-2=- ..\..\Source\include\FreeRTOS.h\r
-F27-3=- ..\..\Source\include\projdefs.h\r
-F27-4=- SRC\FreeRTOSConfig.h\r
-F27-5=- ..\..\Source\include\portable.h\r
-F27-6=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F27-7=- ..\..\Source\include\task.h\r
-F27-8=- ..\..\Source\include\list.h\r
-F27-9=- SRC\watchdog\watchdog.h\r
-F27-10=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F28=12 c 1 SRC\utility\taskutility.c\r
-F28-1=- SRC\mb91467d.h\r
-F28-2=- SRC\vectors.h\r
-F28-3=- ..\..\Source\include\FreeRTOS.h\r
-F28-4=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F28-5=- ..\..\Source\include\projdefs.h\r
-F28-6=- SRC\FreeRTOSConfig.h\r
-F28-7=- ..\..\Source\include\portable.h\r
-F28-8=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F28-9=- ..\..\Source\include\task.h\r
-F28-10=- ..\..\Source\include\list.h\r
-F28-11=- ..\..\Source\include\semphr.h\r
-F28-12=- ..\..\Source\include\queue.h\r
-F29=25 c 1 SRC\main.c\r
-F29-1=- SRC\mb91467d.h\r
-F29-2=- SRC\vectors.h\r
-F29-3=- SRC\watchdog\watchdog.h\r
-F29-4=- ..\..\Source\include\FreeRTOS.h\r
-F29-5=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F29-6=- ..\..\Source\include\projdefs.h\r
-F29-7=- SRC\FreeRTOSConfig.h\r
-F29-8=- ..\..\Source\include\portable.h\r
-F29-9=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F29-10=- ..\..\Source\include\task.h\r
-F29-11=- ..\..\Source\include\list.h\r
-F29-12=- ..\Common\include\flash.h\r
-F29-13=- ..\Common\include\integer.h\r
-F29-14=- ..\Common\include\comtest2.h\r
-F29-15=- ..\Common\include\PollQ.h\r
-F29-16=- ..\Common\include\semtest.h\r
-F29-17=- ..\Common\include\BlockQ.h\r
-F29-18=- ..\Common\include\dynamic.h\r
-F29-19=- ..\Common\include\flop.h\r
-F29-20=- ..\Common\include\GenQTest.h\r
-F29-21=- ..\Common\include\QPeek.h\r
-F29-22=- ..\Common\include\blocktim.h\r
-F29-23=- ..\Common\include\death.h\r
-F29-24=- SRC\utility\taskutility.h\r
-F29-25=- ..\Common\include\partest.h\r
-F30=9 c 1 SRC\partest\partest.c\r
-F30-1=- SRC\mb91467d.h\r
-F30-2=- ..\..\Source\include\FreeRTOS.h\r
-F30-3=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
-F30-4=- ..\..\Source\include\projdefs.h\r
-F30-5=- SRC\FreeRTOSConfig.h\r
-F30-6=- ..\..\Source\include\portable.h\r
-F30-7=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
-F30-8=- ..\..\Source\include\task.h\r
-F30-9=- ..\..\Source\include\list.h\r
+F27-3=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F27-4=- ..\..\Source\include\projdefs.h\r
+F27-5=- SRC\FreeRTOSConfig.h\r
+F27-6=- ..\..\Source\include\portable.h\r
+F27-7=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
+F27-8=- ..\..\Source\include\task.h\r
+F27-9=- ..\..\Source\include\list.h\r
+F28=12 c 1 SRC\crflash_modified.c\r
+F28-1=- ..\..\Source\include\FreeRTOS.h\r
+F28-2=- ..\..\..\..\..\..\devtools\Softune6\LIB\911\INCLUDE\stddef.h\r
+F28-3=- ..\..\Source\include\projdefs.h\r
+F28-4=- SRC\FreeRTOSConfig.h\r
+F28-5=- ..\..\Source\include\portable.h\r
+F28-6=- ..\..\Source\portable\Softune\MB91460\portmacro.h\r
+F28-7=- SRC\mb91467d.h\r
+F28-8=- ..\..\Source\include\croutine.h\r
+F28-9=- ..\..\Source\include\list.h\r
+F28-10=- ..\..\Source\include\queue.h\r
+F28-11=- ..\Common\include\partest.h\r
+F28-12=- ..\Common\include\crflash.h\r
+F29=0 c 1 SRC\utility\printf-stdarg.c\r
\r
[BUILDMODE-STANDALONE]\r
kernel=1\r
OPT=MONDEB_INTERNAL\OPT\\r
\r
[MEMBER-MONDEB_INTERNAL]\r
-F0=30\r
+F0=29\r
F1=0 m 1 MONDEB_INTERNAL\ABS\91467d_FreeRTOS.abs\r
F2=0 c 1 ..\..\Source\portable\Softune\MB91460\port.c\r
F3=0 c 1 ..\..\Source\portable\Softune\MB91460\__STD_LIB_sbrk.c\r
F17=0 c 1 ..\Common\Minimal\flop.c\r
F18=0 c 1 ..\Common\Minimal\GenQTest.c\r
F19=0 c 1 ..\Common\Minimal\integer.c\r
-F20=0 c 1 ..\Common\Minimal\PollQ.c\r
-F21=0 c 1 ..\Common\Minimal\QPeek.c\r
-F22=0 c 1 ..\Common\Minimal\semtest.c\r
-F23=0 c 1 ..\..\Source\portable\MemMang\heap_3.c\r
-F24=0 c 1 ..\..\Source\portable\MemMang\heap_1.c\r
-F25=0 c 1 ..\..\Source\portable\MemMang\heap_2.c\r
-F26=0 c 1 SRC\serial\serial.c\r
-F27=0 c 1 SRC\watchdog\watchdog.c\r
-F28=0 c 1 SRC\utility\taskutility.c\r
-F29=0 c 1 SRC\main.c\r
-F30=0 c 1 SRC\partest\partest.c\r
+F20=0 c 1 ..\Common\Minimal\QPeek.c\r
+F21=0 c 1 ..\Common\Minimal\semtest.c\r
+F22=0 c 1 ..\..\Source\portable\MemMang\heap_3.c\r
+F23=0 c 1 SRC\serial\serial.c\r
+F24=0 c 1 SRC\watchdog\watchdog.c\r
+F25=0 c 1 SRC\utility\taskutility.c\r
+F26=0 c 1 SRC\main.c\r
+F27=0 c 1 SRC\partest\partest.c\r
+F28=0 c 1 SRC\crflash_modified.c\r
+F29=0 c 1 SRC\utility\printf-stdarg.c\r
\r
[BUILDMODE-MONDEB_INTERNAL]\r
kernel=1\r
WSP=C:\E\Dev\FreeRTOS\WorkingCopy2\Demo\MB91460_Softune\\r
\r
[EditState]\r
-STATE-1=SRC\main.c:11\r
-Count=1\r
+Count=0\r
\r
#define configUSE_MUTEXES 1\r
\r
/* Co-routine definitions. */\r
-#define configUSE_CO_ROUTINES 0\r
+#define configUSE_CO_ROUTINES 1\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 4 )\r
\r
\r
;\r
#set STACK_RESERVE ON ; <<< reserve stack area in \r
; ; this module\r
-#set STACK_SYS_SIZE 2000 ; <<< byte size of System stack\r
+#set STACK_SYS_SIZE 1000 ; <<< byte size of System stack\r
#set STACK_USR_SIZE 4 ; <<< byte size of User stack \r
;\r
#set STACK_FILL ON ; <<< fills the stack area with pattern\r
--- /dev/null
+/*\r
+ FreeRTOS.org V4.7.1 - 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
+ Please ensure to read the configuration and relevant port sections of the \r
+ online documentation.\r
+\r
+ +++ http://www.FreeRTOS.org +++\r
+ Documentation, latest information, license and contact details. \r
+\r
+ +++ http://www.SafeRTOS.com +++\r
+ A version that is certified for use in safety critical systems.\r
+\r
+ +++ http://www.OpenRTOS.com +++\r
+ Commercial support, development, porting, licensing and training services.\r
+\r
+ ***************************************************************************\r
+*/\r
+\r
+/*\r
+ * This demo application file demonstrates the use of queues to pass data\r
+ * between co-routines.\r
+ *\r
+ * N represents the number of 'fixed delay' co-routines that are created and\r
+ * is set during initialisation.\r
+ *\r
+ * N 'fixed delay' co-routines are created that just block for a fixed\r
+ * period then post the number of an LED onto a queue. Each such co-routine\r
+ * uses a different block period. A single 'flash' co-routine is also created\r
+ * that blocks on the same queue, waiting for the number of the next LED it\r
+ * should flash. Upon receiving a number it simply toggle the instructed LED\r
+ * then blocks on the queue once more. In this manner each LED from LED 0 to\r
+ * LED N-1 is caused to flash at a different rate.\r
+ *\r
+ * The 'fixed delay' co-routines are created with co-routine priority 0. The\r
+ * flash co-routine is created with co-routine priority 1. This means that\r
+ * the queue should never contain more than a single item. This is because\r
+ * posting to the queue will unblock the 'flash' co-routine, and as this has\r
+ * a priority greater than the tasks posting to the queue it is guaranteed to\r
+ * have emptied the queue and blocked once again before the queue can contain\r
+ * any more date. An error is indicated if an attempt to post data to the\r
+ * queue fails - indicating that the queue is already full.\r
+ *\r
+ */\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "croutine.h"\r
+#include "queue.h"\r
+\r
+/* Demo application includes. */\r
+#include "partest.h"\r
+#include "crflash.h"\r
+\r
+/* The queue should only need to be of length 1. See the description at the\r
+top of the file. */\r
+#define crfQUEUE_LENGTH 1\r
+\r
+#define crfFIXED_DELAY_PRIORITY 0\r
+#define crfFLASH_PRIORITY 1\r
+\r
+/* Only one flash co-routine is created so the index is not significant. */\r
+#define crfFLASH_INDEX 0\r
+\r
+/* Don't allow more than crfMAX_FLASH_TASKS 'fixed delay' co-routines to be\r
+created. */\r
+#define crfMAX_FLASH_TASKS 8\r
+\r
+/* We don't want to block when posting to the queue. */\r
+#define crfPOSTING_BLOCK_TIME 0\r
+\r
+/* Added by MPi, this define is added in order to make the vParTestToggleLED()\r
+work. This basically differentiates the PDR09 from PDR00. 7-seg display LEDs connected \r
+to PDR09 (SEG1) are used by the prvFlashCoRoutine() and PDR00 (SEG2) are used by tasks. */ \r
+#define PDR00_Offset 8\r
+\r
+/*\r
+ * The 'fixed delay' co-routine as described at the top of the file.\r
+ */\r
+static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+\r
+/*\r
+ * The 'flash' co-routine as described at the top of the file.\r
+ */\r
+static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+\r
+/* The queue used to pass data between the 'fixed delay' co-routines and the\r
+'flash' co-routine. */\r
+static xQueueHandle xFlashQueue;\r
+\r
+/* This will be set to pdFALSE if we detect an error. */\r
+static unsigned portBASE_TYPE uxCoRoutineFlashStatus = pdPASS;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * See the header file for details.\r
+ */\r
+void vStartFlashCoRoutines( unsigned portBASE_TYPE uxNumberToCreate )\r
+{\r
+unsigned portBASE_TYPE uxIndex;\r
+\r
+ if( uxNumberToCreate > crfMAX_FLASH_TASKS )\r
+ {\r
+ uxNumberToCreate = crfMAX_FLASH_TASKS;\r
+ }\r
+\r
+ /* Create the queue used to pass data between the co-routines. */\r
+ xFlashQueue = xQueueCreate( crfQUEUE_LENGTH, sizeof( unsigned portBASE_TYPE ) );\r
+\r
+ if( xFlashQueue )\r
+ {\r
+ /* Create uxNumberToCreate 'fixed delay' co-routines. */\r
+ for( uxIndex = 0; uxIndex < uxNumberToCreate; uxIndex++ )\r
+ {\r
+ xCoRoutineCreate( prvFixedDelayCoRoutine, crfFIXED_DELAY_PRIORITY, uxIndex );\r
+ }\r
+\r
+ /* Create the 'flash' co-routine. */\r
+ xCoRoutineCreate( prvFlashCoRoutine, crfFLASH_PRIORITY, crfFLASH_INDEX );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+{\r
+/* Even though this is a co-routine the xResult variable does not need to be\r
+static as we do not need it to maintain its state between blocks. */\r
+signed portBASE_TYPE xResult;\r
+/* The uxIndex parameter of the co-routine function is used as an index into\r
+the xFlashRates array to obtain the delay period to use. */\r
+static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS,\r
+ 200 / portTICK_RATE_MS,\r
+ 250 / portTICK_RATE_MS,\r
+ 300 / portTICK_RATE_MS,\r
+ 350 / portTICK_RATE_MS,\r
+ 400 / portTICK_RATE_MS,\r
+ 450 / portTICK_RATE_MS,\r
+ 500 / portTICK_RATE_MS };\r
+\r
+ /* Co-routines MUST start with a call to crSTART. */\r
+ crSTART( xHandle );\r
+\r
+ for( ;; )\r
+ {\r
+ /* Post our uxIndex value onto the queue. This is used as the LED to\r
+ flash. */\r
+ crQUEUE_SEND( xHandle, xFlashQueue, ( void * ) &uxIndex, crfPOSTING_BLOCK_TIME, &xResult );\r
+\r
+ if( xResult != pdPASS )\r
+ {\r
+ /* For the reasons stated at the top of the file we should always\r
+ find that we can post to the queue. If we could not then an error\r
+ has occurred. */\r
+ uxCoRoutineFlashStatus = pdFAIL;\r
+ }\r
+\r
+ crDELAY( xHandle, xFlashRates[ uxIndex ] );\r
+ }\r
+\r
+ /* Co-routines MUST end with a call to crEND. */\r
+ crEND();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+{\r
+/* Even though this is a co-routine the variable do not need to be\r
+static as we do not need it to maintain their state between blocks. */\r
+signed portBASE_TYPE xResult;\r
+unsigned portBASE_TYPE uxLEDToFlash;\r
+\r
+ /* Co-routines MUST start with a call to crSTART. */\r
+ crSTART( xHandle );\r
+ ( void ) uxIndex;\r
+ \r
+ for( ;; )\r
+ {\r
+ /* Block to wait for the number of the LED to flash. */\r
+ crQUEUE_RECEIVE( xHandle, xFlashQueue, &uxLEDToFlash, portMAX_DELAY, &xResult ); \r
+\r
+ if( xResult != pdPASS )\r
+ {\r
+ /* We would not expect to wake unless we received something. */\r
+ uxCoRoutineFlashStatus = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ /* We received the number of an LED to flash - flash it! */\r
+ /* Added by MPi, PDR00_Offset is added in order to make the \r
+ vParTestToggleLED() work. */ \r
+ vParTestToggleLED( uxLEDToFlash + PDR00_Offset );\r
+ }\r
+ }\r
+\r
+ /* Co-routines MUST end with a call to crEND. */\r
+ crEND();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+portBASE_TYPE xAreFlashCoRoutinesStillRunning( void )\r
+{\r
+ /* Return pdPASS or pdFAIL depending on whether an error has been detected\r
+ or not. */\r
+ return uxCoRoutineFlashStatus;\r
+}\r
+\r
#include "flash.h"\r
#include "integer.h"\r
#include "comtest2.h"\r
-#include "PollQ.h"\r
#include "semtest.h"\r
#include "BlockQ.h"\r
#include "dynamic.h"\r
#include "death.h"\r
#include "taskutility.h"\r
#include "partest.h"\r
+#include "crflash.h"\r
\r
/* Demo task priorities. */\r
#define mainWATCHDOG_TASK_PRIORITY ( tskIDLE_PRIORITY + 5 )\r
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )\r
-#define mainUTILITY_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
+#define mainUTILITY_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
-#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
#define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
/* The number of interrupt levels to use. */\r
#define mainINTERRUPT_LEVELS ( 31 )\r
\r
+/* The number of 'flash' co-routines to create - each toggles a different LED. */\r
+#define mainNUM_FLASH_CO_ROUTINES ( 8 )\r
+\r
/*---------------------------------------------------------------------------*/\r
\r
/* \r
vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); \r
vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED - 1 );\r
- vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); \r
vStartDynamicPriorityTasks(); \r
vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );\r
vStartQueuePeekTasks();\r
vCreateBlockTimeTasks();\r
+ vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );\r
\r
/* Start the 'Check' task which is defined in this file. */\r
xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); \r
lReturn = pdFAIL;\r
}\r
\r
- if( xArePollingQueuesStillRunning() != pdTRUE )\r
- {\r
- lReturn = pdFAIL;\r
- }\r
-\r
if( xAreComTestTasksStillRunning() != pdTRUE )\r
{\r
lReturn = pdFAIL;\r
#if WATCHDOG == WTC_IN_IDLE\r
Kick_Watchdog();\r
#endif\r
+\r
+ vCoRoutineSchedule();\r
}\r
#else\r
#if WATCHDOG == WTC_IN_IDLE\r
#define partstNUM_LEDs 8\r
\r
static unsigned portCHAR sState[ 2 ] = { 0xFF, 0xFF };\r
+static unsigned portSHORT sState1[ partstNUM_LEDs ] = { pdFALSE };\r
\r
/*-----------------------------------------------------------*/\r
void vParTestInitialise( void )\r
{\r
+<<<<<<< .mine\r
+ /* Set port for LED outputs. */\r
+ DDR16 = 0xFF;\r
+ DDR25=0xFF;\r
+\r
+ /* Start with LEDs off. */\r
+ PDR16 = 0x00;\r
+ PDR25 = 0x00;\r
+=======\r
DDR00 = 0xFF;\r
PDR00 = 0xFF;\r
DDR09 = 0xFF;\r
PDR09 = 0xFF;\r
+>>>>>>> .r192\r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
if( uxLED < partstNUM_LEDs )\r
{\r
+<<<<<<< .mine\r
+ taskENTER_CRITICAL();\r
+=======\r
vTaskSuspendAll();\r
\r
/* Toggle the state of the single genuine on board LED. */\r
if( ( sState[ 0 ] & ( ( unsigned portCHAR ) ( 1 << uxLED ) ) ) == 0 )\r
+>>>>>>> .r192\r
{\r
+<<<<<<< .mine\r
+ /* Toggle the state of the single genuine on board LED. */\r
+ if( sState[ uxLED ]) \r
+ {\r
+ PDR25 |= ( 1 << uxLED );\r
+ }\r
+ else\r
+ {\r
+ PDR25 &= ~( 1 << uxLED );\r
+ }\r
+ \r
+ sState[ uxLED ] = !( sState[ uxLED ] );\r
+ } \r
+ taskEXIT_CRITICAL();\r
+=======\r
PDR09 |= ( 1 << uxLED );\r
sState[ 0 ] |= ( 1 << uxLED );\r
}\r
}\r
\r
xTaskResumeAll();\r
+>>>>>>> .r192\r
+ }\r
+<<<<<<< .mine\r
+ else\r
+ {\r
+ uxLED -= partstNUM_LEDs;\r
+\r
+ if( uxLED < partstNUM_LEDs )\r
+ {\r
+ taskENTER_CRITICAL();\r
+ {\r
+ /* Toggle the state of the single genuine on board LED. */\r
+ if( sState1[uxLED]) \r
+ {\r
+ PDR16 |= ( 1 << uxLED );\r
+ }\r
+ else\r
+ {\r
+ PDR16 &= ~( 1 << uxLED );\r
+ }\r
+ \r
+ sState1[ uxLED ] = !( sState1[ uxLED ] );\r
+ }\r
+ taskEXIT_CRITICAL();\r
+ }\r
}\r
+=======\r
else\r
{\r
vTaskSuspendAll();\r
\r
xTaskResumeAll();\r
}\r
+>>>>>>> .r192\r
}\r
/*-----------------------------------------------------------*/\r
\r
\r
xTaskResumeAll();\r
}\r
+<<<<<<< .mine\r
+ else \r
+ {\r
+ uxLED -= partstNUM_LEDs;\r
+\r
+ if( uxLED < partstNUM_LEDs )\r
+ {\r
+ taskENTER_CRITICAL();\r
+ {\r
+ if( xValue )\r
+ {\r
+ PDR16 |= (1 << uxLED);\r
+ sState1[uxLED] = 1;\r
+ }\r
+ else\r
+ {\r
+ PDR16 &= ~(1 << uxLED);\r
+ sState1[uxLED] = 0;\r
+ }\r
+ }\r
+ taskEXIT_CRITICAL();\r
+ }\r
+ }\r
+=======\r
else\r
{\r
vTaskSuspendAll();\r
\r
xTaskResumeAll();\r
}\r
+>>>>>>> .r192\r
}\r
\r
--- /dev/null
+/*\r
+ Copyright 2001, 2002 Georges Menie (www.menie.org)\r
+ stdarg version contributed by Christian Ettinger\r
+\r
+ This program is free software; you can redistribute it and/or modify\r
+ it under the terms of the GNU Lesser 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
+ This program 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 Lesser General Public License for more details.\r
+\r
+ You should have received a copy of the GNU Lesser General Public License\r
+ along with this program; if not, write to the Free Software\r
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+*/\r
+\r
+/*\r
+ putchar is the only external dependency for this file,\r
+ if you have a working putchar, leave it commented out.\r
+ If not, uncomment the define below and\r
+ replace outbyte(c) by your own function call.\r
+\r
+#define putchar(c) outbyte(c)\r
+*/\r
+\r
+#include <stdarg.h>\r
+\r
+static void printchar(char **str, int c)\r
+{\r
+ extern int putchar(int c);\r
+ \r
+ if (str) {\r
+ **str = c;\r
+ ++(*str);\r
+ }\r
+ else (void)putchar(c);\r
+}\r
+\r
+#define PAD_RIGHT 1\r
+#define PAD_ZERO 2\r
+\r
+static int prints(char **out, const char *string, int width, int pad)\r
+{\r
+ register int pc = 0, padchar = ' ';\r
+\r
+ if (width > 0) {\r
+ register int len = 0;\r
+ register const char *ptr;\r
+ for (ptr = string; *ptr; ++ptr) ++len;\r
+ if (len >= width) width = 0;\r
+ else width -= len;\r
+ if (pad & PAD_ZERO) padchar = '0';\r
+ }\r
+ if (!(pad & PAD_RIGHT)) {\r
+ for ( ; width > 0; --width) {\r
+ printchar (out, padchar);\r
+ ++pc;\r
+ }\r
+ }\r
+ for ( ; *string ; ++string) {\r
+ printchar (out, *string);\r
+ ++pc;\r
+ }\r
+ for ( ; width > 0; --width) {\r
+ printchar (out, padchar);\r
+ ++pc;\r
+ }\r
+\r
+ return pc;\r
+}\r
+\r
+/* the following should be enough for 32 bit int */\r
+#define PRINT_BUF_LEN 12\r
+\r
+static int printi(char **out, int i, int b, int sg, int width, int pad, int letbase)\r
+{\r
+ char print_buf[PRINT_BUF_LEN];\r
+ register char *s;\r
+ register int t, neg = 0, pc = 0;\r
+ register unsigned int u = i;\r
+\r
+ if (i == 0) {\r
+ print_buf[0] = '0';\r
+ print_buf[1] = '\0';\r
+ return prints (out, print_buf, width, pad);\r
+ }\r
+\r
+ if (sg && b == 10 && i < 0) {\r
+ neg = 1;\r
+ u = -i;\r
+ }\r
+\r
+ s = print_buf + PRINT_BUF_LEN-1;\r
+ *s = '\0';\r
+\r
+ while (u) {\r
+ t = u % b;\r
+ if( t >= 10 )\r
+ t += letbase - '0' - 10;\r
+ *--s = t + '0';\r
+ u /= b;\r
+ }\r
+\r
+ if (neg) {\r
+ if( width && (pad & PAD_ZERO) ) {\r
+ printchar (out, '-');\r
+ ++pc;\r
+ --width;\r
+ }\r
+ else {\r
+ *--s = '-';\r
+ }\r
+ }\r
+\r
+ return pc + prints (out, s, width, pad);\r
+}\r
+\r
+static int print( char **out, const char *format, va_list args )\r
+{\r
+ register int width, pad;\r
+ register int pc = 0;\r
+ char scr[2];\r
+\r
+ for (; *format != 0; ++format) {\r
+ if (*format == '%') {\r
+ ++format;\r
+ width = pad = 0;\r
+ if (*format == '\0') break;\r
+ if (*format == '%') goto out;\r
+ if (*format == '-') {\r
+ ++format;\r
+ pad = PAD_RIGHT;\r
+ }\r
+ while (*format == '0') {\r
+ ++format;\r
+ pad |= PAD_ZERO;\r
+ }\r
+ for ( ; *format >= '0' && *format <= '9'; ++format) {\r
+ width *= 10;\r
+ width += *format - '0';\r
+ }\r
+ if( *format == 's' ) {\r
+ register char *s = (char *)va_arg( args, int );\r
+ pc += prints (out, s?s:"(null)", width, pad);\r
+ continue;\r
+ }\r
+ if( *format == 'd' ) {\r
+ pc += printi (out, va_arg( args, int ), 10, 1, width, pad, 'a');\r
+ continue;\r
+ }\r
+ if( *format == 'x' ) {\r
+ pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'a');\r
+ continue;\r
+ }\r
+ if( *format == 'X' ) {\r
+ pc += printi (out, va_arg( args, int ), 16, 0, width, pad, 'A');\r
+ continue;\r
+ }\r
+ if( *format == 'u' ) {\r
+ pc += printi (out, va_arg( args, int ), 10, 0, width, pad, 'a');\r
+ continue;\r
+ }\r
+ if( *format == 'c' ) {\r
+ /* char are converted to int then pushed on the stack */\r
+ scr[0] = (char)va_arg( args, int );\r
+ scr[1] = '\0';\r
+ pc += prints (out, scr, width, pad);\r
+ continue;\r
+ }\r
+ }\r
+ else {\r
+ out:\r
+ printchar (out, *format);\r
+ ++pc;\r
+ }\r
+ }\r
+ if (out) **out = '\0';\r
+ va_end( args );\r
+ return pc;\r
+}\r
+\r
+int printf(const char *format, ...)\r
+{\r
+ va_list args;\r
+ \r
+ va_start( args, format );\r
+ return print( 0, format, args );\r
+}\r
+\r
+int sprintf(char *out, const char *format, ...)\r
+{\r
+ va_list args;\r
+ \r
+ va_start( args, format );\r
+ return print( &out, format, args );\r
+}\r
+\r
+\r
+int snprintf( char *buf, unsigned int count, const char *format, ... )\r
+{\r
+ va_list args;\r
+ \r
+ ( void ) count;\r
+ \r
+ va_start( args, format );\r
+ return print( &buf, format, args );\r
+}\r
+\r
+\r
+#ifdef TEST_PRINTF\r
+int main(void)\r
+{\r
+ char *ptr = "Hello world!";\r
+ char *np = 0;\r
+ int i = 5;\r
+ unsigned int bs = sizeof(int)*8;\r
+ int mi;\r
+ char buf[80];\r
+\r
+ mi = (1 << (bs-1)) + 1;\r
+ printf("%s\n", ptr);\r
+ printf("printf test\n");\r
+ printf("%s is null pointer\n", np);\r
+ printf("%d = 5\n", i);\r
+ printf("%d = - max int\n", mi);\r
+ printf("char %c = 'a'\n", 'a');\r
+ printf("hex %x = ff\n", 0xff);\r
+ printf("hex %02x = 00\n", 0);\r
+ printf("signed %d = unsigned %u = hex %x\n", -3, -3, -3);\r
+ printf("%d %s(s)%", 0, "message");\r
+ printf("\n");\r
+ printf("%d %s(s) with %%\n", 0, "message");\r
+ sprintf(buf, "justif: \"%-10s\"\n", "left"); printf("%s", buf);\r
+ sprintf(buf, "justif: \"%10s\"\n", "right"); printf("%s", buf);\r
+ sprintf(buf, " 3: %04d zero padded\n", 3); printf("%s", buf);\r
+ sprintf(buf, " 3: %-4d left justif.\n", 3); printf("%s", buf);\r
+ sprintf(buf, " 3: %4d right justif.\n", 3); printf("%s", buf);\r
+ sprintf(buf, "-3: %04d zero padded\n", -3); printf("%s", buf);\r
+ sprintf(buf, "-3: %-4d left justif.\n", -3); printf("%s", buf);\r
+ sprintf(buf, "-3: %4d right justif.\n", -3); printf("%s", buf);\r
+\r
+ return 0;\r
+}\r
+\r
+/*\r
+ * if you compile this file with\r
+ * gcc -Wall $(YOUR_C_OPTIONS) -DTEST_PRINTF -c printf.c\r
+ * you will get a normal warning:\r
+ * printf.c:214: warning: spurious trailing `%' in format\r
+ * this line is testing an invalid % at the end of the format string.\r
+ *\r
+ * this should display (on 32bit int machine) :\r
+ *\r
+ * Hello world!\r
+ * printf test\r
+ * (null) is null pointer\r
+ * 5 = 5\r
+ * -2147483647 = - max int\r
+ * char a = 'a'\r
+ * hex ff = ff\r
+ * hex 00 = 00\r
+ * signed -3 = unsigned 4294967293 = hex fffffffd\r
+ * 0 message(s)\r
+ * 0 message(s) with %\r
+ * justif: "left "\r
+ * justif: " right"\r
+ * 3: 0003 zero padded\r
+ * 3: 3 left justif.\r
+ * 3: 3 right justif.\r
+ * -3: -003 zero padded\r
+ * -3: -3 left justif.\r
+ * -3: -3 right justif.\r
+ */\r
+\r
+#endif\r
+\r
+\r
+/* To keep linker happy. */\r
+int write( int i, char* c, int n)\r
+{\r
+ return 0;\r
+}\r
+\r
#include "vectors.h"\r
#include "FreeRTOS.h"\r
#include "task.h"\r
-#include "semphr.h"\r
+#include "queue.h"\r
\r
static void vUART5Task( void *pvParameters );\r
\r
\r
void vInitUart5( void );\r
\r
-xSemaphoreHandle xSemaphore;\r
+\r
+static xQueueHandle xQueue;\r
\r
void vInitUart5( void )\r
{\r
volatile portSHORT i, len;\r
len = strlen( Name5 );\r
\r
- for( i = 0; i < strlen(Name5); i++ ) /* go through string */\r
+ for( i = 0; i < len; i++ ) /* go through string */\r
{\r
if( Name5[i] == 10 )\r
{\r
\r
void vUtilityStartTraceTask( unsigned portBASE_TYPE uxPriority )\r
{\r
- portENTER_CRITICAL();\r
- vInitUart5();\r
- portENTER_CRITICAL();\r
-\r
- vSemaphoreCreateBinary( xSemaphore );\r
+ xQueue = xQueueCreate( 5, sizeof( char ) );\r
\r
- if( xSemaphore != NULL )\r
+ if( xQueue != NULL )\r
{\r
- xTaskCreate( vUART5Task, (signed portCHAR *) "UART4", ( unsigned portSHORT ) 2048, ( void * ) NULL, uxPriority, NULL );\r
+ portENTER_CRITICAL();\r
+ vInitUart5();\r
+ portENTER_CRITICAL();\r
+\r
+ xTaskCreate( vUART5Task, (signed portCHAR *) "UART5", configMINIMAL_STACK_SIZE * 2, ( void * ) NULL, uxPriority, NULL );\r
}\r
}\r
\r
static void vUART5Task( void *pvParameters )\r
{\r
- portCHAR tasklist_buff[512], trace_buff[512];\r
+ static portCHAR buff[ 900 ] = { 0 };\r
unsigned portLONG trace_len, j;\r
\r
unsigned portCHAR ch;\r
\r
+ SSR05_RIE = 1;\r
Puts5( "\n -------------MB91467D FreeRTOS DEMO Task List and Trace Utility----------- \n" );\r
\r
for( ;; )\r
\r
Puts5( "\n\r2: To call vTaskStartTrace() and to display trace results once the trace ends" );\r
\r
- SSR05_RIE = 1;\r
-\r
/* Block on the semaphore. The UART interrupt will use the semaphore to\r
wake this task when required. */\r
- xSemaphoreTake( xSemaphore, portMAX_DELAY );\r
-\r
- ch = Getch5();\r
+ xQueueReceive( xQueue, &ch, portMAX_DELAY );\r
\r
switch( ch )\r
{\r
case '1':\r
- vTaskList( (signed char *) tasklist_buff );\r
+ vTaskList( (signed char *) buff );\r
Puts5( "\n\rThe current task list is as follows...." );\r
Puts5( "\n\r----------------------------------------------" );\r
Puts5( "\n\rName State Priority Stack Number" );\r
Puts5( "\n\r----------------------------------------------" );\r
- Puts5( tasklist_buff );\r
+ Puts5( buff );\r
Puts5( "\r----------------------------------------------" );\r
break;\r
\r
case '2':\r
- vTaskStartTrace( (signed char *) trace_buff, 512 );\r
+ vTaskStartTrace( (signed char *) buff, 512 );\r
Puts5( "\n\rThe trace started!!" );\r
vTaskDelay( (portTickType) 450 );\r
trace_len = ulTaskEndTrace();\r
Puts5( "\n\r--------------------------------------------------------\n\r" );\r
for( j = 0; j < trace_len; j++ )\r
{\r
- Puthex5( trace_buff[j], 2 );\r
+ Puthex5( buff[j], 2 );\r
if( j % 4 == 3 )\r
{\r
Puts5( " | " );\r
\r
__interrupt void UART5_RxISR( void )\r
{\r
- SSR05_RIE = 0;\r
- xSemaphoreGiveFromISR( xSemaphore, pdFALSE );\r
+unsigned portCHAR ch;\r
+\r
+ ch = RDR05;\r
+ xQueueSendFromISR( xQueue, &ch, pdFALSE );\r
}\r
Batch File=\r
[Window]\r
Flag=Enable\r
-AssemblySize=325 90 1151 598\r
+AssemblySize=474 149 1300 657\r
AssemblyState=0\r
AssemblyFGColor=0 0 255\r
CommandSize=132 138 958 562\r
CommandState=0\r
-Assembly Address=H'00042412\r
+Assembly Address=H'000429FA\r
Memory Address=H'0002F038\r
Memory Mode=H'00000003\r
Memory Ascii=H'00000001\r
Register Select35=H'00000027\r
MemorySize=66 69 892 493\r
MemoryState=0\r
-Layer0=1005,\r
-Layer1=1004,\r
-Layer2=2000,..\..\Source\tasks.c\r
-Source0Name=..\..\Source\tasks.c\r
-Source0Size=204 103 1030 527\r
+Layer0=1004,\r
+Layer1=1003,\r
+Layer2=1002,\r
+Source0Name=SRC\main.c\r
+Source0Size=16 54 1024 433\r
Source0State=0\r
-Source0Line=46C\r
+Source0Line=A5\r
Source0Mode=2\r
-Source1Name=..\..\Source\portable\Softune\MB91460\port.c\r
-Source1Size=310 3 1136 427\r
+Source1Name=..\..\Source\tasks.c\r
+Source1Size=110 115 1009 480\r
Source1State=0\r
-Source1Line=DB\r
+Source1Line=4D8\r
Source1Mode=2\r
SymbolSize=0 0 0 0\r
SymbolState=0\r
Memory Mark Color4=0 255 255\r
Memory Mark Color5=0 128 192\r
Memory Mark Color6=255 128 64\r
-Layer3=1006,\r
-Layer4=1003,\r
-Layer5=2000,..\..\Source\portable\Softune\MB91460\port.c\r
-Layer6=2000,SRC\watchdog\watchdog.c\r
-Layer7=1002,\r
+Layer3=2000,SRC\main.c\r
+Layer4=2000,..\..\Source\tasks.c\r
+Layer5=2000,..\Common\Minimal\dynamic.c\r
LocalSize=44 46 870 470\r
LocalState=0\r
WatchSize=0 0 826 424\r
WatchState=0\r
-Source2Name=SRC\main.c\r
-Source2Size=66 69 1074 448\r
+Source2Name=..\Common\Minimal\dynamic.c\r
+Source2Size=132 138 1031 503\r
Source2State=0\r
-Source2Line=124\r
+Source2Line=15D\r
Source2Mode=2\r
-Source3Name=SRC\watchdog\watchdog.c\r
-Source3Size=44 46 998 421\r
-Source3State=0\r
-Source3Line=1C\r
-Source3Mode=2\r
-Layer8=2000,SRC\Start91460.asm\r
-Watch Variable0=[ulCriticalNesting],82030000,1,-1 -1\r
-Layer9=1007,\r
-Layer10=2000,SRC\main.c\r
-Source4Name=SRC\Start91460.asm\r
-Source4Size=198 207 1086 679\r
-Source4State=0\r
-Source4Line=913\r
-Source4Mode=2\r
-Layer11=2000,SRC\vectors.c\r
-Source5Name=SRC\vectors.c\r
-Source5Size=22 23 859 518\r
-Source5State=2\r
-Source5Line=49\r
-Source5Mode=2\r
[Path Environment]\r
Flag=Enable\r
Source=\r