]> git.sur5r.net Git - freertos/commitdiff
Add the SAM7X Eclipse files.
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 21 Nov 2007 18:29:41 +0000 (18:29 +0000)
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 21 Nov 2007 18:29:41 +0000 (18:29 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@117 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

110 files changed:
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.lock [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/.log [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/RTOSDemo.sc [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/cHelpSettings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/64/history.index [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/69/history.index [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/b3/history.index [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/history.index [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/properties.index [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.markers [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/47.tree [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-RTOSDemo.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.help.ui.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/OpenOCD Programmer.launch [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/OpenOCD Server.launch [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/RTOSDemo.elf.launch [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/RTOSDemo.launch [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/Default.pref [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/relative_path.hist [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/working_set.hist [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/working_sets.hist [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.search/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.cheatsheets/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.intro/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.update.ui/dialog_settings.xml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/version.ini [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.cproject [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.project [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.settings/org.eclipse.ltk.core.refactoring.prefs [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Board.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Cstartup.s79 [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Cstartup_SAM7.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Emac.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/mii.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/atmel-rom.ld [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/boot.s [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/Makefile.webserver [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/clock-arch.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/emac_atmel.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/404.html [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/index.html [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/index.shtml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/io.shtml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/stats.shtml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/tcp.shtml [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fsdata.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fsdata.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/makefsdata [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/makestrings [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uip-conf.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/webserver.h [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/SAM7_flash.cfg [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/SAM7_pp.cfg [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/at91sam7_ecr.cfg [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/at91sam7_ecr.script [new file with mode: 0644]
Demo/ARM7_AT91SAM7X256_Eclipse/program.script [new file with mode: 0644]

diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.lock b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.lock
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/.log
new file mode 100644 (file)
index 0000000..128e868
--- /dev/null
@@ -0,0 +1,17 @@
+*** SESSION Sep 07, 2007 11:40:29.515 ------------------------------------------\r
+*** SESSION Sep 26, 2007 20:59:04.640 ------------------------------------------\r
+*** SESSION Sep 27, 2007 17:22:58.687 ------------------------------------------\r
+*** SESSION Oct 04, 2007 20:29:08.859 ------------------------------------------\r
+*** SESSION Oct 23, 2007 19:47:01.875 ------------------------------------------\r
+*** SESSION Oct 23, 2007 21:13:26.296 ------------------------------------------\r
+*** SESSION Oct 23, 2007 21:22:16.187 ------------------------------------------\r
+*** SESSION Oct 28, 2007 12:37:13.93 -------------------------------------------\r
+*** SESSION Nov 06, 2007 16:04:46.31 -------------------------------------------\r
+*** SESSION Nov 06, 2007 20:19:12.359 ------------------------------------------\r
+*** SESSION Nov 07, 2007 18:40:55.281 ------------------------------------------\r
+*** SESSION Nov 13, 2007 20:49:09.875 ------------------------------------------\r
+*** SESSION Nov 17, 2007 17:59:26.734 ------------------------------------------\r
+*** SESSION Nov 17, 2007 19:36:59.656 ------------------------------------------\r
+*** SESSION Nov 21, 2007 08:36:47.312 ------------------------------------------\r
+*** SESSION Nov 21, 2007 15:42:29.171 ------------------------------------------\r
+*** SESSION Nov 21, 2007 17:07:49.515 ------------------------------------------\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.core/shareddefaults.xml
new file mode 100644 (file)
index 0000000..c4b91cf
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><SharedRoot><SharedProperty id="" value=""/></SharedRoot>
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/.log b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/.log
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/RTOSDemo.sc b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/RTOSDemo.sc
new file mode 100644 (file)
index 0000000..2a3f9d1
--- /dev/null
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?scdStore version="2"?>\r
+\r
+<scannerInfo id="org.eclipse.cdt.make.core.discoveredScannerInfo">\r
+<instance id="0.1109417601">\r
+<collector id="org.eclipse.cdt.make.core.PerProjectSICollector">\r
+<includePath path="c:/devtools/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.0/include"/>\r
+<includePath path="c:/devtools/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.0/include-fixed"/>\r
+<includePath path="c:/devtools/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.0/../../../../arm-none-eabi/include"/>\r
+<includePath path="c:/devtools/codesourcery/sourcery g++ lite/lib/gcc/../../lib/gcc/arm-none-eabi/4.2.0/include"/>\r
+<includePath path="c:/devtools/codesourcery/sourcery g++ lite/lib/gcc/../../lib/gcc/arm-none-eabi/4.2.0/include-fixed"/>\r
+<includePath path="c:/devtools/codesourcery/sourcery g++ lite/lib/gcc/../../lib/gcc/arm-none-eabi/4.2.0/../../../../arm-none-eabi/include"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Source/include"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Source/portable/GCC/ARM7_LPC23xx"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Source/portable/GCC/ARM_CM3"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/Common/include"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/Common/ethernet/uIP/uip-1.0/uip"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB"/>\r
+<includePath path="c:\devtools\yagarto\bin\../lib/gcc/arm-elf/4.2.1/include"/>\r
+<includePath path="C:/devtools/yagarto/lib/gcc/arm-elf/4.2.1/include"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver"/>\r
+<includePath path="c:\devtools\yagarto\bin\../lib/gcc/arm-elf/4.1.1/include"/>\r
+<includePath path="C:/devtools/yagarto/lib/gcc/arm-elf/4.1.1/include"/>\r
+<includePath path="C:/devtools/yagarto/arm-elf/include"/>\r
+<includePath path="C:/E/Dev/FreeRTOS/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo"/>\r
+<definedSymbol symbol="__STDC__=1"/>\r
+<definedSymbol symbol="__STDC_HOSTED__=1"/>\r
+<definedSymbol symbol="__GNUC__=4"/>\r
+<definedSymbol symbol="__GNUC_MINOR__=2"/>\r
+<definedSymbol symbol="__GNUC_MINOR__=1"/>\r
+<definedSymbol symbol="__GNUC_PATCHLEVEL__=0"/>\r
+<definedSymbol symbol="__GNUC_PATCHLEVEL__=1"/>\r
+<definedSymbol symbol="__SIZE_TYPE__=unsigned int"/>\r
+<definedSymbol symbol="__SIZE_TYPE__=long unsigned int"/>\r
+<definedSymbol symbol="__PTRDIFF_TYPE__=int"/>\r
+<definedSymbol symbol="__PTRDIFF_TYPE__=long int"/>\r
+<definedSymbol symbol="__WCHAR_TYPE__=unsigned int"/>\r
+<definedSymbol symbol="__WCHAR_TYPE__=int"/>\r
+<definedSymbol symbol="__WINT_TYPE__=unsigned int"/>\r
+<definedSymbol symbol="__INTMAX_TYPE__=long long int"/>\r
+<definedSymbol symbol="__UINTMAX_TYPE__=long long unsigned int"/>\r
+<definedSymbol symbol="__GXX_ABI_VERSION=1002"/>\r
+<definedSymbol symbol="__SCHAR_MAX__=127"/>\r
+<definedSymbol symbol="__SHRT_MAX__=32767"/>\r
+<definedSymbol symbol="__INT_MAX__=2147483647"/>\r
+<definedSymbol symbol="__LONG_MAX__=2147483647L"/>\r
+<definedSymbol symbol="__LONG_LONG_MAX__=9223372036854775807LL"/>\r
+<definedSymbol symbol="__WCHAR_MAX__=4294967295U"/>\r
+<definedSymbol symbol="__WCHAR_MAX__=2147483647"/>\r
+<definedSymbol symbol="__CHAR_BIT__=8"/>\r
+<definedSymbol symbol="__INTMAX_MAX__=9223372036854775807LL"/>\r
+<definedSymbol symbol="__FLT_EVAL_METHOD__=0"/>\r
+<definedSymbol symbol="__DEC_EVAL_METHOD__=2"/>\r
+<definedSymbol symbol="__FLT_RADIX__=2"/>\r
+<definedSymbol symbol="__FLT_MANT_DIG__=24"/>\r
+<definedSymbol symbol="__FLT_DIG__=6"/>\r
+<definedSymbol symbol="__FLT_MIN_EXP__=(-125)"/>\r
+<definedSymbol symbol="__FLT_MIN_10_EXP__=(-37)"/>\r
+<definedSymbol symbol="__FLT_MAX_EXP__=128"/>\r
+<definedSymbol symbol="__FLT_MAX_10_EXP__=38"/>\r
+<definedSymbol symbol="__FLT_MAX__=3.40282347e+38F"/>\r
+<definedSymbol symbol="__FLT_MIN__=1.17549435e-38F"/>\r
+<definedSymbol symbol="__FLT_EPSILON__=1.19209290e-7F"/>\r
+<definedSymbol symbol="__FLT_DENORM_MIN__=1.40129846e-45F"/>\r
+<definedSymbol symbol="__FLT_HAS_DENORM__=1"/>\r
+<definedSymbol symbol="__FLT_HAS_INFINITY__=1"/>\r
+<definedSymbol symbol="__FLT_HAS_QUIET_NAN__=1"/>\r
+<definedSymbol symbol="__DBL_MANT_DIG__=53"/>\r
+<definedSymbol symbol="__DBL_DIG__=15"/>\r
+<definedSymbol symbol="__DBL_MIN_EXP__=(-1021)"/>\r
+<definedSymbol symbol="__DBL_MIN_10_EXP__=(-307)"/>\r
+<definedSymbol symbol="__DBL_MAX_EXP__=1024"/>\r
+<definedSymbol symbol="__DBL_MAX_10_EXP__=308"/>\r
+<definedSymbol symbol="__DBL_MAX__=1.7976931348623157e+308"/>\r
+<definedSymbol symbol="__DBL_MIN__=2.2250738585072014e-308"/>\r
+<definedSymbol symbol="__DBL_EPSILON__=2.2204460492503131e-16"/>\r
+<definedSymbol symbol="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>\r
+<definedSymbol symbol="__DBL_HAS_DENORM__=1"/>\r
+<definedSymbol symbol="__DBL_HAS_INFINITY__=1"/>\r
+<definedSymbol symbol="__DBL_HAS_QUIET_NAN__=1"/>\r
+<definedSymbol symbol="__LDBL_MANT_DIG__=53"/>\r
+<definedSymbol symbol="__LDBL_DIG__=15"/>\r
+<definedSymbol symbol="__LDBL_MIN_EXP__=(-1021)"/>\r
+<definedSymbol symbol="__LDBL_MIN_10_EXP__=(-307)"/>\r
+<definedSymbol symbol="__LDBL_MAX_EXP__=1024"/>\r
+<definedSymbol symbol="__LDBL_MAX_10_EXP__=308"/>\r
+<definedSymbol symbol="__DECIMAL_DIG__=17"/>\r
+<definedSymbol symbol="__LDBL_MAX__=1.7976931348623157e+308L"/>\r
+<definedSymbol symbol="__LDBL_MIN__=2.2250738585072014e-308L"/>\r
+<definedSymbol symbol="__LDBL_EPSILON__=2.2204460492503131e-16L"/>\r
+<definedSymbol symbol="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>\r
+<definedSymbol symbol="__LDBL_HAS_DENORM__=1"/>\r
+<definedSymbol symbol="__LDBL_HAS_INFINITY__=1"/>\r
+<definedSymbol symbol="__LDBL_HAS_QUIET_NAN__=1"/>\r
+<definedSymbol symbol="__DEC32_MANT_DIG__=7"/>\r
+<definedSymbol symbol="__DEC32_MIN_EXP__=(-95)"/>\r
+<definedSymbol symbol="__DEC32_MAX_EXP__=96"/>\r
+<definedSymbol symbol="__DEC32_MIN__=1E-95DF"/>\r
+<definedSymbol symbol="__DEC32_MAX__=9.999999E96DF"/>\r
+<definedSymbol symbol="__DEC32_EPSILON__=1E-6DF"/>\r
+<definedSymbol symbol="__DEC32_DEN__=0.000001E-95DF"/>\r
+<definedSymbol symbol="__DEC64_MANT_DIG__=16"/>\r
+<definedSymbol symbol="__DEC64_MIN_EXP__=(-383)"/>\r
+<definedSymbol symbol="__DEC64_MAX_EXP__=384"/>\r
+<definedSymbol symbol="__DEC64_MIN__=1E-383DD"/>\r
+<definedSymbol symbol="__DEC64_MAX__=9.999999999999999E384DD"/>\r
+<definedSymbol symbol="__DEC64_EPSILON__=1E-15DD"/>\r
+<definedSymbol symbol="__DEC64_DEN__=0.000000000000001E-383DD"/>\r
+<definedSymbol symbol="__DEC128_MANT_DIG__=34"/>\r
+<definedSymbol symbol="__DEC128_MIN_EXP__=(-6143)"/>\r
+<definedSymbol symbol="__DEC128_MAX_EXP__=6144"/>\r
+<definedSymbol symbol="__DEC128_MIN__=1E-6143DL"/>\r
+<definedSymbol symbol="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>\r
+<definedSymbol symbol="__DEC128_EPSILON__=1E-33DL"/>\r
+<definedSymbol symbol="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>\r
+<definedSymbol symbol="__REGISTER_PREFIX__"/>\r
+<definedSymbol symbol="__USER_LABEL_PREFIX__"/>\r
+<definedSymbol symbol="__VERSION__=&quot;4.2.0 20070413 (prerelease)&quot;"/>\r
+<definedSymbol symbol="__VERSION__=&quot;4.1.1&quot;"/>\r
+<definedSymbol removed="true" symbol="__VERSION__=&quot;4.2.1&quot;"/>\r
+<definedSymbol symbol="__GNUC_GNU_INLINE__=1"/>\r
+<definedSymbol symbol="__NO_INLINE__=1"/>\r
+<definedSymbol symbol="__FINITE_MATH_ONLY__=0"/>\r
+<definedSymbol symbol="__CHAR_UNSIGNED__=1"/>\r
+<definedSymbol symbol="__arm__=1"/>\r
+<definedSymbol symbol="__APCS_32__=1"/>\r
+<definedSymbol symbol="__ARMEL__=1"/>\r
+<definedSymbol symbol="__SOFTFP__=1"/>\r
+<definedSymbol symbol="__VFP_FP__=1"/>\r
+<definedSymbol symbol="__THUMB_INTERWORK__=1"/>\r
+<definedSymbol symbol="__ARM_ARCH_4T__=1"/>\r
+<definedSymbol symbol="__ARM_EABI__=1"/>\r
+<definedSymbol symbol="__GXX_TYPEINFO_EQUALITY_INLINE=0"/>\r
+<definedSymbol symbol="__ELF__=1"/>\r
+<definedSymbol symbol="__USES_INITFINI__=1"/>\r
+<definedSymbol symbol="GCC_ARMCM3_LM3S102"/>\r
+<definedSymbol symbol="inline="/>\r
+<definedSymbol symbol="PACK_STRUCT_END=__attribute\(\(packed\)\)"/>\r
+<definedSymbol symbol="ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\)"/>\r
+<definedSymbol symbol="sprintf=usprintf"/>\r
+<definedSymbol removed="true" symbol="sprintf=xprintf"/>\r
+<definedSymbol removed="true" symbol="sprintf=xxprintf"/>\r
+<definedSymbol symbol="snprintf=usnprintf"/>\r
+<definedSymbol symbol="printf=uipprintf"/>\r
+<definedSymbol removed="true" symbol="printf=xprintf"/>\r
+<definedSymbol removed="true" symbol="printf=xxprintf"/>\r
+<definedSymbol symbol="__USING_SJLJ_EXCEPTIONS__=1"/>\r
+<definedSymbol symbol="__thumb__=1"/>\r
+<definedSymbol symbol="__THUMBEL__=1"/>\r
+<definedSymbol symbol="ROWLEY_LPC23xx"/>\r
+<definedSymbol symbol="THUMB_INTERWORK"/>\r
+<definedSymbol symbol="__OPTIMIZE__=1"/>\r
+<definedSymbol symbol="__OPTIMIZE_SIZE__=1"/>\r
+<definedSymbol symbol="SAM7_GCC"/>\r
+</collector>\r
+</instance>\r
+</scannerInfo>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml
new file mode 100644 (file)
index 0000000..9e62c4b
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="org.eclipse.cdt.internal.ui.MakeView">\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/cHelpSettings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/cHelpSettings.xml
new file mode 100644 (file)
index 0000000..5240b18
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<cHelpSettings>\r
+<project name="RTOSDemo"/>\r
+</cHelpSettings>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml
new file mode 100644 (file)
index 0000000..ab95b05
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <item value="1" key="org.eclipse.cdt.uiformatter_page.line_wrapping_tab_page.last_category_index"/>\r
+       <item value="549" key="org.eclipse.cdt.uiformatter_pagemodify_dialog.preferred_height"/>\r
+       <item value="138" key="org.eclipse.cdt.uiformatter_pagemodify_dialog.preferred_x"/>\r
+       <item value="0" key="org.eclipse.cdt.uiformatter_pagemodify_dialog.preferred_y"/>\r
+       <item value="645" key="org.eclipse.cdt.uiformatter_pagemodify_dialog.preferred_width"/>\r
+       <section name="completion_proposal_size">\r
+       </section>\r
+       <section name="PDOMSearchPage">\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/64/history.index b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/64/history.index
new file mode 100644 (file)
index 0000000..f57b88c
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/64/history.index differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/69/history.index b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/69/history.index
new file mode 100644 (file)
index 0000000..fd79ef2
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/69/history.index differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/b3/history.index b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/b3/history.index
new file mode 100644 (file)
index 0000000..b648a4a
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/b3/history.index differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/history.index b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/history.index
new file mode 100644 (file)
index 0000000..67cbcdf
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/history.index differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/properties.index b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/properties.index
new file mode 100644 (file)
index 0000000..401e243
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.indexes/properties.index differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.markers b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.markers
new file mode 100644 (file)
index 0000000..c4a7f2f
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/RTOSDemo/.markers differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
new file mode 100644 (file)
index 0000000..25cb955
--- /dev/null
@@ -0,0 +1 @@
+\ 2
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
new file mode 100644 (file)
index 0000000..14ccfed
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
new file mode 100644 (file)
index 0000000..6b2aaa7
--- /dev/null
@@ -0,0 +1 @@
+\ 1
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/47.tree b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/47.tree
new file mode 100644 (file)
index 0000000..68bdc1b
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/47.tree differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
new file mode 100644 (file)
index 0000000..44f79aa
Binary files /dev/null and b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-RTOSDemo.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-RTOSDemo.prefs
new file mode 100644 (file)
index 0000000..bb305ff
--- /dev/null
@@ -0,0 +1,3 @@
+#Sun Aug 19 15:20:24 BST 2007\r
+eclipse.preferences.version=1\r
+indexer/preferenceScope=0\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs
new file mode 100644 (file)
index 0000000..1c0fdf1
--- /dev/null
@@ -0,0 +1,3 @@
+#Sun Aug 19 15:19:23 BST 2007\r
+org.eclipse.cdt.debug.core.cDebug.common_source_containers=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<sourceLookupDirector>\r\n<sourceContainers duplicates\="false"/>\r\n</sourceLookupDirector>\r\n\r
+eclipse.preferences.version=1\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.ui.prefs
new file mode 100644 (file)
index 0000000..d7fcb8d
--- /dev/null
@@ -0,0 +1,5 @@
+#Tue Oct 23 21:13:09 BST 2007\r
+pref_state_memento.org.eclipse.cdt.debug.ui.ModulesView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<ModulesViewMemento org.eclipse.cdt.debug.ui.SASH_DETAILS_PART\="570" org.eclipse.cdt.debug.ui.SASH_VIEW_PART\="429"/>\r
+eclipse.preferences.version=1\r
+org.eclipse.debug.ui.DebugView.org.eclipse.cdt.debug.ui.cDebug.show_full_paths=true\r
+org.eclipse.debug.ui.BreakpointView.org.eclipse.cdt.debug.ui.cDebug.show_full_paths=true\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.managedbuilder.core.prefs
new file mode 100644 (file)
index 0000000..ab5a160
--- /dev/null
@@ -0,0 +1,3 @@
+#Wed Nov 21 16:20:43 GMT 2007\r
+eclipse.preferences.version=1\r
+properties/RTOSDemo.null.976634949/0.1109417601=\#\r\n\#Wed Nov 21 16\:20\:43 GMT 2007\r\n0.1109417601\=\\\#\\r\\n\\\#Wed Nov 21 16\\\:20\\\:43 GMT 2007\\r\\nrcState\\\=0\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.build.core.settings.holder.1502006385\=\\\#\\r\\n\\\#Wed Nov 21 16\\\:20\\\:43 GMT 2007\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.build.core.settings.holder.1021181093\=\\\#\\r\\n\\\#Wed Nov 21 16\\\:20\\\:43 GMT 2007\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.build.core.settings.holder.164584712\=\\\#\\r\\n\\\#Wed Nov 21 16\\\:20\\\:43 GMT 2007\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.build.core.settings.holder.libs.260784574\=\\\#\\r\\n\\\#Wed Nov 21 16\\\:20\\\:43 GMT 2007\\r\\nrebuildState\\\=false\\r\\n\r\norg.eclipse.cdt.build.core.prefbase.toolchain.1816209921\=\\\#\\r\\n\\\#Wed Nov 21 16\\\:20\\\:43 GMT 2007\\r\\nrebuildState\\\=false\\r\\n\r\n\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs
new file mode 100644 (file)
index 0000000..8a970da
--- /dev/null
@@ -0,0 +1,12 @@
+#Thu Aug 23 20:22:58 BST 2007\r
+useQuickDiffPrefPage=true\r
+closeBrackets=false\r
+ensureNewlineAtEOF=true\r
+useAnnotationsPrefPage=true\r
+closeAngularBrackets=false\r
+eclipse.preferences.version=1\r
+org.eclipse.cdt.ui.text.templates.custom=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>\r
+hoverModifierMasks=org.eclipse.cdt.ui.BestMatchHover;0;org.eclipse.cdt.ui.CSourceHover;131072;org.eclipse.cdt.debug.internal.ui.editors.DebugTextHover;0;org.eclipse.cdt.ui.CDocHover;0;org.eclipse.cdt.ui.AnnotationHover;0;\r
+hoverModifiers=org.eclipse.cdt.ui.BestMatchHover;0;org.eclipse.cdt.ui.CSourceHover;Shift;org.eclipse.cdt.debug.internal.ui.editors.DebugTextHover;\!0;org.eclipse.cdt.ui.CDocHover;\!0;org.eclipse.cdt.ui.AnnotationHover;\!0;\r
+closeBraces=false\r
+closeStrings=false\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..242e941
--- /dev/null
@@ -0,0 +1,5 @@
+#Fri Aug 31 14:25:00 BST 2007\r
+version=1\r
+eclipse.preferences.version=1\r
+pathvariable.FreeRTOS_ROOT=C\:/E/Dev/FreeRTOS\r
+description.autobuilding=false\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs
new file mode 100644 (file)
index 0000000..4e5b3d8
--- /dev/null
@@ -0,0 +1,3 @@
+#Sat Nov 17 13:34:58 GMT 2007\r
+prefWatchExpressions=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<watchExpressions/>\r\n\r
+eclipse.preferences.version=1\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs
new file mode 100644 (file)
index 0000000..c88e843
--- /dev/null
@@ -0,0 +1,14 @@
+#Wed Nov 07 18:56:22 GMT 2007\r
+org.eclipse.debug.ui.PREF_FILTER_WORKING_SETS=false\r
+org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n\r
+org.eclipse.debug.ui.BreakpointView+org.eclipse.debug.ui.ShowSupportedBreakpointsAction=true\r
+pref_state_memento.org.eclipse.debug.ui.VariableView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684"/>\r
+pref_state_memento.org.eclipse.debug.ui.RegisterView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="198" org.eclipse.debug.ui.SASH_VIEW_PART\="801"/>\r
+org.eclipse.debug.ui.memory.columnSize\:org.eclipse.cdt.debug.core=4\r
+pref_state_memento.org.eclipse.debug.ui.ExpressionView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684"/>\r
+org.eclipse.debug.ui.PREF_FILTER_LAUNCH_CLOSED=false\r
+preferredDetailPanes=DefaultDetailPane\:DefaultDetailPane|\r
+org.eclipse.debug.ui.PREF_FILTER_LAUNCH_DELETED=false\r
+eclipse.preferences.version=1\r
+org.eclipse.debug.ui.memory.rowSize\:org.eclipse.cdt.debug.core=16\r
+org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.debug.ui.ExpressionView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.help.ui.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.help.ui.prefs
new file mode 100644 (file)
index 0000000..8d1b311
--- /dev/null
@@ -0,0 +1,7 @@
+#Sun Aug 26 17:32:13 BST 2007\r
+browser.x=177\r
+browser.w=1024\r
+eclipse.preferences.version=1\r
+browser.h=768\r
+browser.maximized=false\r
+browser.y=128\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs
new file mode 100644 (file)
index 0000000..2426c2b
--- /dev/null
@@ -0,0 +1,3 @@
+#Sun Aug 19 19:39:29 BST 2007\r
+org.eclipse.search.defaultPerspective=org.eclipse.search.defaultPerspective.none\r
+eclipse.preferences.version=1\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
new file mode 100644 (file)
index 0000000..06f8f10
--- /dev/null
@@ -0,0 +1,3 @@
+#Fri Aug 31 18:19:04 BST 2007\r
+eclipse.preferences.version=1\r
+org.eclipse.team.ui.first_time=false\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs
new file mode 100644 (file)
index 0000000..1affd26
--- /dev/null
@@ -0,0 +1,3 @@
+#Sun Aug 19 20:45:57 BST 2007\r
+eclipse.preferences.version=1\r
+overviewRuler_migration=migrated_3.1\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
new file mode 100644 (file)
index 0000000..b96f5d0
--- /dev/null
@@ -0,0 +1,4 @@
+#Tue Nov 06 22:57:01 GMT 2007\r
+eclipse.preferences.version=1\r
+tipsAndTricks=true\r
+platformState=1187207632259\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
new file mode 100644 (file)
index 0000000..3e5b2b1
--- /dev/null
@@ -0,0 +1,3 @@
+#Sun Aug 19 20:45:58 BST 2007\r
+eclipse.preferences.version=1\r
+showIntro=false\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
new file mode 100644 (file)
index 0000000..06cd1e9
--- /dev/null
@@ -0,0 +1,3 @@
+#Mon Aug 20 21:59:49 BST 2007\r
+eclipse.preferences.version=1\r
+org.eclipse.ui.commands=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<org.eclipse.ui.commands>\r\n<keyBinding contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+B"/>\r\n<keyBinding commandId\="org.eclipse.ui.project.buildAll" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F7"/>\r\n<keyBinding contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F11"/>\r\n<keyBinding contextId\="org.eclipse.debug.ui.debugging" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F5"/>\r\n<keyBinding commandId\="org.eclipse.debug.ui.commands.StepInto" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F11"/>\r\n<keyBinding contextId\="org.eclipse.debug.ui.debugging" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F6"/>\r\n<keyBinding commandId\="org.eclipse.debug.ui.commands.StepOver" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F10"/>\r\n<keyBinding commandId\="org.eclipse.debug.ui.commands.DebugLast" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+D"/>\r\n<keyBinding contextId\="org.eclipse.ui.textEditorScope" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+D"/>\r\n<keyBinding contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+F11"/>\r\n<keyBinding commandId\="org.eclipse.debug.ui.commands.RunLast" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F5"/>\r\n<keyBinding contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F5"/>\r\n<keyBinding contextId\="org.eclipse.ui.textEditorScope" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="CTRL+K"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.findNext" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F3"/>\r\n<keyBinding contextId\="org.eclipse.cdt.make.ui.makefileEditorScope" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F3"/>\r\n<keyBinding contextId\="org.eclipse.cdt.ui.cEditorScope" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F3"/>\r\n<keyBinding contextId\="org.eclipse.cdt.ui.cViewScope" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="F3"/>\r\n</org.eclipse.ui.commands>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/OpenOCD Programmer.launch b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/OpenOCD Programmer.launch
new file mode 100644 (file)
index 0000000..822c04f
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">\r
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc}/../Common/drivers/OpenOCD/openocd-pp.exe"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="--file SAM7_flash.cfg"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc}"/>\r
+</launchConfiguration>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/OpenOCD Server.launch b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/OpenOCD Server.launch
new file mode 100644 (file)
index 0000000..6a59edf
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">\r
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc}/../Common/drivers/OpenOCD/openocd-pp.exe"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="--file SAM7_pp.cfg"/>\r
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc}"/>\r
+</launchConfiguration>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/RTOSDemo.elf.launch b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/RTOSDemo.elf.launch
new file mode 100644 (file)
index 0000000..1c911f2
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchConfiguration type="org.eclipse.cdt.launch.localCLaunch">\r
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.AUTO_SOLIB" value="true"/>\r
+<listAttribute key="org.eclipse.cdt.debug.mi.core.AUTO_SOLIB_LIST"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="gdb"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEV" value="/dev/ttyS0"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEV_SPEED" value="115200"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.GDB_INIT" value=".gdbinit"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.HOST" value="localhost"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.PORT" value="10000"/>\r
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.REMOTE_TCP" value="false"/>\r
+<listAttribute key="org.eclipse.cdt.debug.mi.core.SOLIB_PATH"/>\r
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.STOP_ON_SOLIB_EVENTS" value="false"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="org.eclipse.cdt.debug.mi.core.standardCommandFactory"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>\r
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="org.eclipse.cdt.debug.mi.core.GDBServerCDebugger"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>\r
+<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>\r
+<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>\r
+<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="RTOSDemo.elf"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTOSDemo"/>\r
+<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>\r
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">\r
+<listEntry value="/RTOSDemo"/>\r
+</listAttribute>\r
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">\r
+<listEntry value="4"/>\r
+</listAttribute>\r
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>\r
+</launchConfiguration>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/RTOSDemo.launch b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/RTOSDemo.launch
new file mode 100644 (file)
index 0000000..fca7b0a
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchConfiguration type="org.eclipse.cdt.debug.gdbjtag.launchConfigurationType">\r
+<stringAttribute key="org.eclipse.cdt.debug.gdbremote.core.imageFileName" value="C:\E\Dev\FreeRTOS\Demo\CORTEX_LM3S8962_Eclipse\RTOSDemo\RTOSDemo.elf"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.gdbremote.core.initCommands" value="target remote:3333&#13;&#10;monitor sleep 500&#13;&#10;monitor arm7_9 force_hw_bkpts enable&#13;&#10;monitor sleep 500&#13;&#10;monitor soft_reset_halt&#13;&#10;delete&#13;&#10;monitor sleep 500&#13;&#10;b main&#13;&#10;monitor sleep 500&#13;&#10;c&#13;&#10;monitor sleep 500&#13;&#10;delete&#13;&#10;&#13;&#10;&#13;&#10;"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.gdbremote.core.ipAddress" value="localhost"/>\r
+<booleanAttribute key="org.eclipse.cdt.debug.gdbremote.core.loadImage" value="false"/>\r
+<intAttribute key="org.eclipse.cdt.debug.gdbremote.core.portNumber" value="3333"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.gdbremote.core.runCommands" value=""/>\r
+<booleanAttribute key="org.eclipse.cdt.debug.gdbremote.core.useRemoteTarget" value="false"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="arm-elf-gdb.exe"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.GDB_INIT" value=""/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard"/>\r
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>\r
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>\r
+<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;2107200&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="RTOSDemo.elf"/>\r
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTOSDemo"/>\r
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">\r
+<listEntry value="/RTOSDemo"/>\r
+</listAttribute>\r
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">\r
+<listEntry value="4"/>\r
+</listAttribute>\r
+</launchConfiguration>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.ui/dialog_settings.xml
new file mode 100644 (file)
index 0000000..4e6586f
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="org.eclipse.debug.ui.STRING_VARIABLE_SELECTION_DIALOG_SECTION">\r
+               <item value="326" key="DIALOG_WIDTH"/>\r
+               <item value="-33" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="309" key="DIALOG_X_ORIGIN"/>\r
+               <item value="530" key="DIALOG_HEIGHT"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="org.eclipse.debug.ui.LAUNCH_CONFIGURATIONS_DIALOG_SECTION">\r
+               <item value="966" key="DIALOG_WIDTH"/>\r
+               <item value="154" key="DIALOG_Y_ORIGIN"/>\r
+               <item value=", org.eclipse.ui.externaltools.ProgramLaunchConfigurationType, org.eclipse.cdt.debug.gdbjtag.launchConfigurationType, " key="org.eclipse.debug.ui.EXPANDED_NODES"/>\r
+               <item value="274" key="DIALOG_X_ORIGIN"/>\r
+               <item value="640" key="DIALOG_HEIGHT"/>\r
+               <item value="237" key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_1"/>\r
+               <item value="762" key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_2"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="org.eclipse.debug.ui.SELECT_LAUNCH_SHORTCUT_DIALOG">\r
+               <item value="450" key="DIALOG_WIDTH"/>\r
+               <item value="215" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="479" key="DIALOG_X_ORIGIN"/>\r
+               <item value="450" key="DIALOG_HEIGHT"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="org.eclipse.debug.ui.SELECT_CONFIGURATION_TYPE_DIALOG">\r
+               <item value="300" key="DIALOG_WIDTH"/>\r
+               <item value="46" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="301" key="DIALOG_X_ORIGIN"/>\r
+               <item value="350" key="DIALOG_HEIGHT"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="FAVORITES_DIALOG_SECTION">\r
+               <item value="227" key="DIALOG_WIDTH"/>\r
+               <item value="360" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="731" key="DIALOG_X_ORIGIN"/>\r
+               <item value="233" key="DIALOG_HEIGHT"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml
new file mode 100644 (file)
index 0000000..aa1b7aa
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchHistory>\r
+<launchGroup id="org.eclipse.ui.externaltools.launchGroup">\r
+<mruHistory>\r
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;OpenOCD Server.launch&quot;/&gt;&#13;&#10;"/>\r
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;OpenOCD Programmer.launch&quot;/&gt;&#13;&#10;"/>\r
+</mruHistory>\r
+<favorites/>\r
+</launchGroup>\r
+<launchGroup id="org.eclipse.debug.ui.launchGroup.profile">\r
+<mruHistory/>\r
+<favorites/>\r
+</launchGroup>\r
+<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">\r
+<mruHistory>\r
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;RTOSDemo.launch&quot;/&gt;&#13;&#10;"/>\r
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;RTOSDemo.elf.launch&quot;/&gt;&#13;&#10;"/>\r
+</mruHistory>\r
+<favorites/>\r
+</launchGroup>\r
+<launchGroup id="org.eclipse.debug.ui.launchGroup.run">\r
+<mruHistory>\r
+<launch memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;launchConfiguration local=&quot;true&quot; path=&quot;RTOSDemo.elf.launch&quot;/&gt;&#13;&#10;"/>\r
+</mruHistory>\r
+<favorites/>\r
+</launchGroup>\r
+</launchHistory>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/dialog_settings.xml
new file mode 100644 (file)
index 0000000..1ef2b05
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/Default.pref b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/Default.pref
new file mode 100644 (file)
index 0000000..fc15817
--- /dev/null
@@ -0,0 +1,2 @@
+#Sun Aug 26 17:54:18 BST 2007\r
+__DEFAULT__=true\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/relative_path.hist b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/relative_path.hist
new file mode 100644 (file)
index 0000000..713e721
--- /dev/null
@@ -0,0 +1,4 @@
+#Sun Aug 26 17:36:29 BST 2007\r
+__DEFAULT__=false\r
+org.eclipse.help.ui.localSearch.master=true\r
+expression=relative path\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/working_set.hist b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/working_set.hist
new file mode 100644 (file)
index 0000000..197837b
--- /dev/null
@@ -0,0 +1,4 @@
+#Sun Aug 26 17:29:25 BST 2007\r
+__DEFAULT__=false\r
+org.eclipse.help.ui.localSearch.master=true\r
+expression=working set\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/working_sets.hist b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.help.ui/scope_sets/working_sets.hist
new file mode 100644 (file)
index 0000000..a88e15e
--- /dev/null
@@ -0,0 +1,4 @@
+#Sun Aug 26 17:54:21 BST 2007\r
+__DEFAULT__=false\r
+org.eclipse.help.ui.localSearch.master=true\r
+expression=working sets\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml
new file mode 100644 (file)
index 0000000..ac67147
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="RefactoringPropertyPage">\r
+               <item value="true" key="org.eclipse.ltk.ui.refactoring.sortRefactorings"/>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.search/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.search/dialog_settings.xml
new file mode 100644 (file)
index 0000000..839aca5
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="">\r
+               <item value="1000" key="org.eclipse.search.resultpage.limit"/>\r
+       </section>\r
+       <section name="DialogBounds_SearchDialog">\r
+               <item value="519" key="DIALOG_WIDTH"/>\r
+               <item value="259" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="385" key="DIALOG_HEIGHT"/>\r
+               <item value="445" key="DIALOG_X_ORIGIN"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="Search">\r
+               <list key="Search.processedPageIds">\r
+                       <item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>\r
+                       <item value="org.eclipse.cdt.ui.pdomSearchPage"/>\r
+               </list>\r
+               <list key="Search.enabledPageIds">\r
+                       <item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>\r
+                       <item value="org.eclipse.cdt.ui.pdomSearchPage"/>\r
+               </list>\r
+       </section>\r
+       <section name="org.eclipse.search.text.FileSearchResultPage">\r
+               <item value="1000" key="org.eclipse.search.resultpage.limit"/>\r
+       </section>\r
+       <section name="TextSearchPage">\r
+               <item value="false" key="CASE_SENSITIVE"/>\r
+               <item value="false" key="REG_EX_SEARCH"/>\r
+               <item value="false" key="SEARCH_DERIVED"/>\r
+               <item value="1" key="HISTORY_SIZE"/>\r
+               <section name="HISTORY0">\r
+                       <item value="false" key="isRegExSearch"/>\r
+                       <item value="struct timer" key="textPattern"/>\r
+                       <item value="0" key="scope"/>\r
+                       <item value="true" key="ignoreCase"/>\r
+                       <list key="fileNamePatterns">\r
+                               <item value="*.c *.h"/>\r
+                       </list>\r
+                       <list key="workingSets">\r
+                       </list>\r
+               </section>\r
+       </section>\r
+       <section name="SearchDialog.ScopePart">\r
+               <item value="0" key="scope"/>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.cheatsheets/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.cheatsheets/dialog_settings.xml
new file mode 100644 (file)
index 0000000..1df8b48
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="CheatSheetCategoryBasedSelectionDialog">\r
+               <item value="326" key="DIALOG_WIDTH"/>\r
+               <item value="154" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="542" key="DIALOG_HEIGHT"/>\r
+               <item value="541" key="DIALOG_X_ORIGIN"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
new file mode 100644 (file)
index 0000000..070a4ab
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="ResourceNavigator">\r
+               <item value="FreeRTOS_LM3S8962_Demo" key="ResourceWorkingSetFilter.STORE_WORKING_SET"/>\r
+               <item value="1" key="ResourceViewer.STORE_SORT_TYPE"/>\r
+       </section>\r
+       <section name="org.eclipse.ui.views.task">\r
+       </section>\r
+       <section name="org.eclipse.ui.views.problem">\r
+       </section>\r
+       <section name="SaveAsDialogSettings">\r
+               <item value="438" key="DIALOG_WIDTH"/>\r
+               <item value="147" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="625" key="DIALOG_X_ORIGIN"/>\r
+               <item value="553" key="DIALOG_HEIGHT"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="CleanDialogSettings">\r
+               <item value="443" key="DIALOG_WIDTH"/>\r
+               <item value="true" key="BUILD_NOW"/>\r
+               <item value="251" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="391" key="DIALOG_HEIGHT"/>\r
+               <item value="479" key="DIALOG_X_ORIGIN"/>\r
+               <item value="false" key="TOGGLE_SELECTED"/>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.intro/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.intro/dialog_settings.xml
new file mode 100644 (file)
index 0000000..d3014f5
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <item value="1024" key="introLaunchBar.location"/>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml
new file mode 100644 (file)
index 0000000..e891f28
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="org.eclipse.ui.texteditor.FindReplaceDialog_dialogBounds">\r
+               <item value="243" key="DIALOG_WIDTH"/>\r
+               <item value="209" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="1044" key="DIALOG_X_ORIGIN"/>\r
+               <item value="356" key="DIALOG_HEIGHT"/>\r
+               <item value="1|Tahoma|8.25|0|WINDOWS|1|-11|0|0|0|400|0|0|0|1|0|0|0|0|Tahoma" key="DIALOG_FONT_NAME"/>\r
+       </section>\r
+       <section name="org.eclipse.ui.texteditor.FindReplaceDialog">\r
+               <item value="false" key="wrap"/>\r
+               <item value="false" key="casesensitive"/>\r
+               <item value="false" key="isRegEx"/>\r
+               <item value="false" key="incremental"/>\r
+               <item value="false" key="wholeword"/>\r
+               <item value="xTaskCreate" key="selection"/>\r
+               <list key="findhistory">\r
+                       <item value="xTaskCreate"/>\r
+                       <item value="stallsent"/>\r
+                       <item value="COUNT_MASK"/>\r
+                       <item value="QUEUE_LENGTH"/>\r
+                       <item value="uxQueueMessage"/>\r
+                       <item value="bktALLOWABLE_MARGIN"/>\r
+                       <item value="xAreBlockTimeTestTasksStillRunning"/>\r
+                       <item value="vProcessInput"/>\r
+               </list>\r
+               <list key="replacehistory">\r
+                       <item value="lEMACSend"/>\r
+                       <item value="partstNUM_LEDS"/>\r
+                       <item value="DESCRIPTORNUM"/>\r
+                       <item value="MAC_TXPRODUCEINDEX"/>\r
+                       <item value="MAC_TXDESCRIPTORNUMBER"/>\r
+                       <item value="MAC_TXSTATUS"/>\r
+                       <item value="MAC_TXDESCRIPTOR"/>\r
+                       <item value="MAC_RXDESCRIPTORNUMBER"/>\r
+               </list>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
new file mode 100644 (file)
index 0000000..77beade
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="WorkbenchPreferenceDialogSettings">\r
+               <item value="146" key="DIALOG_Y_ORIGIN"/>\r
+               <item value="269" key="DIALOG_X_ORIGIN"/>\r
+       </section>\r
+       <section name="org.eclipse.ui.preferences.keysPreferencePage">\r
+               <item value="true" key="uncategorizedFilter"/>\r
+               <item value="false" key="showAllField"/>\r
+               <item value="true" key="internalFilter"/>\r
+               <item value="true" key="actionSetFilter"/>\r
+       </section>\r
+       <section name="ImportExportAction">\r
+               <item value="org.eclipse.ui.wizards.import.FileSystem" key="ImportExportPage.STORE_SELECTED_IMPORT_WIZARD_ID"/>\r
+               <list key="ImportExportPage.STORE_EXPANDED_IMPORT_CATEGORIES">\r
+                       <item value="org.eclipse.ui.Basic"/>\r
+               </list>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
new file mode 100644 (file)
index 0000000..97c7cfc
--- /dev/null
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<workbench progressCount="21" version="2.0">\r
+<workbenchAdvisor/>\r
+<window height="768" maximized="true" width="1024" x="66" y="69">\r
+<fastViewData fastViewLocation="1024"/>\r
+<perspectiveBar>\r
+<itemSize x="160"/>\r
+</perspectiveBar>\r
+<coolbarLayout locked="0">\r
+<coolItem id="group.file" itemType="typeGroupMarker"/>\r
+<coolItem id="org.eclipse.ui.workbench.file" itemType="typeToolBarContribution" x="130" y="22"/>\r
+<coolItem id="additions" itemType="typeGroupMarker"/>\r
+<coolItem id="org.eclipse.cdt.ui.CElementCreationActionSet" itemType="typeToolBarContribution" x="161" y="22"/>\r
+<coolItem id="org.eclipse.cdt.ui.buildConfigActionSet" itemType="typeToolBarContribution" x="85" y="22"/>\r
+<coolItem id="org.eclipse.debug.ui.launchActionSet" itemType="typeToolBarContribution" x="124" y="22"/>\r
+<coolItem id="org.eclipse.search.searchActionSet" itemType="typeToolBarContribution" x="61" y="22"/>\r
+<coolItem id="org.eclipse.ui.edit.text.actionSet.presentation" itemType="typeToolBarContribution" x="61" y="22"/>\r
+<coolItem id="group.nav" itemType="typeGroupMarker"/>\r
+<coolItem id="org.eclipse.ui.workbench.navigate" itemType="typeToolBarContribution" x="185" y="22"/>\r
+<coolItem id="group.editor" itemType="typeGroupMarker"/>\r
+<coolItem id="org.eclipse.cdt.ui.editor.asm.AsmEditor" itemType="typeToolBarContribution" x="-1" y="-1"/>\r
+<coolItem id="org.eclipse.ui.DefaultTextEditor" itemType="typePlaceholder" x="-1" y="-1"/>\r
+<coolItem id="org.eclipse.cdt.ui.editor.CEditor" itemType="typePlaceholder" x="-1" y="-1"/>\r
+<coolItem id="org.eclipse.cdt.make.editor" itemType="typeToolBarContribution" x="-1" y="-1"/>\r
+<coolItem id="group.help" itemType="typeGroupMarker"/>\r
+<coolItem id="org.eclipse.ui.workbench.help" itemType="typeToolBarContribution" x="-1" y="-1"/>\r
+</coolbarLayout>\r
+<page aggregateWorkingSetId="Aggregate for window 1188147282312" focus="true" label="Workspace - C/C++">\r
+<editors>\r
+<editorArea activeWorkbook="DefaultEditorWorkbook">\r
+<info part="DefaultEditorWorkbook">\r
+<folder appearance="1" expanded="2">\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33"/>\r
+</folder>\r
+</info>\r
+</editorArea>\r
+</editors>\r
+<views>\r
+<view id="org.eclipse.debug.ui.ExpressionView" partName="Expressions">\r
+<viewState/>\r
+</view>\r
+<view id="org.eclipse.ui.navigator.ProjectExplorer" partName="Project Explorer">\r
+<viewState CommonNavigator.LINKING_ENABLED="0" CommonNavigator.LINKING_ENABLED.delayed="0" org.eclipse.cdt.ui.cview.groupincludes="false" org.eclipse.cdt.ui.editor.CUChildren="true" org.eclipse.ui.navigator.resources.workingSets.showTopLevelWorkingSets="0"/>\r
+</view>\r
+<view id="org.eclipse.ui.views.PropertySheet" partName="Properties">\r
+<viewState/>\r
+</view>\r
+<view id="org.eclipse.search.ui.views.SearchView" partName="Search">\r
+<viewState isPinned="false">\r
+<view IMemento.internal.id="" org.eclipse.search.lastActivation="0"/>\r
+</viewState>\r
+</view>\r
+<view id="org.eclipse.ui.views.ResourceNavigator" partName="Navigator">\r
+<viewState LINK_NAVIGATOR_TO_EDITOR="0" sorter="1">\r
+<filters>\r
+<filter element=".*" isEnabled="false"/>\r
+<filter element="*.class" isEnabled="false"/>\r
+</filters>\r
+<expanded>\r
+<element path="/RTOSDemo"/>\r
+</expanded>\r
+<selection>\r
+<element path="/RTOSDemo/main.c"/>\r
+</selection>\r
+</viewState>\r
+</view>\r
+<view id="org.eclipse.debug.ui.DebugView" partName="Debug">\r
+<viewState/>\r
+</view>\r
+<view id="org.eclipse.ui.views.ProblemView" partName="Problems">\r
+<viewState columnWidth0="781" columnWidth1="78" columnWidth2="153" columnWidth3="63" columnWidth4="0" horizontalPosition="0" verticalPosition="0">\r
+<columnOrder columnOrderIndex="0"/>\r
+<columnOrder columnOrderIndex="1"/>\r
+<columnOrder columnOrderIndex="2"/>\r
+<columnOrder columnOrderIndex="3"/>\r
+<columnOrder columnOrderIndex="4"/>\r
+</viewState>\r
+</view>\r
+<view id="org.eclipse.ui.console.ConsoleView" partName="Console">\r
+<viewState/>\r
+</view>\r
+<view id="org.eclipse.debug.ui.BreakpointView" partName="Breakpoints">\r
+<viewState>\r
+<isTrackingSelection value="false"/>\r
+</viewState>\r
+</view>\r
+<view id="org.eclipse.debug.ui.VariableView" partName="Variables">\r
+<viewState/>\r
+</view>\r
+<view id="org.eclipse.ui.views.TaskList" partName="Tasks">\r
+<viewState columnWidth0="43" columnWidth1="19" columnWidth2="253" columnWidth3="78" columnWidth4="283" columnWidth5="63" columnWidth6="0" horizontalPosition="0" verticalPosition="0">\r
+<columnOrder columnOrderIndex="0"/>\r
+<columnOrder columnOrderIndex="1"/>\r
+<columnOrder columnOrderIndex="2"/>\r
+<columnOrder columnOrderIndex="3"/>\r
+<columnOrder columnOrderIndex="4"/>\r
+<columnOrder columnOrderIndex="5"/>\r
+<columnOrder columnOrderIndex="6"/>\r
+</viewState>\r
+</view>\r
+</views>\r
+<perspectives activePart="org.eclipse.ui.views.ResourceNavigator" activePerspective="org.eclipse.cdt.ui.CPerspective">\r
+<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">\r
+<descriptor class="org.eclipse.cdt.internal.ui.CPerspectiveFactory" id="org.eclipse.cdt.ui.CPerspective" label="C/C++"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.WorkingSetActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>\r
+<alwaysOnActionSet id="org.eclipse.update.ui.softwareUpdates"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.ui.SearchActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.ui.CElementCreationActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.NavigateActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.debug.ui.breakpointActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.make.ui.makeTargetActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.ui.CodingActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.debug.ui.launchActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.ui.buildConfigActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.ui.NavigationActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.ui.OpenActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.presentation"/>\r
+<show_view_action id="org.eclipse.ui.console.ConsoleView"/>\r
+<show_view_action id="org.eclipse.search.ui.views.SearchView"/>\r
+<show_view_action id="org.eclipse.ui.views.ContentOutline"/>\r
+<show_view_action id="org.eclipse.ui.views.ProblemView"/>\r
+<show_view_action id="org.eclipse.cdt.ui.CView"/>\r
+<show_view_action id="org.eclipse.ui.views.ResourceNavigator"/>\r
+<show_view_action id="org.eclipse.ui.views.PropertySheet"/>\r
+<show_view_action id="org.eclipse.ui.views.TaskList"/>\r
+<show_view_action id="org.eclipse.cdt.make.ui.views.MakeView"/>\r
+<show_view_action id="org.eclipse.ui.navigator.ProjectExplorer"/>\r
+<show_view_action id="org.eclipse.cdt.ui.includeBrowser"/>\r
+<show_in_time id="org.eclipse.ui.views.ResourceNavigator" time="1187629972828"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.ConvertToMakeWizard"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewCWizard2"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewCWizard1"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewSourceFolderCreationWizard"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewFolderCreationWizard"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewSourceFileCreationWizard"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewHeaderFileCreationWizard"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewFileCreationWizard"/>\r
+<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewClassCreationWizard"/>\r
+<perspective_action id="org.eclipse.debug.ui.DebugPerspective"/>\r
+<perspective_action id="org.eclipse.team.ui.TeamSynchronizingPerspective"/>\r
+<view id="org.eclipse.ui.navigator.ProjectExplorer"/>\r
+<view id="org.eclipse.ui.views.ResourceNavigator"/>\r
+<view id="org.eclipse.ui.views.ProblemView"/>\r
+<view id="org.eclipse.ui.views.TaskList"/>\r
+<view id="org.eclipse.ui.console.ConsoleView"/>\r
+<view id="org.eclipse.ui.views.PropertySheet"/>\r
+<view id="org.eclipse.search.ui.views.SearchView"/>\r
+<fastViewBars/>\r
+<layout>\r
+<mainWindow>\r
+<info folder="true" part="topLeft">\r
+<folder activePageID="org.eclipse.ui.views.ResourceNavigator" appearance="2" expanded="2">\r
+<page content="org.eclipse.ui.navigator.ProjectExplorer" label="Project Explorer"/>\r
+<page content="org.eclipse.ui.views.ResourceNavigator" label="Navigator"/>\r
+<page content="org.eclipse.cdt.ui.CView" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.views.BookmarkView" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33">\r
+<part id="0"/>\r
+<part id="1"/>\r
+</presentation>\r
+</folder>\r
+</info>\r
+<info folder="true" part="org.eclipse.ui.internal.ViewStack@b4d39c" ratio="0.75" ratioLeft="756" ratioRight="252" relationship="2" relative="topLeft">\r
+<folder appearance="2" expanded="2">\r
+<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33"/>\r
+</folder>\r
+</info>\r
+<info part="org.eclipse.ui.editorss" ratio="0.19510439" ratioLeft="271" ratioRight="1118" relationship="2" relative="topLeft"/>\r
+<info folder="true" part="bottom" ratio="0.5195652" ratioLeft="478" ratioRight="442" relationship="4" relative="org.eclipse.ui.editorss">\r
+<folder activePageID="org.eclipse.ui.console.ConsoleView" appearance="2" expanded="2">\r
+<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>\r
+<page content="org.eclipse.ui.views.TaskList" label="Tasks"/>\r
+<page content="org.eclipse.ui.console.ConsoleView" label="Console"/>\r
+<page content="org.eclipse.ui.views.PropertySheet" label="Properties"/>\r
+<page content="org.eclipse.search.ui.views.SearchView" label="Search"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33">\r
+<part id="0"/>\r
+<part id="1"/>\r
+<part id="2"/>\r
+<part id="3"/>\r
+<part id="4"/>\r
+</presentation>\r
+</folder>\r
+</info>\r
+<info folder="true" part="topRight" ratio="0.75" ratioLeft="567" ratioRight="189" relationship="2" relative="org.eclipse.ui.editorss">\r
+<folder appearance="2" expanded="2">\r
+<page content="org.eclipse.ui.views.ContentOutline" label="LabelNotFound"/>\r
+<page content="org.eclipse.cdt.make.ui.views.MakeView" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33"/>\r
+</folder>\r
+</info>\r
+</mainWindow>\r
+</layout>\r
+</perspective>\r
+<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">\r
+<descriptor class="org.eclipse.debug.internal.ui.DebugPerspectiveFactory" id="org.eclipse.debug.ui.DebugPerspective" label="Debug"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.WorkingSetActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>\r
+<alwaysOnActionSet id="org.eclipse.update.ui.softwareUpdates"/>\r
+<alwaysOnActionSet id="org.eclipse.debug.ui.launchActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.cdt.debug.ui.debugActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.ui.NavigateActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.debug.ui.breakpointActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.jdt.debug.ui.JDTDebugActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.jdt.ui.JavaActionSet"/>\r
+<alwaysOnActionSet id="org.eclipse.debug.ui.debugActionSet"/>\r
+<show_view_action id="org.eclipse.debug.ui.DebugView"/>\r
+<show_view_action id="org.eclipse.debug.ui.VariableView"/>\r
+<show_view_action id="org.eclipse.debug.ui.BreakpointView"/>\r
+<show_view_action id="org.eclipse.debug.ui.ExpressionView"/>\r
+<show_view_action id="org.eclipse.ui.views.ContentOutline"/>\r
+<show_view_action id="org.eclipse.ui.console.ConsoleView"/>\r
+<show_view_action id="org.eclipse.ui.views.TaskList"/>\r
+<show_view_action id="org.eclipse.cdt.debug.ui.SignalsView"/>\r
+<show_view_action id="org.eclipse.debug.ui.RegisterView"/>\r
+<show_view_action id="org.eclipse.debug.ui.MemoryView"/>\r
+<show_view_action id="org.eclipse.cdt.debug.ui.DisassemblyView"/>\r
+<show_view_action id="org.eclipse.cdt.debug.ui.ModulesView"/>\r
+<show_view_action id="org.eclipse.ui.views.ProblemView"/>\r
+<perspective_action id="org.eclipse.cdt.ui.CPerspective"/>\r
+<view id="org.eclipse.ui.console.ConsoleView"/>\r
+<view id="org.eclipse.ui.views.TaskList"/>\r
+<view id="org.eclipse.ui.views.ProblemView"/>\r
+<view id="org.eclipse.debug.ui.DebugView"/>\r
+<view id="org.eclipse.debug.ui.VariableView"/>\r
+<view id="org.eclipse.debug.ui.BreakpointView"/>\r
+<view id="org.eclipse.debug.ui.ExpressionView"/>\r
+<fastViewBars/>\r
+<layout>&#x0A;<mainWindow>&#x0A;<info folder="true" part="org.eclipse.debug.internal.ui.NavigatorFolderView">&#x0A;<folder activePageID="org.eclipse.debug.ui.DebugView" appearance="2" expanded="2">&#x0A;<page content="org.eclipse.debug.ui.DebugView" label="Debug"/>\r
+<page content="org.eclipse.ui.views.ResourceNavigator" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33">&#x0A;<part id="0"/>\r
+</presentation>\r
+</folder>\r
+</info>\r
+<info folder="true" part="stickyFolderRight" ratio="0.75" ratioLeft="1044" ratioRight="348" relationship="2" relative="org.eclipse.debug.internal.ui.NavigatorFolderView">&#x0A;<folder appearance="2" expanded="2">&#x0A;<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>\r
+</folder>\r
+</info>\r
+<info folder="true" part="org.eclipse.debug.internal.ui.ConsoleFolderView" ratio="0.773913" ratioLeft="712" ratioRight="208" relationship="4" relative="org.eclipse.debug.internal.ui.NavigatorFolderView">&#x0A;<folder activePageID="org.eclipse.ui.console.ConsoleView" appearance="2" expanded="2">&#x0A;<page content="org.eclipse.ui.console.ConsoleView" label="Console"/>\r
+<page content="org.eclipse.ui.views.TaskList" label="Tasks"/>\r
+<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>\r
+<page content="org.eclipse.debug.ui.MemoryView" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.views.BookmarkView" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.views.PropertySheet" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33">&#x0A;<part id="0"/>\r
+<part id="1"/>\r
+<part id="2"/>\r
+</presentation>\r
+</folder>\r
+</info>\r
+<info part="org.eclipse.ui.editorss" ratio="0.370945" ratioLeft="263" ratioRight="446" relationship="4" relative="org.eclipse.debug.internal.ui.NavigatorFolderView"/>\r
+<info folder="true" part="org.eclipse.debug.internal.ui.OutlineFolderView" ratio="0.475162" ratioLeft="660" ratioRight="729" relationship="2" relative="org.eclipse.ui.editorss">&#x0A;<folder appearance="2" expanded="2">&#x0A;<page content="org.eclipse.cdt.debug.ui.DisassemblyView" label="LabelNotFound"/>\r
+<page content="org.eclipse.ui.views.ContentOutline" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33"/>\r
+</folder>\r
+</info>\r
+<info folder="true" part="org.eclipse.debug.internal.ui.ToolsFolderView" ratio="0.49964002" ratioLeft="694" ratioRight="695" relationship="2" relative="org.eclipse.debug.internal.ui.NavigatorFolderView">&#x0A;<folder activePageID="org.eclipse.debug.ui.BreakpointView" appearance="2" expanded="2">&#x0A;<page content="org.eclipse.debug.ui.VariableView" label="Variables"/>\r
+<page content="org.eclipse.debug.ui.BreakpointView" label="Breakpoints"/>\r
+<page content="org.eclipse.debug.ui.ExpressionView" label="Expressions"/>\r
+<page content="org.eclipse.debug.ui.RegisterView" label="LabelNotFound"/>\r
+<page content="org.eclipse.cdt.debug.ui.ModulesView" label="LabelNotFound"/>\r
+<page content="org.eclipse.cdt.debug.ui.SignalsView" label="LabelNotFound"/>\r
+<presentation id="org.eclipse.ui.internal.presentations.r33.WorkbenchPresentationFactory_33">&#x0A;<part id="0"/>\r
+<part id="1"/>\r
+<part id="2"/>\r
+</presentation>\r
+</folder>\r
+</info>\r
+</mainWindow>\r
+</layout>\r
+</perspective>\r
+</perspectives>\r
+<workingSets>\r
+<workingSet IMemento.internal.id="FreeRTOS_LM3S8962_Demo"/>\r
+</workingSets>\r
+<navigationHistory/>\r
+<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>\r
+</page>\r
+<workbenchWindowAdvisor/>\r
+<actionBarAdvisor/>\r
+<trimLayout>\r
+<trimArea IMemento.internal.id="128">\r
+<trimItem IMemento.internal.id="org.eclipse.ui.internal.WorkbenchWindow.topBar"/>\r
+</trimArea>\r
+<trimArea IMemento.internal.id="1024">\r
+<trimItem IMemento.internal.id="org.eclise.ui.internal.FastViewBar"/>\r
+<trimItem IMemento.internal.id="org.eclipse.jface.action.StatusLineManager"/>\r
+<trimItem IMemento.internal.id="org.eclipse.ui.internal.progress.ProgressRegion"/>\r
+</trimArea>\r
+</trimLayout>\r
+</window>\r
+<mruList>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="tasks.c" tooltip="RTOSDemo/FreeRTOS.org Source/tasks.c">\r
+<persistable path="/RTOSDemo/FreeRTOS.org Source/tasks.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="main.c" tooltip="RTOSDemo/main.c">\r
+<persistable path="/RTOSDemo/main.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="USB_ISR.c" tooltip="RTOSDemo/USB/USB_ISR.c">\r
+<persistable path="/RTOSDemo/USB/USB_ISR.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="USBSample.c" tooltip="RTOSDemo/USB/USBSample.c">\r
+<persistable path="/RTOSDemo/USB/USBSample.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="queue.c" tooltip="RTOSDemo/FreeRTOS.org Source/queue.c">\r
+<persistable path="/RTOSDemo/FreeRTOS.org Source/queue.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.make.editor" name="Makefile" tooltip="RTOSDemo/Makefile">\r
+<persistable path="/RTOSDemo/Makefile"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="blocktim.c" tooltip="RTOSDemo/Common Demo Files/Minimal/blocktim.c">\r
+<persistable path="/RTOSDemo/Common Demo Files/Minimal/blocktim.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="QPeek.c" tooltip="RTOSDemo/Common Demo Files/Minimal/QPeek.c">\r
+<persistable path="/RTOSDemo/Common Demo Files/Minimal/QPeek.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="GenQTest.c" tooltip="RTOSDemo/Common Demo Files/Minimal/GenQTest.c">\r
+<persistable path="/RTOSDemo/Common Demo Files/Minimal/GenQTest.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="dynamic.c" tooltip="RTOSDemo/Common Demo Files/Minimal/dynamic.c">\r
+<persistable path="/RTOSDemo/Common Demo Files/Minimal/dynamic.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="BlockQ.c" tooltip="RTOSDemo/Common Demo Files/Minimal/BlockQ.c">\r
+<persistable path="/RTOSDemo/Common Demo Files/Minimal/BlockQ.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="ParTest.c" tooltip="RTOSDemo/ParTest/ParTest.c">\r
+<persistable path="/RTOSDemo/ParTest/ParTest.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="FreeRTOSConfig.h" tooltip="RTOSDemo/FreeRTOSConfig.h">\r
+<persistable path="/RTOSDemo/FreeRTOSConfig.h"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="httpd.c" tooltip="RTOSDemo/webserver/httpd.c">\r
+<persistable path="/RTOSDemo/webserver/httpd.c"/>\r
+</file>\r
+<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="portmacro.h" tooltip="RTOSDemo/FreeRTOS.org Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h">\r
+<persistable path="/RTOSDemo/FreeRTOS.org Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"/>\r
+</file>\r
+</mruList>\r
+</workbench>
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
new file mode 100644 (file)
index 0000000..a34189f
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<workingSetManager>\r
+<workingSet editPageId="org.eclipse.cdt.ui.CElementWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="FreeRTOS_LM3S8962_Demo" name="FreeRTOS_LM3S8962_Demo">\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/httpd-fs.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/timer.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip_arp.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uiplib.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/queue.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uipopt.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip-split.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/Minimal/dynamic.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/psock.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip-fw.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/httpd-fsdata.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip-neighbor.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/include" type="2"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/httpd-fs" type="2"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/timer.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/ParTest/ParTest.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/Minimal/QPeek.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/portable/MemMang/heap_2.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/main.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/Minimal/flash.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/portable/GCC/ARM7_AT91SAM7S/lib_AT91SAM7X256.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/EMAC_ISR.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/list.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/clock.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/lc.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/USB/USB_ISR.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/httpd-cgi.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/uIP_Task.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/portable/GCC/ARM7_AT91SAM7S/portISR.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/SAM7_EMAC.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/Minimal/BlockQ.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/portable/GCC/ARM7_AT91SAM7S/port.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/psock.h" type="1"/>\r
+<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/RTOSDemo/Makefile" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip-neighbor.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOSConfig.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/lc-switch.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/Minimal/GenQTest.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/FreeRTOS.org Source/tasks.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip-fw.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uiplib.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/lc-addrlabels.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip-split.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/httpd.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/USB/USBSample.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/boot.s" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/Minimal/blocktim.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/webserver/http-strings.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip_arch.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/uip_arp.c" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/ethernet/uIP/uip-1.0/uip/pt.h" type="1"/>\r
+<item factoryID="org.eclipse.cdt.ui.PersistableCElementFactory" path="/RTOSDemo/Common Demo Files/include" type="2"/>\r
+</workingSet>\r
+<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="Window Working Set" name="Aggregate for window 1188147282312">\r
+<workingSet IMemento.internal.id="FreeRTOS_LM3S8962_Demo"/>\r
+</workingSet>\r
+<mruList name="FreeRTOS_LM3S8962_Demo"/>\r
+</workingSetManager>
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.ui/dialog_settings.xml
new file mode 100644 (file)
index 0000000..64561b6
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="FileSystemImportWizard">\r
+               <item value="false" key="WizardFileSystemResourceImportPage1.STORE_OVERWRITE_EXISTING_RESOURCES_ID"/>\r
+               <item value="false" key="WizardFileSystemResourceImportPage1.STORE_CREATE_CONTAINER_STRUCTURE_ID"/>\r
+               <list key="WizardFileSystemResourceImportPage1.STORE_SOURCE_NAMES_ID">\r
+                       <item value="C:\E\Dev\FreeRTOS\Demo\CORTEX_LM3S8962_Eclipse"/>\r
+               </list>\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.update.ui/dialog_settings.xml b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/.plugins/org.eclipse.update.ui/dialog_settings.xml
new file mode 100644 (file)
index 0000000..86928e0
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<section name="Workbench">\r
+       <section name="ModeSelectionPage">\r
+       </section>\r
+</section>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/version.ini b/Demo/ARM7_AT91SAM7X256_Eclipse/.metadata/version.ini
new file mode 100644 (file)
index 0000000..c51ff74
--- /dev/null
@@ -0,0 +1 @@
+org.eclipse.core.runtime=1
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.cproject b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.cproject
new file mode 100644 (file)
index 0000000..bbcae40
--- /dev/null
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?fileVersion 4.0.0?>\r
+\r
+<cproject>\r
+<storageModule moduleId="org.eclipse.cdt.core.settings">\r
+<cconfiguration id="0.1109417601">\r
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1109417601" moduleId="org.eclipse.cdt.core.settings" name="Default">\r
+<externalSettings/>\r
+<extensions>\r
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
+<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+</extensions>\r
+</storageModule>\r
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+<configuration artifactExtension="" artifactName="RTOSDemo" buildProperties="" description="" id="0.1109417601" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">\r
+<folderInfo id="0.1109417601." name="/" resourcePath="">\r
+<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1816209921" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">\r
+<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.1816209921.1299943801" name=""/>\r
+<builder autoBuildTarget="all" buildPath="${workspace_loc:/RTOSDemo}" cleanBuildTarget="clean" command="make" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.116472864" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder">\r
+<outputEntries>\r
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>\r
+</outputEntries>\r
+</builder>\r
+<tool id="org.eclipse.cdt.build.core.settings.holder.libs.260784574" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>\r
+<tool id="org.eclipse.cdt.build.core.settings.holder.1502006385" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">\r
+<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.578007234" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths"/>\r
+<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.685511860" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>\r
+</tool>\r
+<tool id="org.eclipse.cdt.build.core.settings.holder.1021181093" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">\r
+<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1567637665" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths"/>\r
+<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1828415025" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>\r
+</tool>\r
+<tool id="org.eclipse.cdt.build.core.settings.holder.164584712" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">\r
+<option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1309366258" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths"/>\r
+<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1667472855" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>\r
+</tool>\r
+</toolChain>\r
+</folderInfo>\r
+<sourceEntries>\r
+<entry excluding="Common Demo Files|FreeRTOS.org Source|Source|Minimal" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="FreeRTOS.org Source"/>\r
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Common Demo Files"/>\r
+</sourceEntries>\r
+</configuration>\r
+</storageModule>\r
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>\r
+\r
+\r
+\r
+\r
+<storageModule moduleId="scannerConfiguration">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<scannerConfigBuildInfo instanceId="0.1109417601">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="arm-elf-gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+</scannerConfigBuildInfo>\r
+</storageModule>\r
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping">\r
+<project-mappings/>\r
+</storageModule>\r
+</cconfiguration>\r
+</storageModule>\r
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+<project id="RTOSDemo.null.976634949" name="RTOSDemo"/>\r
+</storageModule>\r
+</cproject>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.project b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.project
new file mode 100644 (file)
index 0000000..b3776de
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>RTOSDemo</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>\r
+                       <triggers>clean,full,incremental,</triggers>\r
+                       <arguments>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\r
+                                       <value>clean</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>?name?</key>\r
+                                       <value></value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.append_environment</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.stopOnError</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.buildCommand</key>\r
+                                       <value>make</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.contents</key>\r
+                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.buildLocation</key>\r
+                                       <value>${workspace_loc:/RTOSDemo}</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>\r
+                                       <value>false</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>\r
+                                       <value>false</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.buildArguments</key>\r
+                                       <value></value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.fullBuildTarget</key>\r
+                                       <value>all</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>?children?</key>\r
+                                       <value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\\\\\\\\\|\\\\\\\|\||</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>\r
+                                       <value>all</value>\r
+                               </dictionary>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>\r
+               <nature>org.eclipse.cdt.core.cnature</nature>\r
+       </natures>\r
+       <linkedResources>\r
+               <link>\r
+                       <name>Common Demo Files</name>\r
+                       <type>2</type>\r
+                       <locationURI>FreeRTOS_ROOT/Demo/Common</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>FreeRTOS.org Source</name>\r
+                       <type>2</type>\r
+                       <locationURI>FreeRTOS_ROOT/Source</locationURI>\r
+               </link>\r
+       </linkedResources>\r
+</projectDescription>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.settings/org.eclipse.ltk.core.refactoring.prefs b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644 (file)
index 0000000..a9f7e81
--- /dev/null
@@ -0,0 +1,3 @@
+#Sun Aug 19 20:36:58 BST 2007\r
+eclipse.preferences.version=1\r
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/FreeRTOSConfig.h
new file mode 100644 (file)
index 0000000..1f42211
--- /dev/null
@@ -0,0 +1,99 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+#ifndef FREERTOS_CONFIG_H\r
+#define FREERTOS_CONFIG_H\r
+\r
+#include <stdio.h>\r
+#include "AT91SAM7X256.h"\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
+\r
+#define configUSE_PREEMPTION           1\r
+#define configUSE_IDLE_HOOK         0\r
+#define configUSE_TICK_HOOK         1\r
+#define configCPU_CLOCK_HZ          ( ( unsigned portLONG ) 47923200 )\r
+#define configTICK_RATE_HZ          ( ( portTickType ) 1000 )\r
+#define configMAX_PRIORITIES           ( ( unsigned portBASE_TYPE ) 4 )\r
+#define configMINIMAL_STACK_SIZE       ( ( unsigned portSHORT ) 130 )\r
+#define configTOTAL_HEAP_SIZE          ( ( size_t ) ( 24 * 1024 ) )\r
+#define configMAX_TASK_NAME_LEN                ( 10 )\r
+#define configUSE_TRACE_FACILITY       1\r
+#define configUSE_16_BIT_TICKS         0\r
+#define configIDLE_SHOULD_YIELD                1\r
+#define configUSE_MUTEXES                      1\r
+\r
+/* Co-routine definitions. */\r
+#define configUSE_CO_ROUTINES          0\r
+#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
+\r
+\r
+/* Set the following definitions to 1 to include the API function, or zero\r
+to exclude the API function. */\r
+\r
+#define INCLUDE_vTaskPrioritySet            1\r
+#define INCLUDE_uxTaskPriorityGet           1\r
+#define INCLUDE_vTaskDelete                 1\r
+#define INCLUDE_vTaskCleanUpResources       0\r
+#define INCLUDE_vTaskSuspend                1\r
+#define INCLUDE_vTaskDelayUntil             1\r
+#define INCLUDE_vTaskDelay                  1\r
+#define INCLUDE_xTaskGetCurrentTaskHandle      1\r
+\r
+\r
+\r
+/* MAC address configuration. */\r
+#define uipMAC_ADDR0   0x00\r
+#define uipMAC_ADDR1   0x12\r
+#define uipMAC_ADDR2   0x13\r
+#define uipMAC_ADDR3   0x10\r
+#define uipMAC_ADDR4   0x15\r
+#define uipMAC_ADDR5   0x11\r
+\r
+/* IP address configuration. */\r
+#define uipIP_ADDR0            172\r
+#define uipIP_ADDR1            25\r
+#define uipIP_ADDR2            218\r
+#define uipIP_ADDR3            10      \r
+\r
+#endif /* FREERTOS_CONFIG_H */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/Makefile
new file mode 100644 (file)
index 0000000..8b486a1
--- /dev/null
@@ -0,0 +1,132 @@
+#      FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+#      See http://www.FreeRTOS.org for documentation, latest information, license \r
+#      and contact details.  Please ensure to read the configuration and relevant \r
+#      port sections of the online documentation.\r
+#      ***************************************************************************\r
+\r
+\r
+RTOS_SOURCE_DIR=../../../Source\r
+DEMO_COMMON_DIR=../../Common/Minimal\r
+DEMO_INCLUDE_DIR=../../Common/include\r
+UIP_COMMON_DIR=../../Common/ethernet/uIP/uip-1.0/uip\r
+\r
+CC=arm-elf-gcc\r
+OBJCOPY=arm-elf-objcopy\r
+LDSCRIPT=atmel-rom.ld\r
+\r
+LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
+\r
+DEBUG=-g\r
+OPTIM=-O3\r
+\r
+\r
+CFLAGS= $(DEBUG) \\r
+               $(OPTIM) \\r
+               -T$(LDSCRIPT) \\r
+               -I . \\r
+               -I $(RTOS_SOURCE_DIR)/include \\r
+               -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S \\r
+               -I $(DEMO_INCLUDE_DIR) \\r
+               -I ./webserver \\r
+               -I $(UIP_COMMON_DIR) \\r
+               -I ./SrcAtmel \\r
+               -I ./USB \\r
+               -D SAM7_GCC \\r
+               -D THUMB_INTERWORK \\r
+               -mcpu=arm7tdmi \\r
+               -D PACK_STRUCT_END=__attribute\(\(packed\)\) \\r
+               -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \\r
+               -fomit-frame-pointer \\r
+               -mthumb-interwork\r
+                                                                               \r
+THUMB_SOURCE= \\r
+               main.c \\r
+               ./ParTest/ParTest.c \\r
+               $(DEMO_COMMON_DIR)/BlockQ.c \\r
+               $(DEMO_COMMON_DIR)/blocktim.c \\r
+               $(DEMO_COMMON_DIR)/flash.c \\r
+               $(DEMO_COMMON_DIR)/integer.c \\r
+               $(DEMO_COMMON_DIR)/GenQTest.c \\r
+               $(DEMO_COMMON_DIR)/QPeek.c \\r
+               $(DEMO_COMMON_DIR)/dynamic.c \\r
+               ./webserver/uIP_Task.c \\r
+               ./webserver/httpd.c \\r
+               ./webserver/httpd-cgi.c \\r
+               ./webserver/httpd-fs.c \\r
+               ./webserver/http-strings.c \\r
+               ./webserver/SAM7_EMAC.c \\r
+               $(UIP_COMMON_DIR)/uip_arp.c \\r
+               $(UIP_COMMON_DIR)/psock.c \\r
+               $(UIP_COMMON_DIR)/timer.c \\r
+               $(UIP_COMMON_DIR)/uip.c \\r
+               $(RTOS_SOURCE_DIR)/list.c \\r
+               $(RTOS_SOURCE_DIR)/queue.c \\r
+               $(RTOS_SOURCE_DIR)/tasks.c \\r
+               $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/port.c \\r
+               $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \\r
+               ./USB/USBSample.c\r
+\r
+ARM_SOURCE= \\r
+               $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/portISR.c \\r
+               ./webserver/emac_isr.c \\r
+               ./SrcAtmel/Cstartup_SAM7.c \\r
+               ./USB/USB_ISR.c\r
+\r
+THUMB_OBJS = $(THUMB_SOURCE:.c=.o)\r
+ARM_OBJS = $(ARM_SOURCE:.c=.o)\r
+\r
+\r
+all: RTOSDemo.bin\r
+\r
+RTOSDemo.bin : RTOSDemo.hex\r
+       $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin\r
+        \r
+RTOSDemo.hex : RTOSDemo.elf\r
+       $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex\r
+\r
+RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile\r
+       $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) \r
+\r
+$(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
+       $(CC) -c $(CFLAGS) -mthumb $< -o $@\r
+\r
+$(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
+       $(CC) -c $(CFLAGS) $< -o $@\r
+\r
+clean :\r
+       rm $(THUMB_OBJS)\r
+       rm $(ARM_OBJS)\r
+       touch Makefile\r
+       rm RTOSDemo.elf\r
+       rm RTOSDemo.hex\r
+       \r
+       \r
+       \r
+\r
+\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/ParTest/ParTest.c
new file mode 100644 (file)
index 0000000..3ef97ab
--- /dev/null
@@ -0,0 +1,101 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+\r
+/* Demo application includes. */\r
+#include "partest.h"\r
+\r
+/*-----------------------------------------------------------\r
+ * Simple parallel port IO routines for the LED's.  LED's can be set, cleared\r
+ * or toggled.\r
+ *-----------------------------------------------------------*/\r
+\r
+#define partstNUM_LEDS         ( 4 )\r
+#define partstALL_LEDS         ( ulLED_Mask[ 0 ] | ulLED_Mask[ 1 ] | ulLED_Mask[ 2 ] | ulLED_Mask[ 3 ] )\r
+const unsigned portLONG        ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };\r
+\r
+\r
+void vParTestInitialise( void )\r
+{      \r
+       /* Configure the PIO Lines corresponding to LED1 to LED4 to be outputs. */\r
+       AT91C_BASE_PIOB->PIO_PER = partstALL_LEDS; \r
+       AT91C_BASE_PIOB->PIO_OER = partstALL_LEDS; \r
+\r
+       /* Start with all LED's off. */\r
+    AT91C_BASE_PIOB->PIO_SODR = partstALL_LEDS;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
+{\r
+       if( uxLED < ( portBASE_TYPE ) partstNUM_LEDS )\r
+       {\r
+               if( xValue )\r
+               {\r
+                       AT91C_BASE_PIOB->PIO_SODR = ulLED_Mask[ uxLED ];\r
+               }\r
+               else\r
+               {\r
+                       AT91C_BASE_PIOB->PIO_CODR = ulLED_Mask[ uxLED ];\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
+{\r
+       if( uxLED < ( portBASE_TYPE ) partstNUM_LEDS )\r
+       {\r
+               if( AT91C_BASE_PIOB->PIO_PDSR & ulLED_Mask[ uxLED ] )\r
+               {\r
+                       AT91C_BASE_PIOB->PIO_CODR = ulLED_Mask[ uxLED ];\r
+               }\r
+               else\r
+               {\r
+                       AT91C_BASE_PIOB->PIO_SODR = ulLED_Mask[ uxLED ];\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+unsigned portBASE_TYPE uxParTestGetLED( void )\r
+{\r
+       /* Return the value of LED DS4 for use by the WEB server. */\r
+       return !( AT91C_BASE_PIOB->PIO_PDSR & ulLED_Mask[ partstNUM_LEDS - 1 ] );\r
+}\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Board.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Board.h
new file mode 100644 (file)
index 0000000..8b34427
--- /dev/null
@@ -0,0 +1,68 @@
+/*----------------------------------------------------------------------------\r
+*         ATMEL Microcontroller Software Support  -  ROUSSET  -\r
+*----------------------------------------------------------------------------\r
+* The software is delivered "AS IS" without warranty or condition of any\r
+* kind, either express, implied or statutory. This includes without\r
+* limitation any warranty or condition with respect to merchantability or\r
+* fitness for any particular purpose, or against the infringements of\r
+* intellectual property rights of others.\r
+*----------------------------------------------------------------------------\r
+* File Name           : Board.h\r
+* Object              : AT91SAM7X Evaluation Board Features Definition File.\r
+*\r
+* Creation            : JG   20/Jun/2005\r
+*----------------------------------------------------------------------------\r
+*/\r
+#ifndef Board_h\r
+#define Board_h\r
+\r
+#include "AT91SAM7X256.h"\r
+#include "ioat91sam7x256.h"\r
+\r
+#define true   -1\r
+#define false  0\r
+\r
+/*-------------------------------*/\r
+/* SAM7Board Memories Definition */\r
+/*-------------------------------*/\r
+// The AT91SAM7X128 embeds a 32-Kbyte SRAM bank, and 128K-Byte Flash\r
+\r
+#define  FLASH_PAGE_NB         256\r
+#define  FLASH_PAGE_SIZE       128\r
+\r
+/*-----------------*/\r
+/* Leds Definition */\r
+/*-----------------*/\r
+#define LED1            (1<<19)        // PB19\r
+#define LED2            (1<<20)        // PB20\r
+#define LED3            (1<<21)        // PB21\r
+#define LED4            (1<<22)        // PB22\r
+#define NB_LED                 4\r
+\r
+#define LED_MASK        (LED1|LED2|LED3|LED4)\r
+\r
+/*-------------------------*/\r
+/* Push Buttons Definition */\r
+/*-------------------------*/\r
+\r
+#define SW1_MASK        (1<<21)        // PA21\r
+#define SW2_MASK        (1<<22)        // PA22\r
+#define SW3_MASK        (1<<23)        // PA23\r
+#define SW4_MASK        (1<<24)        // PA24\r
+#define SW_MASK         (SW1_MASK|SW2_MASK|SW3_MASK|SW4_MASK)\r
+\r
+\r
+#define SW1    (1<<21) // PA21\r
+#define SW2    (1<<22) // PA22\r
+#define SW3    (1<<23) // PA23\r
+#define SW4    (1<<24) // PA24\r
+#define SWPUSH (1<<25) // PA25\r
+/*--------------*/\r
+/* Master Clock */\r
+/*--------------*/\r
+\r
+#define EXT_OC          18432000   // Exetrnal ocilator MAINCK\r
+#define MCK             47923200   // MCK (PLLRC div by 2)\r
+#define MCKKHz          (MCK/1000) //\r
+\r
+#endif /* Board_h */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Cstartup.s79 b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Cstartup.s79
new file mode 100644 (file)
index 0000000..b875618
--- /dev/null
@@ -0,0 +1,223 @@
+;------------------------------------------------------------------------------\r
+;-         ATMEL Microcontroller Software Support  -  ROUSSET  -\r
+;------------------------------------------------------------------------------\r
+; The software is delivered "AS IS" without warranty or condition of any\r
+; kind, either express, implied or statutory. This includes without\r
+; limitation any warranty or condition with respect to merchantability or\r
+; fitness for any particular purpose, or against the infringements of\r
+; intellectual property rights of others.\r
+;-----------------------------------------------------------------------------\r
+;- File source          : Cstartup.s79\r
+;- Object               : Generic CStartup for IAR No Use REMAP\r
+;- Compilation flag     : None\r
+;-\r
+;- 1.0 15/Jun/04 JPP    : Creation\r
+;------------------------------------------------------------------------------\r
+\r
+#include "AT91SAM7X256_inc.h"\r
+\r
+;------------------------------------------------------------------------------\r
+;- Area Definition\r
+;------------------------------------------------------------------------------\r
+\r
+;---------------------------------------------------------------\r
+; ?RESET\r
+; Reset Vector.\r
+; Normally, segment INTVEC is linked at address 0.\r
+; For debugging purposes, INTVEC may be placed at other\r
+; addresses.\r
+; A debugger that honors the entry point will start the\r
+; program in a normal way even if INTVEC is not at address 0.\r
+;-------------------------------------------------------------\r
+\r
+               PROGRAM ?RESET\r
+               RSEG    INTRAMSTART_REMAP\r
+               RSEG    INTRAMEND_REMAP\r
+\r
+               EXTERN  vPortYieldProcessor\r
+\r
+               RSEG    ICODE:CODE:ROOT(2)\r
+               CODE32  ; Always ARM mode after reset   \r
+               org     0       \r
+reset          \r
+;------------------------------------------------------------------------------\r
+;- Exception vectors\r
+;--------------------\r
+;- These vectors can be read at address 0 or at RAM address\r
+;- They ABSOLUTELY requires to be in relative addresssing mode in order to\r
+;- guarantee a valid jump. For the moment, all are just looping.\r
+;- If an exception occurs before remap, this would result in an infinite loop.\r
+;- To ensure if a exeption occurs before start application to infinite loop.\r
+;------------------------------------------------------------------------------\r
+\r
+                B           InitReset           ; 0x00 Reset handler\r
+undefvec:\r
+                B           undefvec            ; 0x04 Undefined Instruction\r
+swivec:\r
+                B           vPortYieldProcessor ; 0x08 Software Interrupt\r
+pabtvec:\r
+                B           pabtvec             ; 0x0C Prefetch Abort\r
+dabtvec:\r
+                B           dabtvec             ; 0x10 Data Abort\r
+rsvdvec:\r
+                B           rsvdvec             ; 0x14 reserved\r
+irqvec:\r
+                               LDR                     PC, [PC, #-0xF20]       ; Jump directly to the address given by the AIC\r
+\r
+fiqvec:                                                                ; 0x1c FIQ\r
+\r
+;------------------------------------------------------------------------------\r
+;- Function             : FIQ_Handler_Entry\r
+;- Treatments           : FIQ Controller Interrupt Handler.\r
+;- Called Functions     : AIC_FVR[interrupt]\r
+;------------------------------------------------------------------------------\r
+\r
+FIQ_Handler_Entry:\r
+\r
+;- Switch in SVC/User Mode to allow User Stack access for C code\r
+; because the FIQ is not yet acknowledged\r
+\r
+;- Save and r0 in FIQ_Register\r
+            mov         r9,r0\r
+                   ldr         r0 , [r8, #AIC_FVR]\r
+            msr         CPSR_c,#I_BIT | F_BIT | ARM_MODE_SVC\r
+\r
+;- Save scratch/used registers and LR in User Stack\r
+            stmfd       sp!, { r1-r3, r12, lr}\r
+\r
+;- Branch to the routine pointed by the AIC_FVR\r
+            mov         r14, pc\r
+            bx          r0\r
+\r
+;- Restore scratch/used registers and LR from User Stack\r
+            ldmia       sp!, { r1-r3, r12, lr}\r
+\r
+;- Leave Interrupts disabled \ 4and switch back in FIQ mode\r
+            msr         CPSR_c, #I_BIT | F_BIT | ARM_MODE_FIQ\r
+\r
+;- Restore the R0 ARM_MODE_SVC register\r
+            mov         r0,r9\r
+\r
+;- Restore the Program Counter using the LR_fiq directly in the PC\r
+            subs        pc,lr,#4\r
+\r
+InitReset:\r
+;------------------------------------------------------------------------------\r
+;- Low level Init (PMC, AIC, ? ....) by C function AT91F_LowLevelInit\r
+;------------------------------------------------------------------------------\r
+               EXTERN   AT91F_LowLevelInit\r
+\r
+#define  __iramend     SFB(INTRAMEND_REMAP)\r
+\r
+;- minumum C initialization\r
+;- call  AT91F_LowLevelInit( void)\r
+\r
+            ldr     r13,=__iramend            ; temporary stack in internal RAM\r
+;--Call Low level init function in ABSOLUTE through the Interworking\r
+                   ldr     r0,=AT91F_LowLevelInit\r
+                   mov     lr, pc\r
+                   bx      r0\r
+;------------------------------------------------------------------------------\r
+;- Stack Sizes Definition\r
+;------------------------\r
+;- Interrupt Stack requires 2 words x 8 priority level x 4 bytes when using\r
+;- the vectoring. This assume that the IRQ management.\r
+;- The Interrupt Stack must be adjusted depending on the interrupt handlers.\r
+;- Fast Interrupt not requires stack If in your application it required you must\r
+;- be definehere.\r
+;- The System stack size is not defined and is limited by the free internal\r
+;- SRAM.\r
+;------------------------------------------------------------------------------\r
+\r
+;------------------------------------------------------------------------------\r
+;- Top of Stack Definition\r
+;-------------------------\r
+;- Interrupt and Supervisor Stack are located at the top of internal memory in\r
+;- order to speed the exception handling context saving and restoring.\r
+;- ARM_MODE_SVC (Application, C) Stack is located at the top of the external memory.\r
+;------------------------------------------------------------------------------\r
+\r
+IRQ_STACK_SIZE          EQU     300\r
+\r
+ARM_MODE_FIQ            EQU     0x11\r
+ARM_MODE_IRQ            EQU     0x12\r
+ARM_MODE_SVC            EQU     0x13\r
+\r
+I_BIT                   EQU     0x80\r
+F_BIT                   EQU     0x40\r
+\r
+;------------------------------------------------------------------------------\r
+;- Setup the stack for each mode\r
+;-------------------------------\r
+                ldr     r0, =__iramend\r
+\r
+;- Set up Fast Interrupt Mode and set FIQ Mode Stack\r
+                msr     CPSR_c, #ARM_MODE_FIQ | I_BIT | F_BIT\r
+;- Init the FIQ register\r
+               ldr     r8, =AT91C_BASE_AIC\r
+\r
+;- Set up Interrupt Mode and set IRQ Mode Stack\r
+                msr     CPSR_c, #ARM_MODE_IRQ | I_BIT | F_BIT\r
+                mov     r13, r0                     ; Init stack IRQ\r
+                sub     r0, r0, #IRQ_STACK_SIZE\r
+\r
+;- Enable interrupt & Set up Supervisor Mode and set Supervisor Mode Stack\r
+                msr     CPSR_c, #ARM_MODE_SVC\r
+                mov     r13, r0\r
+\r
+\r
+;---------------------------------------------------------------\r
+; ?CSTARTUP\r
+;---------------------------------------------------------------\r
+               EXTERN  __segment_init\r
+               EXTERN  main\r
+; Initialize segments.\r
+; __segment_init is assumed to use\r
+; instruction set and to be reachable by BL from the ICODE segment\r
+; (it is safest to link them in segment ICODE).\r
+               ldr     r0,=__segment_init\r
+                mov     lr, pc\r
+               bx      r0\r
+\r
+               PUBLIC  __main\r
+?jump_to_main:\r
+               ldr     lr,=?call_exit\r
+               ldr     r0,=main\r
+__main:\r
+               bx      r0\r
+\r
+;------------------------------------------------------------------------------\r
+;- Loop for ever\r
+;---------------\r
+;- End of application. Normally, never occur.\r
+;- Could jump on Software Reset ( B 0x0 ).\r
+;------------------------------------------------------------------------------\r
+?call_exit:\r
+End\r
+            b       End\r
+\r
+\r
+\r
+;---------------------------------------------------------------\r
+; ?EXEPTION_VECTOR\r
+; This module is only linked if needed for closing files.\r
+;---------------------------------------------------------------\r
+               PUBLIC  AT91F_Default_FIQ_handler\r
+               PUBLIC  AT91F_Default_IRQ_handler\r
+               PUBLIC  AT91F_Spurious_handler\r
+\r
+               CODE32  ; Always ARM mode after exeption        \r
+\r
+AT91F_Default_FIQ_handler\r
+            b     AT91F_Default_FIQ_handler\r
+\r
+AT91F_Default_IRQ_handler\r
+            b     AT91F_Default_IRQ_handler\r
+\r
+AT91F_Spurious_handler\r
+            b     AT91F_Spurious_handler\r
+\r
+       ENDMOD\r
+\r
+       END\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Cstartup_SAM7.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Cstartup_SAM7.c
new file mode 100644 (file)
index 0000000..d9716c0
--- /dev/null
@@ -0,0 +1,69 @@
+//*----------------------------------------------------------------------------\r
+//*         ATMEL Microcontroller Software Support  -  ROUSSET  -\r
+//*----------------------------------------------------------------------------\r
+//* The software is delivered "AS IS" without warranty or condition of any\r
+//* kind, either express, implied or statutory. This includes without\r
+//* limitation any warranty or condition with respect to merchantability or\r
+//* fitness for any particular purpose, or against the infringements of\r
+//* intellectual property rights of others.\r
+//*----------------------------------------------------------------------------\r
+//* File Name           : Cstartup_SAM7.c\r
+//* Object              : Low level initializations written in C for IAR\r
+//*                       tools\r
+//* 1.0   08/Sep/04 JPP        : Creation\r
+//* 1.10  10/Sep/04 JPP : Update AT91C_CKGR_PLLCOUNT filed\r
+//*----------------------------------------------------------------------------\r
+\r
+\r
+// Include the board file description\r
+#include "Board.h"\r
+\r
+//*----------------------------------------------------------------------------\r
+//* \fn    AT91F_LowLevelInit\r
+//* \brief This function performs very low level HW initialization\r
+//*        this function can be use a Stack, depending the compilation\r
+//*        optimization mode\r
+//*----------------------------------------------------------------------------\r
+void AT91F_LowLevelInit( void);\r
+void AT91F_LowLevelInit( void )\r
+{\r
+ AT91PS_PMC     pPMC = AT91C_BASE_PMC;\r
+\r
+    //* Set Flash Waite sate\r
+       //  Single Cycle Access at Up to 30 MHz, or 40\r
+       //  if MCK = 47923200 I have 50 Cycle for 1 useconde ( flied MC_FMR->FMCN\r
+           AT91C_BASE_MC->MC_FMR = ((AT91C_MC_FMCN)&(75 <<16)) | AT91C_MC_FWS_1FWS ;\r
+\r
+    //* Watchdog Disable\r
+        AT91C_BASE_WDTC->WDTC_WDMR= AT91C_WDTC_WDDIS;\r
+\r
+       //* Set MCK at 47 923 200\r
+    // 1 Enabling the Main Oscillator:\r
+        // SCK = 1/32768 = 30.51 uSeconde\r
+       // Start up time = 8 * 6 / SCK = 56 * 30.51 = 1,46484375 ms\r
+       pPMC->PMC_MOR = ((( AT91C_CKGR_OSCOUNT & (0x06 <<8)) | AT91C_CKGR_MOSCEN ));\r
+        // Wait the startup time\r
+        while(!(pPMC->PMC_SR & AT91C_PMC_MOSCS));\r
+       // 2 Checking the Main Oscillator Frequency (Optional)\r
+       // 3 Setting PLL and divider:\r
+               // - div by 5 Fin = 3,6864 =(18,432 / 5)\r
+               // - Mul 25+1: Fout =   95,8464 =(3,6864 *26)\r
+               // for 96 MHz the erroe is 0.16%\r
+               //eld out NOT USED = 0 Fi\r
+       pPMC->PMC_PLLR = ((AT91C_CKGR_DIV & 5) |\r
+                         (AT91C_CKGR_PLLCOUNT & (28<<8)) |\r
+                         (AT91C_CKGR_MUL & (25<<16)));\r
+\r
+        // Wait the startup time\r
+        while(!(pPMC->PMC_SR & AT91C_PMC_LOCK));\r
+       // 4. Selection of Master Clock and Processor Clock\r
+        // select the PLL clock divided by 2\r
+       pPMC->PMC_MCKR = AT91C_PMC_PRES_CLK_2 ;\r
+        while(!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));\r
+\r
+        pPMC->PMC_MCKR |= AT91C_PMC_CSS_PLL_CLK ;\r
+        while(!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));\r
+}\r
+\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Emac.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/Emac.h
new file mode 100644 (file)
index 0000000..7551a36
--- /dev/null
@@ -0,0 +1,195 @@
+//*----------------------------------------------------------------------------\r
+//*         ATMEL Microcontroller Software Support  -  ROUSSET  -\r
+//*----------------------------------------------------------------------------\r
+//* The software is delivered "AS IS" without warranty or condition of any\r
+//* kind, either express, implied or statutory. This includes without\r
+//* limitation any warranty or condition with respect to merchantability or\r
+//* fitness for any particular purpose, or against the infringements of\r
+//* intellectual property rights of others.\r
+//*----------------------------------------------------------------------------\r
+//* File Name           : Emac.h\r
+//* Object              : Emac header file\r
+//* Creation            : Hi   11/18/2002\r
+//*\r
+//*----------------------------------------------------------------------------\r
+#ifndef AT91C_EMAC_H\r
+#define AT91C_EMAC_H\r
+\r
+\r
+//* Allows to display all IP header in the main.c\r
+//* If not defined, only ICMP packets are displayed\r
+#define AT91C_DISPLAY_ALL_IPHEADER             0\r
+\r
+#define NB_RX_BUFFERS                  25                      //* Number of receive buffers\r
+#define ETH_RX_BUFFER_SIZE             128         //*\r
+\r
+#define NB_TX_BUFFERS                  2               //* Number of Transmit buffers\r
+#define ETH_TX_BUFFER_SIZE             UIP_BUFSIZE       //*\r
+\r
+#define AT91C_NO_IPPACKET              0\r
+#define AT91C_IPPACKET         1\r
+\r
+#define ARP_REQUEST                            0x0001\r
+#define ARP_REPLY                              0x0002\r
+#define PROT_ARP                               0x0806\r
+#define PROT_IP                                        0x0800\r
+#define PROT_ICMP                              0x01\r
+#define ICMP_ECHO_REQUEST              0x08\r
+#define ICMP_ECHO_REPLY                        0x00\r
+\r
+#define AT91C_EMAC_CLKEN 0x2\r
+#define SWAP16(x)      (((x & 0xff) << 8) | (x >> 8))\r
+\r
+#if 0\r
+//* Transfer descriptor structure\r
+typedef struct _AT91S_TdDescriptor {\r
+       unsigned int addr;\r
+       unsigned int status;\r
+}AT91S_TdDescriptor, *AT91PS_TdDescriptor;\r
+#endif\r
+\r
+//* Receive Transfer descriptor structure\r
+typedef struct  _AT91S_RxTdDescriptor {\r
+       unsigned int addr;\r
+       union\r
+       {\r
+               unsigned int status;\r
+               struct {\r
+                       unsigned int Length:11;\r
+                       unsigned int Res0:1;\r
+                       unsigned int Rxbuf_off:2;\r
+                       unsigned int StartOfFrame:1;\r
+                       unsigned int EndOfFrame:1;\r
+                       unsigned int Cfi:1;\r
+                       unsigned int VlanPriority:3;\r
+                       unsigned int PriorityTag:1;\r
+                       unsigned int VlanTag:1;\r
+                       unsigned int TypeID:1;\r
+                       unsigned int Sa4Match:1;\r
+                       unsigned int Sa3Match:1;\r
+                       unsigned int Sa2Match:1;\r
+                       unsigned int Sa1Match:1;\r
+                       unsigned int Res1:1;\r
+                       unsigned int ExternalAdd:1;\r
+                       unsigned int UniCast:1;\r
+                       unsigned int MultiCast:1;\r
+                       unsigned int BroadCast:1;\r
+               }S_Status;              \r
+       }U_Status;\r
+}AT91S_RxTdDescriptor, *AT91PS_RxTdDescriptor;\r
+\r
+\r
+//* Transmit Transfer descriptor structure\r
+typedef struct _AT91S_TxTdDescriptor {\r
+       unsigned int addr;\r
+       union\r
+       {\r
+               unsigned int status;\r
+               struct {\r
+                       unsigned int Length:11;\r
+                       unsigned int Res0:4;\r
+                       unsigned int LastBuff:1;\r
+                       unsigned int NoCrc:1;\r
+                       unsigned int Res1:10;\r
+                       unsigned int BufExhausted:1;\r
+                       unsigned int TransmitUnderrun:1;\r
+                       unsigned int TransmitError:1;\r
+                       unsigned int Wrap:1;\r
+                       unsigned int BuffUsed:1;\r
+               }S_Status;              \r
+       }U_Status;\r
+}AT91S_TxTdDescriptor, *AT91PS_TxTdDescriptor;\r
+\r
+#define AT91C_OWNERSHIP_BIT            0x00000001\r
+\r
+/* Receive status defintion */\r
+#define AT91C_BROADCAST_ADDR   ((unsigned int) (1 << 31))      //* Broadcat address detected\r
+#define AT91C_MULTICAST_HASH   ((unsigned int) (1 << 30))      //* MultiCast hash match\r
+#define AT91C_UNICAST_HASH         ((unsigned int) (1 << 29))  //* UniCast hash match\r
+#define AT91C_EXTERNAL_ADDR        ((unsigned int) (1 << 28))  //* External Address match\r
+#define AT91C_SA1_ADDR         ((unsigned int) (1 << 26))      //* Specific address 1 match\r
+#define AT91C_SA2_ADDR         ((unsigned int) (1 << 25))      //* Specific address 2 match\r
+#define AT91C_SA3_ADDR         ((unsigned int) (1 << 24))      //* Specific address 3 match\r
+#define AT91C_SA4_ADDR         ((unsigned int) (1 << 23))      //* Specific address 4 match\r
+#define AT91C_TYPE_ID          ((unsigned int) (1 << 22))      //* Type ID match\r
+#define AT91C_VLAN_TAG         ((unsigned int) (1 << 21))      //* VLAN tag detected\r
+#define AT91C_PRIORITY_TAG     ((unsigned int) (1 << 20))      //* PRIORITY tag detected\r
+#define AT91C_VLAN_PRIORITY            ((unsigned int) (7 << 17))  //* PRIORITY Mask\r
+#define AT91C_CFI_IND          ((unsigned int) (1 << 16))  //* CFI indicator\r
+#define AT91C_EOF              ((unsigned int) (1 << 15))  //* EOF\r
+#define AT91C_SOF              ((unsigned int) (1 << 14))  //* SOF\r
+#define AT91C_RBF_OFFSET       ((unsigned int) (3 << 12))  //* Receive Buffer Offset Mask\r
+#define AT91C_LENGTH_FRAME             ((unsigned int) 0x07FF)     //* Length of frame\r
+\r
+/* Transmit Status definition */\r
+#define AT91C_TRANSMIT_OK              ((unsigned int) (1 << 31))      //*\r
+#define AT91C_TRANSMIT_WRAP            ((unsigned int) (1 << 30))      //* Wrap bit: mark the last descriptor\r
+#define AT91C_TRANSMIT_ERR             ((unsigned int) (1 << 29))      //* RLE:transmit error\r
+#define AT91C_TRANSMIT_UND             ((unsigned int) (1 << 28))      //* Transmit Underrun\r
+#define AT91C_BUF_EX                   ((unsigned int) (1 << 27))      //* Buffers exhausted in mid frame\r
+#define AT91C_TRANSMIT_NO_CRC  ((unsigned int) (1 << 16))      //* No CRC will be appended to the current frame\r
+#define AT91C_LAST_BUFFER      ((unsigned int) (1 << 15))      //*\r
+\r
+#define ARP_ETHER                      1               /* Ethernet  hardware address   */\r
+#define ARPOP_REQUEST          1               /* Request  to resolve  address */\r
+#define ARPOP_REPLY            2               /* Response to previous request */\r
+#define RARPOP_REQUEST         3               /* Request  to resolve  address */\r
+#define RARPOP_REPLY       4           /* Response to previous request */\r
+\r
+\r
+typedef struct _AT91S_EthHdr\r
+{\r
+       unsigned char           et_dest[6];     /* Destination node             */\r
+       unsigned char           et_src[6];      /* Source node                  */\r
+       unsigned short          et_protlen;     /* Protocol or length           */\r
+} AT91S_EthHdr, *AT91PS_EthHdr;\r
+\r
+typedef struct _AT91S_ArpHdr\r
+{\r
+       unsigned short          ar_hrd;         /* Format of hardware address   */\r
+       unsigned short          ar_pro;         /* Format of protocol address   */\r
+       unsigned char           ar_hln;         /* Length of hardware address   */\r
+       unsigned char           ar_pln;         /* Length of protocol address   */\r
+       unsigned short          ar_op;          /* Operation                    */\r
+       unsigned char           ar_sha[6];      /* Sender hardware address      */\r
+       unsigned char           ar_spa[4];      /* Sender protocol address      */\r
+       unsigned char           ar_tha[6];      /* Target hardware address      */\r
+       unsigned char           ar_tpa[4];      /* Target protocol address      */\r
+} AT91S_ArpHdr, *AT91PS_ArpHdr;\r
+\r
+//* IP Header structure\r
+typedef struct _AT91S_IPheader {\r
+       unsigned char   ip_hl_v;        /* header length and version    */\r
+       unsigned char   ip_tos;         /* type of service              */\r
+       unsigned short  ip_len;         /* total length                 */\r
+       unsigned short  ip_id;          /* identification               */\r
+       unsigned short  ip_off;         /* fragment offset field        */\r
+       unsigned char   ip_ttl;         /* time to live                 */\r
+       unsigned char   ip_p;           /* protocol                     */\r
+       unsigned short  ip_sum;         /* checksum                     */\r
+       unsigned char   ip_src[4];      /* Source IP address            */\r
+       unsigned char   ip_dst[4];      /* Destination IP address       */\r
+       unsigned short  udp_src;        /* UDP source port              */\r
+       unsigned short  udp_dst;        /* UDP destination port         */\r
+       unsigned short  udp_len;        /* Length of UDP packet         */\r
+       unsigned short  udp_xsum;       /* Checksum                     */\r
+} AT91S_IPheader, *AT91PS_IPheader;\r
+\r
+//* ICMP echo header structure\r
+typedef struct _AT91S_IcmpEchoHdr {\r
+    unsigned char   type;       /* type of message */\r
+    unsigned char   code;       /* type subcode */\r
+    unsigned short  cksum;      /* ones complement cksum of struct */\r
+    unsigned short  id;         /* identifier */\r
+    unsigned short  seq;        /* sequence number */\r
+}AT91S_IcmpEchoHdr, *AT91PS_IcmpEchoHdr;\r
+\r
+\r
+typedef struct _AT91S_EthPack\r
+{\r
+       AT91S_EthHdr    EthHdr;\r
+       AT91S_ArpHdr    ArpHdr;\r
+} AT91S_EthPack, *AT91PS_EthPack;\r
+\r
+\r
+#endif //* AT91C_EMAC_H\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/mii.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/SrcAtmel/mii.h
new file mode 100644 (file)
index 0000000..29b2f53
--- /dev/null
@@ -0,0 +1,105 @@
+/* Generic MII registers. */\r
+\r
+#define MII_BMCR            0x00        /* Basic mode control register */\r
+#define MII_BMSR            0x01        /* Basic mode status register  */\r
+#define MII_PHYSID1         0x02        /* PHYS ID 1                   */\r
+#define MII_PHYSID2         0x03        /* PHYS ID 2                   */\r
+#define MII_ADVERTISE       0x04        /* Advertisement control reg   */\r
+#define MII_LPA             0x05        /* Link partner ability reg    */\r
+#define MII_EXPANSION       0x06        /* Expansion register          */\r
+#define MII_DCOUNTER        0x12        /* Disconnect counter          */\r
+#define MII_FCSCOUNTER      0x13        /* False carrier counter       */\r
+#define MII_NWAYTEST        0x14        /* N-way auto-neg test reg     */\r
+#define MII_RERRCOUNTER     0x15        /* Receive error counter       */\r
+#define MII_SREVISION       0x16        /* Silicon revision            */\r
+#define MII_RESV1           0x17        /* Reserved...                 */\r
+#define MII_LBRERROR        0x18        /* Lpback, rx, bypass error    */\r
+#define MII_PHYADDR         0x19        /* PHY address                 */\r
+#define MII_RESV2           0x1a        /* Reserved...                 */\r
+#define MII_TPISTATUS       0x1b        /* TPI status for 10mbps       */\r
+#define MII_NCONFIG         0x1c        /* Network interface config    */\r
+\r
+/* Basic mode control register. */\r
+#define BMCR_RESV               0x007f  /* Unused...                   */\r
+#define BMCR_CTST               0x0080  /* Collision test              */\r
+#define BMCR_FULLDPLX           0x0100  /* Full duplex                 */\r
+#define BMCR_ANRESTART          0x0200  /* Auto negotiation restart    */\r
+#define BMCR_ISOLATE            0x0400  /* Disconnect DP83840 from MII */\r
+#define BMCR_PDOWN              0x0800  /* Powerdown the DP83840       */\r
+#define BMCR_ANENABLE           0x1000  /* Enable auto negotiation     */\r
+#define BMCR_SPEED100           0x2000  /* Select 100Mbps              */\r
+#define BMCR_LOOPBACK           0x4000  /* TXD loopback bits           */\r
+#define BMCR_RESET              0x8000  /* Reset the DP83840           */\r
+\r
+/* Basic mode status register. */\r
+#define BMSR_ERCAP              0x0001  /* Ext-reg capability          */\r
+#define BMSR_JCD                0x0002  /* Jabber detected             */\r
+#define BMSR_LSTATUS            0x0004  /* Link status                 */\r
+#define BMSR_ANEGCAPABLE        0x0008  /* Able to do auto-negotiation */\r
+#define BMSR_RFAULT             0x0010  /* Remote fault detected       */\r
+#define BMSR_ANEGCOMPLETE       0x0020  /* Auto-negotiation complete   */\r
+#define BMSR_RESV               0x07c0  /* Unused...                   */\r
+#define BMSR_10HALF             0x0800  /* Can do 10mbps, half-duplex  */\r
+#define BMSR_10FULL             0x1000  /* Can do 10mbps, full-duplex  */\r
+#define BMSR_100HALF            0x2000  /* Can do 100mbps, half-duplex */\r
+#define BMSR_100FULL            0x4000  /* Can do 100mbps, full-duplex */\r
+#define BMSR_100BASE4           0x8000  /* Can do 100mbps, 4k packets  */\r
+\r
+/* Advertisement control register. */\r
+#define ADVERTISE_SLCT          0x001f  /* Selector bits               */\r
+#define ADVERTISE_CSMA          0x0001  /* Only selector supported     */\r
+#define ADVERTISE_10HALF        0x0020  /* Try for 10mbps half-duplex  */\r
+#define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */\r
+#define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */\r
+#define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */\r
+#define ADVERTISE_100BASE4      0x0200  /* Try for 100mbps 4k packets  */\r
+#define ADVERTISE_RESV          0x1c00  /* Unused...                   */\r
+#define ADVERTISE_RFAULT        0x2000  /* Say we can detect faults    */\r
+#define ADVERTISE_LPACK         0x4000  /* Ack link partners response  */\r
+#define ADVERTISE_NPAGE         0x8000  /* Next page bit               */\r
+\r
+#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \\r
+                       ADVERTISE_CSMA)\r
+#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \\r
+                       ADVERTISE_100HALF | ADVERTISE_100FULL)\r
+\r
+/* Link partner ability register. */\r
+#define LPA_SLCT                0x001f  /* Same as advertise selector  */\r
+#define LPA_10HALF              0x0020  /* Can do 10mbps half-duplex   */\r
+#define LPA_10FULL              0x0040  /* Can do 10mbps full-duplex   */\r
+#define LPA_100HALF             0x0080  /* Can do 100mbps half-duplex  */\r
+#define LPA_100FULL             0x0100  /* Can do 100mbps full-duplex  */\r
+#define LPA_100BASE4            0x0200  /* Can do 100mbps 4k packets   */\r
+#define LPA_RESV                0x1c00  /* Unused...                   */\r
+#define LPA_RFAULT              0x2000  /* Link partner faulted        */\r
+#define LPA_LPACK               0x4000  /* Link partner acked us       */\r
+#define LPA_NPAGE               0x8000  /* Next page bit               */\r
+\r
+#define LPA_DUPLEX             (LPA_10FULL | LPA_100FULL)\r
+#define LPA_100                        (LPA_100FULL | LPA_100HALF | LPA_100BASE4)\r
+\r
+/* Expansion register for auto-negotiation. */\r
+#define EXPANSION_NWAY          0x0001  /* Can do N-way auto-nego      */\r
+#define EXPANSION_LCWP          0x0002  /* Got new RX page code word   */\r
+#define EXPANSION_ENABLENPAGE   0x0004  /* This enables npage words    */\r
+#define EXPANSION_NPCAPABLE     0x0008  /* Link partner supports npage */\r
+#define EXPANSION_MFAULTS       0x0010  /* Multiple faults detected    */\r
+#define EXPANSION_RESV          0xffe0  /* Unused...                   */\r
+\r
+/* N-way test register. */\r
+#define NWAYTEST_RESV1          0x00ff  /* Unused...                   */\r
+#define NWAYTEST_LOOPBACK       0x0100  /* Enable loopback for N-way   */\r
+#define NWAYTEST_RESV2          0xfe00  /* Unused...                   */\r
+\r
+#define SPEED_10                               10\r
+#define SPEED_100                              100\r
+\r
+/* Duplex, half or full. */\r
+#define DUPLEX_HALF                            0x00\r
+#define DUPLEX_FULL                            0x01\r
+\r
+/* PHY ID */\r
+#define MII_DM9161_ID     0x0181b8a0\r
+#define MII_AM79C875_ID   0x00225540   /* 0x00225541 */\r
+\r
+#define AT91C_PHY_ADDR 31\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.c
new file mode 100644 (file)
index 0000000..21a80cc
--- /dev/null
@@ -0,0 +1,1164 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+/*\r
+       Sample interrupt driven mouse device driver.  This is a minimal implementation \r
+       for demonstration only.  Although functional, it may not be a fully and \r
+       compliant implementation.  The small joystick on the SAM7X EK can be used to\r
+       move the mouse cursor, pressing the joystick transmits mouse clicks.  Note\r
+       that it might be necessary to run the demo stand along (without the \r
+       debugger) in order for the USB device to be recognised by the host computer.\r
+\r
+       The interrupt handler itself is contained within USB_ISR.c.\r
+       \r
+       See the FreeRTOS.org online documentation for more information.\r
+*/\r
+\r
+/* Standard includes. */\r
+#include <string.h>\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "queue.h"\r
+\r
+/* Demo application includes. */\r
+#include "USBSample.h"\r
+\r
+/* Joystick inputs used to move the 'mouse' cursor. */\r
+#define usbSW1         ( 1 << 21 )     /* PA21 */\r
+#define usbSW2         ( 1 << 22 )     /* PA22 */\r
+#define usbSW3         ( 1 << 23 )     /* PA23 */\r
+#define usbSW4         ( 1 << 24 )     /* PA24 */\r
+#define usbSW_CLICK    ( 1 << 25 ) /* PA25 */\r
+\r
+/* Descriptor type definitions. */\r
+#define usbDESCRIPTOR_TYPE_DEVICE                      ( 0x01 )\r
+#define usbDESCRIPTOR_TYPE_CONFIGURATION       ( 0x02 )\r
+#define usbDESCRIPTOR_TYPE_STRING                      ( 0x03 )\r
+\r
+/* USB request type definitions. */\r
+#define usbGET_REPORT_REQUEST                          ( 0x01 )\r
+#define usbGET_IDLE_REQUEST                                    ( 0x02 )\r
+#define usbGET_PROTOCOL_REQUEST                                ( 0x03 )\r
+#define usbSET_REPORT_REQUEST                          ( 0x09 )\r
+#define usbSET_IDLE_REQUEST                                    ( 0x0A )\r
+#define usbSET_PROTOCOL_REQUEST                                ( 0x0B )\r
+#define usbGET_CONFIGURATION_REQUEST           ( 0x08 )\r
+#define usbGET_STATUS_REQUEST                          ( 0x00 )\r
+#define usbCLEAR_FEATURE_REQUEST                       ( 0x01 )\r
+#define usbSET_FEATURE_REQUEST                         ( 0x03 )\r
+#define usbSET_ADDRESS_REQUEST                         ( 0x05 )\r
+#define usbGET_DESCRIPTOR_REQUEST                      ( 0x06 )\r
+#define usbSET_CONFIGURATION_REQUEST           ( 0x09 )\r
+#define usbGET_INTERFACE_REQUEST                       ( 0x0A )\r
+#define usbSET_INTERFACE_REQUEST                       ( 0x0B )\r
+\r
+\r
+/* Misc USB definitions. */\r
+#define usbDEVICE_CLASS_VENDOR_SPECIFIC                ( 0xFF )\r
+#define usbBUS_POWERED                                         ( 0x80 )\r
+#define usbHID_REPORT_DESCRIPTOR                       ( 0x22 )\r
+#define AT91C_UDP_TRANSCEIVER_ENABLE                   ( *( ( unsigned long * ) 0xfffb0074 ) )\r
+\r
+/* Index to the various string. */\r
+#define usbLANGUAGE_STRING                                     ( 0 )\r
+#define usbMANUFACTURER_STRING                         ( 1 )\r
+#define usbPRODUCT_STRING                                      ( 2 )\r
+#define usbCONFIGURATION_STRING                                ( 3 )\r
+#define usbINTERFACE_STRING                                    ( 4 )\r
+\r
+/* Data indexes for reading the request from the xISRStatus.ucFifoData[]\r
+into xUSB_REQUEST.  The data order is designed for speed - so looks a \r
+little odd. */\r
+#define usbREQUEST_TYPE_INDEX                          ( 7 )\r
+#define usbREQUEST_INDEX                                       ( 6 )\r
+#define usbVALUE_HIGH_BYTE                                     ( 4 )\r
+#define usbVALUE_LOW_BYTE                                      ( 5 )\r
+#define usbINDEX_HIGH_BYTE                                     ( 2 )\r
+#define usbINDEX_LOW_BYTE                                      ( 3 )\r
+#define usbLENGTH_HIGH_BYTE                                    ( 0 )\r
+#define usbLENGTH_LOW_BYTE                                     ( 1 )\r
+\r
+/* Misc application definitions. */\r
+#define usbINTERRUPT_PRIORITY                          ( 3 )\r
+#define usbFIFO_LENGTH                                         ( ( unsigned portLONG ) 8 )\r
+#define usbXUP                                                         ( 1 )\r
+#define usbXDOWN                                                       ( 2 )\r
+#define usbYUP                                                         ( 3 )\r
+#define usbYDOWN                                                       ( 4 )\r
+#define usbMAX_COORD                                           ( 120 )\r
+#define usbMAX_TX_MESSAGE_SIZE                         ( 128 )\r
+#define usbSHORTEST_DELAY                                      ( ( portTickType ) 1 )\r
+#define usbINIT_DELAY                                          ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
+#define usbSHORT_DELAY                                         ( ( portTickType ) 50 / portTICK_RATE_MS )\r
+#define usbEND_POINT_RESET_MASK                                ( ( unsigned portLONG ) 0x0f )\r
+#define usbDATA_INC                                                    ( ( portCHAR ) 5 )\r
+#define usbEXPECTED_NUMBER_OF_BYTES                    ( ( unsigned portLONG ) 8 )\r
+\r
+/* Control request types. */\r
+#define usbSTANDARD_DEVICE_REQUEST                     ( 0 )\r
+#define usbSTANDARD_INTERFACE_REQUEST          ( 1 )\r
+#define usbSTANDARD_END_POINT_REQUEST          ( 2 )\r
+#define usbCLASS_INTERFACE_REQUEST                     ( 5 )\r
+\r
+/* Structure used to hold the received requests. */\r
+typedef struct \r
+{\r
+       unsigned portCHAR ucReqType;\r
+       unsigned portCHAR ucRequest;\r
+       unsigned portSHORT usValue;\r
+       unsigned portSHORT usIndex;\r
+       unsigned portSHORT usLength;\r
+} xUSB_REQUEST;\r
+\r
+typedef enum\r
+{\r
+       eNOTHING,\r
+       eJUST_RESET,\r
+       eJUST_GOT_CONFIG,\r
+       eJUST_GOT_ADDRESS,\r
+       eSENDING_EVEN_DESCRIPTOR,\r
+       eREADY_TO_SEND\r
+} eDRIVER_STATE;\r
+\r
+/* Structure used to control the data being sent to the host. */\r
+typedef struct\r
+{\r
+       unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];\r
+       unsigned portLONG ulNextCharIndex;\r
+       unsigned portLONG ulTotalDataLength;\r
+} xTX_MESSAGE;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* \r
+ * The USB interrupt service routine.  This takes a snapshot of the USB\r
+ * device at the time of the interrupt, clears the interrupts, and posts\r
+ * the data to the USB processing task.  This is implemented in USB_ISR.c.\r
+ */\r
+extern void vUSB_ISR_Wrapper( void );\r
+\r
+/*\r
+ * Called after the bus reset interrupt - this function readies all the\r
+ * end points for communication.\r
+ */\r
+static void prvResetEndPoints( void );\r
+\r
+/*\r
+ * Setup the USB hardware, install the interrupt service routine and \r
+ * initialise all the state variables.\r
+ */\r
+static void vInitUSBInterface( void );\r
+\r
+/*\r
+ * Decode and act upon an interrupt generated by the control end point.\r
+ */\r
+static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage );\r
+\r
+/* \r
+ * For simplicity requests are separated into device, interface, class \r
+ * interface and end point requests.\r
+ *\r
+ * Decode and handle standard device requests originating on the control\r
+ * end point. \r
+ */\r
+static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );\r
+\r
+/*\r
+ * For simplicity requests are separated into device, interface, class \r
+ * interface and end point requests.\r
+ *\r
+ * Decode and handle standard interface requests originating on the control\r
+ * end point.\r
+ */\r
+static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );\r
+\r
+/*\r
+ * For simplicity requests are separated into device, interface, class \r
+ * interface and end point requests.\r
+ *\r
+ * Decode and handle standard end point requests originating on the control\r
+ * end point.\r
+ */\r
+static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest );\r
+\r
+/*\r
+ * For simplicity requests are separated into device, interface, class \r
+ * interface and end point requests.\r
+ *\r
+ * Decode and handle the class interface requests.\r
+ */\r
+static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest );\r
+\r
+/*\r
+ * Setup the Tx buffer to send data in response to a control request.\r
+ *\r
+ * The data to be transmitted is buffered, the state variables are updated,\r
+ * then prvSendNextSegment() is called to start the transmission off.  Once\r
+ * the first segment has been sent the remaining segments are transmitted\r
+ * in response to TXCOMP interrupts until the entire buffer has been\r
+ * sent.\r
+ */\r
+static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor );\r
+\r
+/*\r
+ * Examine the Tx buffer to see if there is any more data to be transmitted.\r
+ * \r
+ * If there is data to be transmitted then send the next segment.  A segment\r
+ * can have a maximum of 8 bytes (this is defined as the maximum for the end\r
+ * point by the descriptor).  The final segment may be less than 8 bytes if\r
+ * the total data length was not an exact multiple of 8.\r
+ */\r
+static void prvSendNextSegment( void );\r
+\r
+/*\r
+ * A stall condition is forced each time the host makes a request that is not\r
+ * supported by this minimal implementation.\r
+ * \r
+ * A stall is forced by setting the appropriate bit in the end points control\r
+ * and status register. \r
+ */\r
+static void prvSendStall( void );\r
+\r
+/*\r
+ * A NULL (or zero length packet) is transmitted in acknowledge the reception \r
+ * of certain events from the host.\r
+ */\r
+static void prvUSBTransmitNull( void );\r
+\r
+/* \r
+ * When the host requests a descriptor this function is called to determine \r
+ * which descriptor is being requested and start its transmission.\r
+ */\r
+static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest );\r
+\r
+/*\r
+ * Transmit movement and clicks on the EK joystick as mouse inputs.\r
+ */\r
+static void prvTransmitSampleValues( void );\r
+\r
+/*\r
+ * The created task to handle the USB demo functionality. \r
+ */\r
+static void vUSBDemoTask( void *pvParameters );\r
+\r
+/*\r
+ * Simple algorithm to ramp up the mouse cursor speed to make it easier to\r
+ * use.\r
+ */\r
+static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 );\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+       - DESCRIPTOR DEFINITIONS -\r
+*/\r
+\r
+/* String descriptors used during the enumeration process.\r
+These take the form:\r
+\r
+{\r
+       Length of descriptor,\r
+       Descriptor type,\r
+       Data\r
+}\r
+*/\r
+const portCHAR pxLanguageStringDescriptor[] =\r
+{\r
+       4,\r
+       usbDESCRIPTOR_TYPE_STRING,\r
+       0x09, 0x04\r
+};\r
+\r
+const portCHAR pxManufacturerStringDescriptor[] = \r
+{\r
+       18,\r
+       usbDESCRIPTOR_TYPE_STRING,\r
+\r
+       'F', 0x00,\r
+       'r', 0x00,\r
+       'e', 0x00,\r
+       'e', 0x00,\r
+       'R', 0x00,\r
+       'T', 0x00,\r
+       'O', 0x00,\r
+       'S', 0x00       \r
+};\r
+\r
+const portCHAR pxProductStringDescriptor[] = \r
+{\r
+       38,\r
+       usbDESCRIPTOR_TYPE_STRING,\r
+\r
+       'F', 0x00,\r
+       'r', 0x00,\r
+       'e', 0x00,\r
+       'e', 0x00,\r
+       'R', 0x00,\r
+       'T', 0x00,\r
+       'O', 0x00,\r
+       'S', 0x00,\r
+       '.', 0x00,\r
+       'o', 0x00,\r
+       'r', 0x00,\r
+       'g', 0x00,\r
+       ' ', 0x00,\r
+       'M', 0x00,\r
+       'o', 0x00,\r
+       'u', 0x00,\r
+       's', 0x00,\r
+       'e', 0x00\r
+};\r
+\r
+const portCHAR pxConfigurationStringDescriptor[] = \r
+{\r
+       38,\r
+       usbDESCRIPTOR_TYPE_STRING,\r
+\r
+       'C', 0x00,\r
+       'o', 0x00,\r
+       'n', 0x00,\r
+       'f', 0x00,\r
+       'i', 0x00,\r
+       'g', 0x00,\r
+       'u', 0x00,\r
+       'r', 0x00,\r
+       'a', 0x00,\r
+       't', 0x00,\r
+       'i', 0x00,\r
+       'o', 0x00,\r
+       'n', 0x00,\r
+       ' ', 0x00,\r
+       'N', 0x00,\r
+       'a', 0x00,\r
+       'm', 0x00,\r
+       'e', 0x00\r
+};\r
+\r
+const portCHAR pxInterfaceStringDescriptor[] = \r
+{\r
+       30,\r
+       usbDESCRIPTOR_TYPE_STRING,\r
+\r
+       'I', 0x00,\r
+       'n', 0x00,\r
+       't', 0x00,\r
+       'e', 0x00,\r
+       'r', 0x00,\r
+       'f', 0x00,\r
+       'a', 0x00,\r
+       'c', 0x00,\r
+       'e', 0x00,\r
+       ' ', 0x00,\r
+       'N', 0x00,\r
+       'a', 0x00,\r
+       'm', 0x00,\r
+       'e', 0x00\r
+};\r
+\r
+/* Enumeration descriptors. */\r
+const portCHAR pxReportDescriptor[] =\r
+{\r
+       0x05, 0x01,                                             /* USAGE_PAGE (Generic Desktop)                 */\r
+       0x09, 0x02,                                             /* USAGE (Mouse)                                                */\r
+       0xa1, 0x01,                                             /* COLLECTION (Application)                             */\r
+       0x09, 0x01,                                             /*   USAGE (Pointer)                                    */\r
+       0xa1, 0x00,                                             /*   COLLECTION (Physical)                              */\r
+       0x95, 0x03,                                             /*     REPORT_COUNT (3)                                 */\r
+       0x75, 0x01,                                             /*     REPORT_SIZE (1)                                  */\r
+       0x05, 0x09,                                             /*     USAGE_PAGE (Button)                              */\r
+       0x19, 0x01,                                             /*     USAGE_MINIMUM (Button 1)                 */\r
+       0x29, 0x03,                                             /*     USAGE_MAXIMUM (Button 3)                 */\r
+       0x15, 0x00,                                             /*     LOGICAL_MINIMUM (0)                              */\r
+       0x25, 0x01,                                             /*     LOGICAL_MAXIMUM (1)                              */\r
+       0x81, 0x02,                                             /*     INPUT (Data,Var,Abs)                             */\r
+       0x95, 0x01,                                             /*     REPORT_COUNT (1)                                 */\r
+       0x75, 0x05,                                             /*     REPORT_SIZE (5)                                  */\r
+       0x81, 0x01,                                             /*     INPUT (Cnst,Ary,Abs)                             */\r
+       0x75, 0x08,                                             /*     REPORT_SIZE (8)                                  */\r
+       0x95, 0x02,                                             /*     REPORT_COUNT (2)                                 */\r
+       0x05, 0x01,                                             /*     USAGE_PAGE (Generic Desktop)             */\r
+       0x09, 0x30,                                             /*     USAGE (X)                                                */\r
+       0x09, 0x31,                                             /*     USAGE (Y)                                                */\r
+       0x15, 0x81,                                             /*     LOGICAL_MINIMUM (-127)                   */\r
+       0x25, 0x7f,                                             /*     LOGICAL_MAXIMUM (127)                    */\r
+       0x81, 0x06,                                             /*     INPUT (Data,Var,Rel)                             */\r
+       0xc0,                                                   /*   END_COLLECTION                                             */\r
+       0xc0                                                    /* END_COLLECTION                                               */\r
+};\r
+\r
+\r
+\r
+const char pxDeviceDescriptor[] = \r
+{\r
+       /* Device descriptor */\r
+       0x12,                                                           /* bLength                              */\r
+       0x01,                                                           /* bDescriptorType              */\r
+       0x10, 0x01,                                                     /* bcdUSBL                              */\r
+       usbDEVICE_CLASS_VENDOR_SPECIFIC,        /* bDeviceClass:                */\r
+       0x00,                                                           /* bDeviceSubclass:             */\r
+       0x00,                                                           /* bDeviceProtocol:             */\r
+       0x08,                                                           /* bMaxPacketSize0              */\r
+       0xFF, 0xFF,                                                     /* idVendorL                    */\r
+       0x02, 0x00,                                                     /* idProductL                   */\r
+       0x00, 0x01,                                                     /* bcdDeviceL                   */\r
+       usbMANUFACTURER_STRING,                         /* iManufacturer                */\r
+       usbPRODUCT_STRING,                                      /* iProduct                             */\r
+       0x00,                                                           /* SerialNumber                 */\r
+       0x01                                                            /* bNumConfigs                  */\r
+};\r
+\r
+\r
+const char pxConfigDescriptor[] = {\r
+       /* Configuration 1 descriptor */\r
+       0x09,                   /* CbLength                                                                     */\r
+       0x02,                   /* CbDescriptorType                                                     */\r
+       0x22, 0x00,             /* CwTotalLength 2 EP + Control                         */\r
+       0x01,                   /* CbNumInterfaces                                                      */\r
+       0x01,                   /* CbConfigurationValue                                         */\r
+       usbCONFIGURATION_STRING,/* CiConfiguration                                      */\r
+       usbBUS_POWERED, /* CbmAttributes Bus powered + Remote Wakeup*/\r
+       0x32,                   /* CMaxPower: 100mA                                                     */\r
+\r
+       /* Mouse Interface Descriptor Requirement */\r
+       0x09,                   /* bLength                                                                      */\r
+       0x04,                   /* bDescriptorType                                                      */\r
+       0x00,                   /* bInterfaceNumber                                                     */\r
+       0x00,                   /* bAlternateSetting                                            */\r
+       0x01,                   /* bNumEndpoints                                                        */\r
+       0x03,                   /* bInterfaceClass: HID code                            */\r
+       0x01,                   /* bInterfaceSubclass boot                                      */\r
+       0x02,                   /* bInterfaceProtocol mouse boot                        */\r
+       usbINTERFACE_STRING,/* iInterface                                                       */\r
+\r
+       /* HID Descriptor */\r
+       0x09,                   /* bLength                                                                      */\r
+       0x21,                   /* bDescriptor type: HID Descriptor Type        */\r
+       0x00, 0x01,             /* bcdHID                                                                       */\r
+       0x00,                   /* bCountryCode                                                         */\r
+       0x01,                   /* bNumDescriptors                                                      */\r
+       usbHID_REPORT_DESCRIPTOR,         /* bDescriptorType                    */\r
+       sizeof( pxReportDescriptor ), 0x00, /* wItemLength                      */\r
+\r
+       /* Endpoint 1 descriptor */\r
+       0x07,                   /* bLength                                                                      */\r
+       0x05,                   /* bDescriptorType                                                      */\r
+       0x81,                   /* bEndpointAddress, Endpoint 01 - IN           */\r
+       0x03,                   /* bmAttributes      INT                                        */\r
+       0x08, 0x00,             /* wMaxPacketSize: 8?                                           */\r
+       0x0A                    /* bInterval                                                            */\r
+};\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* File scope state variables. */\r
+static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0;\r
+static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0;\r
+static eDRIVER_STATE eDriverState = eNOTHING;\r
+\r
+/* Structure used to control the characters being sent to the host. */\r
+static xTX_MESSAGE pxCharsForTx;\r
+\r
+/* Queue used to pass messages between the ISR and the task. */\r
+xQueueHandle xUSBInterruptQueue; \r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vStartUSBTask( unsigned portBASE_TYPE uxPriority )\r
+{\r
+       /* Create the queue used to communicate between the USB ISR and task. */\r
+       xUSBInterruptQueue = xQueueCreate( usbQUEUE_LENGTH + 1, sizeof( xISRStatus * ) );\r
+\r
+       /* Create the task itself. */\r
+       xTaskCreate( vUSBDemoTask, "USB", configMINIMAL_STACK_SIZE, NULL, uxPriority, NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vUSBDemoTask( void *pvParameters )\r
+{\r
+xISRStatus *pxMessage;\r
+\r
+       /* The parameters are not used in this task. */\r
+       ( void ) pvParameters;\r
+\r
+    /* Init USB device */\r
+    portENTER_CRITICAL();\r
+           vInitUSBInterface();\r
+    portEXIT_CRITICAL();\r
+\r
+       /* Process interrupts as they arrive.   The ISR takes a snapshot of the \r
+       interrupt status then posts the information on this queue for processing\r
+       at the task level.  This simple demo implementation only processes\r
+       a few interrupt sources. */\r
+       for( ;; )\r
+       {\r
+               if( xQueueReceive( xUSBInterruptQueue, &pxMessage, usbSHORT_DELAY ) )\r
+               {\r
+                       if( pxMessage->ulISR & AT91C_UDP_EPINT0 )\r
+                       {\r
+                               /* Process end point 0 interrupt. */\r
+                               prvProcessEndPoint0Interrupt( pxMessage );\r
+                       }\r
+\r
+                       if( pxMessage->ulISR & AT91C_UDP_ENDBUSRES )\r
+                       {\r
+                               /* Process an end of bus reset interrupt. */\r
+                               prvResetEndPoints();            \r
+                       }\r
+               }\r
+               else\r
+               {\r
+                       /* The ISR did not post any data for us to process on the queue, so\r
+                       just generate and send some sample data. */\r
+                       if( eDriverState == eREADY_TO_SEND )\r
+                       {\r
+                               prvTransmitSampleValues();\r
+                       }\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 )\r
+{\r
+const portCHAR cSpeed = 20;\r
+\r
+       if( !( ulInput & ulSwitch1 ) )\r
+       {\r
+               /* We are going in the decreasing y direction. */\r
+               if( *cVal > 0 )\r
+               {\r
+                       /* We have changed direction since last time so start from\r
+                       0 again. */\r
+                       *cVal = 0;\r
+               }\r
+               \r
+               if( *cVal > -cSpeed )\r
+               {\r
+                       /* Ramp y down to the max speed. */\r
+                       (*cVal)--;\r
+               }\r
+       }\r
+       else if( !( ulInput & ulSwitch2 ) )\r
+       {\r
+               /* We are going in the increasing y direction. */\r
+               if( *cVal < 0 )\r
+               {\r
+                       /* We have changed direction since last time, so start from\r
+                       0 again. */\r
+                       *cVal = 0;\r
+               }\r
+               \r
+               if( *cVal < cSpeed )\r
+               {\r
+                       /* Ramp y up to the max speed again. */\r
+                       (*cVal)++;\r
+               }\r
+       }\r
+       else\r
+       {\r
+               *cVal = 0;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvTransmitSampleValues( void )\r
+{\r
+/* Variables to hold dummy x, y and z joystick axis data. */\r
+static signed portCHAR x = 0, y = 0, z = 0;\r
+unsigned portLONG ulStatus;\r
+\r
+       ulStatus =      AT91C_BASE_PIOA->PIO_PDSR;\r
+\r
+       prvControlCursorSpeed( &y, ulStatus, ( unsigned long ) usbSW1, ( unsigned long ) usbSW2 );\r
+       prvControlCursorSpeed( &x, ulStatus, ( unsigned long ) usbSW3, ( unsigned long ) usbSW4 );\r
+       \r
+       /* Just make the z axis go up and down. */\r
+       z = ( ( ulStatus & usbSW_CLICK ) == 0 );\r
+\r
+       /* Can we place data in the fifo? */\r
+       if( !( AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] & AT91C_UDP_TXPKTRDY ) )\r
+       {\r
+               /* Write our sample data to the fifo. */\r
+               AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = z;\r
+               AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = x;\r
+               AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = y;\r
+               \r
+               /* Send the data. */\r
+               portENTER_CRITICAL();\r
+               {\r
+                       ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];\r
+                       usbCSR_SET_BIT( &ulStatus, ( AT91C_UDP_TXPKTRDY ) );\r
+                       AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulStatus;\r
+               }\r
+               portEXIT_CRITICAL();\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvUSBTransmitNull( void )\r
+{\r
+unsigned portLONG ulStatus;\r
+\r
+       /* Wait until the FIFO is free - even though we are not going to use it.\r
+       THERE IS NO TIMEOUT HERE! */\r
+       while( AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] & AT91C_UDP_TXPKTRDY )\r
+       {\r
+               vTaskDelay( usbSHORTEST_DELAY );\r
+       }\r
+\r
+       portENTER_CRITICAL();\r
+       {\r
+               /* Set the length of data to send to equal the index of the next byte\r
+               to send.  This will prevent the ACK to this NULL packet causing any\r
+               further data transmissions. */\r
+               pxCharsForTx.ulTotalDataLength = pxCharsForTx.ulNextCharIndex;\r
+\r
+               /* Set the TXPKTRDY bit to cause a transmission with no data. */\r
+               ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
+               usbCSR_SET_BIT( &ulStatus, ( AT91C_UDP_TXPKTRDY ) );\r
+               AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;\r
+       }\r
+       portEXIT_CRITICAL();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSendStall( void )\r
+{\r
+unsigned portLONG ulStatus;\r
+\r
+       portENTER_CRITICAL();\r
+       {\r
+               /* Force a stall by simply setting the FORCESTALL bit in the CSR. */\r
+               ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
+               usbCSR_SET_BIT( &ulStatus, AT91C_UDP_FORCESTALL );\r
+               AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;\r
+       }\r
+       portEXIT_CRITICAL();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvResetEndPoints( void )\r
+{\r
+unsigned portLONG ulTemp;\r
+\r
+       eDriverState = eJUST_RESET;\r
+\r
+       /* Reset all the end points. */\r
+       AT91C_BASE_UDP->UDP_RSTEP  = usbEND_POINT_RESET_MASK;\r
+       AT91C_BASE_UDP->UDP_RSTEP  = ( unsigned portLONG ) 0x00;\r
+\r
+       /* Enable data to be sent and received. */\r
+       AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;\r
+\r
+       /* Repair the configuration end point. */\r
+       portENTER_CRITICAL();\r
+       {\r
+               ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
+               usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );\r
+               AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;\r
+               AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT0;\r
+       }\r
+       portEXIT_CRITICAL();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )\r
+{\r
+       if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 )\r
+       {               \r
+               /* We only expect to receive zero length data here as ACK's. \r
+               Set the data pointer to the end of the current Tx packet to\r
+               ensure we don't send out any more data. */      \r
+               pxCharsForTx.ulNextCharIndex = pxCharsForTx.ulTotalDataLength;\r
+       }\r
+\r
+       if( pxMessage->ulCSR0 & AT91C_UDP_TXCOMP )\r
+       {\r
+               /* We received a TX complete interrupt.  What we do depends on\r
+               what we sent to get this interrupt. */\r
+\r
+               if( eDriverState == eJUST_GOT_CONFIG )\r
+               {\r
+                       /* We sent an acknowledgement of a SET_CONFIG request.  We\r
+                       are now at the end of the enumeration. */\r
+                       AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_CONFG;\r
+\r
+                       /* Read the end point for data transfer. */\r
+                       portENTER_CRITICAL();\r
+                       {\r
+                               unsigned portLONG ulTemp;\r
+\r
+                               ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];                                     \r
+                               usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );\r
+                               AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulTemp;             \r
+                               AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT1;\r
+                       }\r
+                       portEXIT_CRITICAL();\r
+\r
+                       eDriverState = eREADY_TO_SEND;\r
+               }               \r
+               else if( eDriverState == eJUST_GOT_ADDRESS )\r
+               {\r
+                       /* We sent an acknowledgement of a SET_ADDRESS request.  Move\r
+                       to the addressed state. */\r
+                       if( ulReceivedAddress != ( unsigned portLONG ) 0 )\r
+                       {                       \r
+                               AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;\r
+                       }\r
+                       else\r
+                       {\r
+                               AT91C_BASE_UDP->UDP_GLBSTATE = 0;\r
+                       }                       \r
+\r
+                       AT91C_BASE_UDP->UDP_FADDR = ( AT91C_UDP_FEN | ulReceivedAddress );              \r
+                       eDriverState = eNOTHING;\r
+               }\r
+               else\r
+               {               \r
+                       /* The TXCOMP was not for any special type of transmission.  See\r
+                       if there is any more data to send. */\r
+                       prvSendNextSegment();\r
+               }\r
+       }\r
+\r
+       if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )\r
+       {\r
+               xUSB_REQUEST xRequest;\r
+               unsigned portCHAR ucRequest;\r
+               unsigned portLONG ulRxBytes;\r
+\r
+               /* A data packet is available. */       \r
+               ulRxBytes = pxMessage->ulCSR0 >> 16;\r
+               ulRxBytes &= usbRX_COUNT_MASK;\r
+\r
+               if( ulRxBytes >= usbEXPECTED_NUMBER_OF_BYTES )\r
+               {\r
+                       /* Create an xUSB_REQUEST variable from the raw bytes array. */\r
+\r
+                       xRequest.ucReqType = pxMessage->ucFifoData[ usbREQUEST_TYPE_INDEX ];\r
+                       xRequest.ucRequest = pxMessage->ucFifoData[ usbREQUEST_INDEX ];\r
+\r
+                       /* NOT PORTABLE CODE! */\r
+                       xRequest.usValue = pxMessage->ucFifoData[ usbVALUE_HIGH_BYTE ];\r
+                       xRequest.usValue <<= 8;\r
+                       xRequest.usValue |= pxMessage->ucFifoData[ usbVALUE_LOW_BYTE ];\r
+                                               \r
+                       xRequest.usIndex = pxMessage->ucFifoData[ usbINDEX_HIGH_BYTE ];\r
+                       xRequest.usIndex <<= 8;\r
+                       xRequest.usIndex |= pxMessage->ucFifoData[ usbINDEX_LOW_BYTE ];\r
+                       \r
+                       xRequest.usLength = pxMessage->ucFifoData[ usbLENGTH_HIGH_BYTE ];\r
+                       xRequest.usLength <<= 8;\r
+                       xRequest.usLength |= pxMessage->ucFifoData[ usbLENGTH_LOW_BYTE ];\r
+       \r
+                       /* Manipulate the ucRequestType and the ucRequest parameters to \r
+                       generate a zero based request selection.  This is just done to \r
+                       break up the requests into subsections for clarity.  The \r
+                       alternative would be to have more huge switch statement that would\r
+                       be difficult to optimise. */\r
+                       ucRequest = ( ( xRequest.ucReqType & 0x60 ) >> 3 );\r
+                       ucRequest |= ( xRequest.ucReqType & 0x03 );\r
+\r
+                       switch( ucRequest )\r
+                       {\r
+                               case usbSTANDARD_DEVICE_REQUEST:        \r
+                                                       /* Standard Device request */\r
+                                                       prvHandleStandardDeviceRequest( &xRequest );\r
+                                                       break;\r
+       \r
+                               case usbSTANDARD_INTERFACE_REQUEST:     \r
+                                                       /* Standard Interface request */\r
+                                                       prvHandleStandardInterfaceRequest( &xRequest );\r
+                                                       break;\r
+       \r
+                               case usbSTANDARD_END_POINT_REQUEST:     \r
+                                                       /* Standard Endpoint request */\r
+                                                       prvHandleStandardEndPointRequest( &xRequest );\r
+                                                       break;\r
+       \r
+                               case usbCLASS_INTERFACE_REQUEST:        \r
+                                                       /* Class Interface request */\r
+                                                       prvHandleClassInterfaceRequest( &xRequest );\r
+                                                       break;\r
+       \r
+                               default:        /* This is not something we want to respond to. */\r
+                                                       prvSendStall(); \r
+                       }\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )\r
+{\r
+       /* The type is in the high byte.  Return whatever has been requested. */\r
+       switch( ( pxRequest->usValue & 0xff00 ) >> 8 )\r
+       {\r
+           case usbDESCRIPTOR_TYPE_DEVICE:\r
+                       prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );\r
+                   break;\r
+       \r
+           case usbDESCRIPTOR_TYPE_CONFIGURATION:\r
+                       prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );\r
+                   break;\r
+\r
+           case usbDESCRIPTOR_TYPE_STRING:\r
+\r
+                       /* The index to the string descriptor is the lower byte. */\r
+                   switch( pxRequest->usValue & 0xff )\r
+                       {                       \r
+                       case usbLANGUAGE_STRING:\r
+                                       prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );\r
+                               break;\r
+\r
+                       case usbMANUFACTURER_STRING:\r
+                                       prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );\r
+                               break;\r
+\r
+                       case usbPRODUCT_STRING:\r
+                                       prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );\r
+                               break;\r
+\r
+                       case usbCONFIGURATION_STRING:\r
+                                       prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );\r
+                               break;\r
+\r
+                       case usbINTERFACE_STRING:\r
+                                       prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );\r
+                               break;\r
+\r
+                       default:\r
+                               /* Don't know what this string is. */\r
+                                       prvSendStall();\r
+                                       break;\r
+                       }\r
+\r
+                       break;\r
+\r
+           default:\r
+                       /* We are not responding to anything else. */\r
+                       prvSendStall();\r
+                   break;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest )\r
+{\r
+unsigned portSHORT usStatus = 0;\r
+\r
+       switch( pxRequest->ucRequest )\r
+       {\r
+           case usbGET_STATUS_REQUEST:\r
+                       /* Just send two byte dummy status. */\r
+                       prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );\r
+                   break;\r
+\r
+           case usbGET_DESCRIPTOR_REQUEST:\r
+                       /* Send device descriptor */\r
+                   prvGetStandardDeviceDescriptor( pxRequest );\r
+                   break;\r
+\r
+           case usbGET_CONFIGURATION_REQUEST:\r
+                       /* Send selected device configuration */\r
+                       prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );\r
+                   break;\r
+\r
+               case usbSET_FEATURE_REQUEST:\r
+                   prvUSBTransmitNull();\r
+                   break;\r
+\r
+           case usbSET_ADDRESS_REQUEST:\r
+               \r
+                       /* Acknowledge the SET_ADDRESS, but (according to the manual) we\r
+                       cannot actually move to the addressed state until we get a TXCOMP\r
+                       interrupt from this NULL packet.  Therefore we just remember the\r
+                       address and set our state so we know we have received the address. */\r
+               prvUSBTransmitNull();                   \r
+                       eDriverState = eJUST_GOT_ADDRESS;               \r
+                       ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;\r
+                   break;\r
+\r
+           case usbSET_CONFIGURATION_REQUEST:\r
+\r
+                       /* Acknowledge the SET_CONFIGURATION, but (according to the manual) \r
+                       we cannot actually move to the configured state until we get a \r
+                       TXCOMP interrupt from this NULL packet.  Therefore we just remember the\r
+                       config and set our state so we know we have received the go ahead. */                   \r
+                       ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );\r
+                       eDriverState = eJUST_GOT_CONFIG;\r
+                       prvUSBTransmitNull();\r
+                   break;\r
+\r
+           default:\r
+\r
+                   /* We don't answer to anything else. */\r
+                       prvSendStall();\r
+                   break;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest )\r
+{\r
+       switch( pxRequest->ucRequest )\r
+       {\r
+           case usbSET_IDLE_REQUEST:\r
+               prvUSBTransmitNull();\r
+                       break;\r
+\r
+               /* This minimal implementation ignores these. */\r
+           case usbGET_REPORT_REQUEST:\r
+           case usbGET_IDLE_REQUEST:\r
+           case usbGET_PROTOCOL_REQUEST:\r
+           case usbSET_REPORT_REQUEST:\r
+           case usbSET_PROTOCOL_REQUEST:       \r
+           default:\r
+\r
+                       prvSendStall();\r
+                       break;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )\r
+{\r
+       switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 )\r
+       {\r
+           case usbHID_REPORT_DESCRIPTOR:\r
+                       prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );\r
+                   break;\r
+\r
+           default:\r
+\r
+                       /* Don't expect to send any others. */\r
+                       prvSendStall();\r
+                   break;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest )\r
+{\r
+unsigned portSHORT usStatus = 0;\r
+\r
+       switch( pxRequest->ucRequest )\r
+       {\r
+           case usbGET_STATUS_REQUEST:\r
+                       /* Send dummy 2 bytes. */\r
+                       prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );\r
+                       break;\r
+\r
+           case usbGET_DESCRIPTOR_REQUEST:\r
+                       prvGetStandardInterfaceDescriptor( pxRequest ); \r
+                       break;\r
+\r
+               /* This minimal implementation does not respond to these. */\r
+           case usbGET_INTERFACE_REQUEST:\r
+           case usbSET_FEATURE_REQUEST:\r
+           case usbSET_INTERFACE_REQUEST:      \r
+\r
+           default:\r
+                       prvSendStall();\r
+                       break;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )\r
+{\r
+       switch( pxRequest->ucRequest )\r
+       {\r
+               /* This minimal implementation does not expect to respond to these. */\r
+           case usbGET_STATUS_REQUEST:\r
+           case usbCLEAR_FEATURE_REQUEST: \r
+           case usbSET_FEATURE_REQUEST:\r
+\r
+           default:                    \r
+                       prvSendStall();\r
+                       break;\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vInitUSBInterface( void )\r
+{\r
+volatile unsigned portLONG ulTemp;\r
+\r
+       /* Initialise a few state variables. */\r
+       pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;\r
+       ucUSBConfig = ( unsigned portCHAR ) 0;\r
+       eDriverState = eNOTHING;\r
+\r
+       /* HARDWARE SETUP */\r
+\r
+    /* Set the PLL USB Divider */\r
+    AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1;\r
+\r
+    /* Enables the 48MHz USB clock UDPCK and System Peripheral USB Clock. */\r
+    AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UDP;\r
+    AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_UDP);\r
+\r
+    /* Setup the PIO for the USB pull up resistor. */\r
+    AT91C_BASE_PIOA->PIO_PER = AT91C_PIO_PA16;\r
+    AT91C_BASE_PIOA->PIO_OER = AT91C_PIO_PA16;\r
+    \r
+\r
+    /* Start without the pullup - this will get set at the end of this \r
+       function. */\r
+    AT91C_BASE_PIOA->PIO_SODR = AT91C_PIO_PA16;\r
+\r
+       /* When using the USB debugger the peripheral registers do not always get\r
+       set to the correct default values.  To make sure set the relevant registers\r
+       manually here. */\r
+       AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff;\r
+       AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff;\r
+       AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00;\r
+       AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00;\r
+       AT91C_BASE_UDP->UDP_GLBSTATE = 0;\r
+       AT91C_BASE_UDP->UDP_FADDR = 0;\r
+\r
+       /* Enable the transceiver. */\r
+       AT91C_UDP_TRANSCEIVER_ENABLE = 0;\r
+\r
+       /* Enable the USB interrupts - other interrupts get enabled as the \r
+       enumeration process progresses. */\r
+       AT91F_AIC_ConfigureIt( AT91C_ID_UDP, usbINTERRUPT_PRIORITY, AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, ( void (*)( void ) ) vUSB_ISR_Wrapper );\r
+       AT91C_BASE_AIC->AIC_IECR = 0x1 << AT91C_ID_UDP;\r
+\r
+       /* Wait a short while before making our presence known. */\r
+       vTaskDelay( usbINIT_DELAY );\r
+       AT91C_BASE_PIOA->PIO_CODR = AT91C_PIO_PA16;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor )\r
+{\r
+       if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) )\r
+       {\r
+               /* Cap the data length to that requested. */\r
+               ulLengthToSend = ( unsigned portSHORT ) usRequestedLength;\r
+       }\r
+       else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )\r
+       {\r
+               /* We are sending a descriptor.  If the descriptor is an exact \r
+               multiple of the FIFO length then it will have to be terminated\r
+               with a NULL packet.  Set the state to indicate this if\r
+               necessary. */\r
+               if( ( ulLengthToSend % usbFIFO_LENGTH ) == 0 )\r
+               {\r
+                       eDriverState = eSENDING_EVEN_DESCRIPTOR;\r
+               }\r
+       }\r
+\r
+       /* Here we assume that the previous message has been sent.  THERE IS NO\r
+       BUFFER OVERFLOW PROTECTION HERE.\r
+\r
+       Copy the data to send into the buffer as we cannot send it all at once\r
+       (if it is greater than 8 bytes in length). */\r
+       memcpy( pxCharsForTx.ucTxBuffer, pucData, ulLengthToSend );\r
+\r
+       /* Reinitialise the buffer index so we start sending from the start of \r
+       the data. */\r
+       pxCharsForTx.ulTotalDataLength = ulLengthToSend;\r
+       pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;\r
+\r
+       /* Send the first 8 bytes now.  The rest will get sent in response to \r
+       TXCOMP interrupts. */\r
+       prvSendNextSegment();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSendNextSegment( void )\r
+{\r
+volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;\r
+\r
+       /* Is there any data to send? */\r
+       if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )\r
+       {\r
+               ulLengthLeftToSend = pxCharsForTx.ulTotalDataLength - pxCharsForTx.ulNextCharIndex;\r
+       \r
+               /* We can only send 8 bytes to the fifo at a time. */\r
+               if( ulLengthLeftToSend > usbFIFO_LENGTH )\r
+               {\r
+                       ulNextLength = usbFIFO_LENGTH;\r
+               }\r
+               else\r
+               {\r
+                       ulNextLength = ulLengthLeftToSend;\r
+               }\r
+\r
+               /* Wait until we can place data in the fifo.  THERE IS NO TIMEOUT\r
+               HERE! */\r
+               while( AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] & AT91C_UDP_TXPKTRDY )\r
+               {\r
+                       vTaskDelay( usbSHORTEST_DELAY );\r
+               }\r
+\r
+               /* Write the data to the FIFO. */\r
+               while( ulNextLength > ( unsigned portLONG ) 0 )\r
+               {\r
+                       AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];\r
+       \r
+                       ulNextLength--;\r
+                       pxCharsForTx.ulNextCharIndex++;\r
+               }\r
+       \r
+               /* Start the transmission. */\r
+               portENTER_CRITICAL();\r
+               {\r
+                       ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
+                       usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) );\r
+                       AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;\r
+               }\r
+               portEXIT_CRITICAL();\r
+       }\r
+       else\r
+       {\r
+               /* There is no data to send.  If we were sending a descriptor and the \r
+               descriptor was an exact multiple of the max packet size then we need\r
+               to send a null to terminate the transmission. */\r
+               if( eDriverState == eSENDING_EVEN_DESCRIPTOR )\r
+               {\r
+                       prvUSBTransmitNull();\r
+                       eDriverState = eNOTHING;\r
+               }\r
+       }\r
+}\r
+\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USBSample.h
new file mode 100644 (file)
index 0000000..4e33db0
--- /dev/null
@@ -0,0 +1,84 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+#ifndef USB_DEMO_H\r
+#define USB_DEMO_H\r
+\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+#define usbQUEUE_LENGTH                                                ( 0x3 ) /* Must have all bits set! */\r
+#define usbEND_POINT_0                                         ( 0 )\r
+#define usbEND_POINT_1                                         ( 1 )\r
+#define usbRX_COUNT_MASK                                       ( ( unsigned portLONG ) 0x7ff )\r
+#define AT91C_UDP_STALLSENT                                    AT91C_UDP_ISOERROR\r
+\r
+/* Structure used to take a snapshot of the USB status from within the ISR. */\r
+typedef struct X_ISR_STATUS\r
+{\r
+       unsigned portLONG ulISR;\r
+       unsigned portLONG ulCSR0;\r
+       unsigned portCHAR ucFifoData[ 8 ];\r
+} xISRStatus;\r
+\r
+/* Macros to manipulate the control and status registers.  These registers \r
+cannot be accessed using a direct read modify write operation outside of the \r
+ISR as some bits are left unchanged by writing with a 0, and some are left \r
+unchanged by writing with a 1. */\r
+\r
+#define usbCSR_SET_BIT( pulValueNow, ulBit )                                                                                   \\r
+{                                                                                                                                                                              \\r
+       /* Set TXCOMP, RX_DATA_BK0, RXSETUP, */                                                                                         \\r
+       /* STALLSENT and RX_DATA_BK1 to 1 so the */                                                                                     \\r
+       /* write has no effect. */                                                                                                                      \\r
+       ( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f;            \\r
+                                                                                                                                                                               \\r
+       /* Clear the FORCE_STALL and TXPKTRDY bits */                                                                           \\r
+       /* so the write has no effect. */                                                                                                       \\r
+       ( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf;      \\r
+                                                                                                                                                                               \\r
+       /* Set whichever bit we want set. */                                                                                            \\r
+       ( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( ulBit );                                                     \\r
+}\r
+\r
+/*\r
+ * Creates the queue used to communicate between the USB task and the USB ISR, then\r
+ * createst the task that manages the USB peripheral.\r
+ */\r
+void vStartUSBTask( unsigned portBASE_TYPE uxPriority );\r
+\r
+#endif\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/USB/USB_ISR.c
new file mode 100644 (file)
index 0000000..d37c5a9
--- /dev/null
@@ -0,0 +1,180 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "queue.h"\r
+\r
+/* Demo app includes. */\r
+#include "USBSample.h"\r
+\r
+#define usbINT_CLEAR_MASK      (AT91C_UDP_TXCOMP | AT91C_UDP_STALLSENT | AT91C_UDP_RXSETUP | AT91C_UDP_RX_DATA_BK0 | AT91C_UDP_RX_DATA_BK1 )\r
+\r
+#define usbCSR_CLEAR_BIT( pulValueNow, ulBit )                                                                                 \\r
+{                                                                                                                                                                              \\r
+       /* Set TXCOMP, RX_DATA_BK0, RXSETUP, */                                                                                         \\r
+       /* STALLSENT and RX_DATA_BK1 to 1 so the */                                                                                     \\r
+       /* write has no effect. */                                                                                                                      \\r
+       ( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f;            \\r
+                                                                                                                                                                               \\r
+       /* Clear the FORCE_STALL and TXPKTRDY bits */                                                                           \\r
+       /* so the write has no effect. */                                                                                                       \\r
+       ( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf;      \\r
+                                                                                                                                                                               \\r
+       /* Clear whichever bit we want clear. */                                                                                        \\r
+       ( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( ~ulBit );                                            \\r
+}\r
+\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * ISR entry point.\r
+ */\r
+\r
+void vUSB_ISR_Wrapper( void ) __attribute__((naked));\r
+\r
+/*\r
+ * Actual ISR handler.  This must be separate from the entry point as the stack\r
+ * is used.\r
+ */\r
+void vUSB_ISR_Handler( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Array in which the USB interrupt status is passed between the ISR and task. */\r
+static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];\r
+\r
+/* Queue used to pass messages between the ISR and the task. */\r
+extern xQueueHandle xUSBInterruptQueue; \r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vUSB_ISR_Handler( void )\r
+{\r
+portBASE_TYPE xTaskWokenByPost = pdFALSE; \r
+static volatile unsigned portLONG ulNextMessage = 0;\r
+xISRStatus *pxMessage;\r
+unsigned portLONG ulTemp, ulRxBytes;\r
+\r
+       /* To reduce the amount of time spent in this interrupt it would be \r
+       possible to defer the majority of this processing to an 'interrupt task',\r
+       that is a task that runs at a higher priority than any of the application\r
+       tasks. */\r
+\r
+       /* Take the next message from the queue.  Note that usbQUEUE_LENGTH *must*\r
+       be all 1's, as in 0x01, 0x03, 0x07, etc. */\r
+       pxMessage = &( xISRMessages[ ( ulNextMessage & usbQUEUE_LENGTH ) ] );\r
+       ulNextMessage++;\r
+\r
+       /* Take a snapshot of the current USB state for processing at the task\r
+       level. */\r
+       pxMessage->ulISR = AT91C_BASE_UDP->UDP_ISR;\r
+       pxMessage->ulCSR0 = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];\r
+\r
+       /* Clear the interrupts from the ICR register.  The bus end interrupt is\r
+       cleared separately as it does not appear in the mask register. */\r
+       AT91C_BASE_UDP->UDP_ICR = AT91C_BASE_UDP->UDP_IMR | AT91C_UDP_ENDBUSRES;\r
+       \r
+       /* If there are bytes in the FIFO then we have to retrieve them here.  \r
+       Ideally this would be done at the task level.  However we need to clear the\r
+       RXSETUP interrupt before leaving the ISR, and this may cause the data in\r
+       the FIFO to be overwritten.  Also the DIR bit has to be changed before the\r
+       RXSETUP bit is cleared (as per the SAM7 manual). */\r
+       ulTemp = pxMessage->ulCSR0;\r
+       \r
+       /* Are there any bytes in the FIFO? */\r
+       ulRxBytes = ulTemp >> 16;\r
+       ulRxBytes &= usbRX_COUNT_MASK;\r
+       \r
+       /* With this minimal implementation we are only interested in receiving \r
+       setup bytes on the control end point. */\r
+       if( ( ulRxBytes > 0 ) && ( ulTemp & AT91C_UDP_RXSETUP ) )\r
+       {\r
+               /* Take off 1 for a zero based index. */\r
+               while( ulRxBytes > 0 )\r
+               {\r
+                       ulRxBytes--;\r
+                       pxMessage->ucFifoData[ ulRxBytes ] = AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ];                 \r
+               }\r
+               \r
+               /* The direction must be changed first. */\r
+               usbCSR_SET_BIT( &ulTemp, ( AT91C_UDP_DIR ) );\r
+               AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;\r
+       }\r
+       \r
+       /* Must write zero's to TXCOMP, STALLSENT, RXSETUP, and the RX DATA\r
+       registers to clear the interrupts in the CSR register. */\r
+       usbCSR_CLEAR_BIT( &ulTemp, usbINT_CLEAR_MASK );\r
+       AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;\r
+\r
+       /* Also clear the interrupts in the CSR1 register. */\r
+       ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];\r
+       usbCSR_CLEAR_BIT( &ulTemp, usbINT_CLEAR_MASK ); \r
+       AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulTemp;\r
+\r
+       /* The message now contains the entire state and optional data from\r
+       the USB interrupt.  This can now be posted on the Rx queue ready for\r
+       processing at the task level. */\r
+       xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );\r
+\r
+       /* We may want to switch to the USB task, if this message has made\r
+       it the highest priority task that is ready to execute. */\r
+       if( xTaskWokenByPost )\r
+       {\r
+               portYIELD_FROM_ISR();\r
+       }\r
+\r
+       /* Clear the AIC ready for the next interrupt. */               \r
+       AT91C_BASE_AIC->AIC_EOICR = 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vUSB_ISR_Wrapper( void )\r
+{\r
+       /* Save the context of the interrupted task. */\r
+       portSAVE_CONTEXT();\r
+\r
+       /* Call the handler itself.  This must be a separate function as it uses\r
+       the stack. */\r
+       vUSB_ISR_Handler();\r
+\r
+       /* Restore the context of the task that is going to \r
+       execute next. This might not be the same as the originally \r
+       interrupted task.*/\r
+       portRESTORE_CONTEXT();\r
+}\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/atmel-rom.ld b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/atmel-rom.ld
new file mode 100644 (file)
index 0000000..db22b4a
--- /dev/null
@@ -0,0 +1,49 @@
+MEMORY \r
+{\r
+       flash   : ORIGIN = 0x00100000, LENGTH = 256K\r
+       ram             : ORIGIN = 0x00200000, LENGTH = 64K\r
+}\r
+\r
+__stack_end__ = 0x00200000 + 64K - 4;\r
+\r
+SECTIONS \r
+{\r
+       . = 0;\r
+       startup : { *(.startup)} >flash\r
+\r
+       prog : \r
+       {\r
+               *(.text)\r
+               *(.rodata)\r
+               *(.rodata*)\r
+               *(.glue_7)\r
+               *(.glue_7t)\r
+       } >flash\r
+\r
+       __end_of_text__ = .;\r
+\r
+       .data : \r
+       {\r
+               __data_beg__ = .;\r
+               __data_beg_src__ = __end_of_text__;\r
+               *(.data)\r
+               __data_end__ = .;\r
+       } >ram AT>flash\r
+\r
+       .bss : \r
+       {\r
+               __bss_beg__ = .;\r
+               *(.bss)\r
+       } >ram\r
+\r
+       /* Align here to ensure that the .bss section occupies space up to\r
+       _end.  Align after .bss to ensure correct alignment even if the\r
+       .bss section disappears because there are no input sections.  */\r
+       . = ALIGN(32 / 8);\r
+}\r
+       . = ALIGN(32 / 8);\r
+       _end = .;\r
+       _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;\r
+       PROVIDE (end = .);\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/boot.s b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/boot.s
new file mode 100644 (file)
index 0000000..1d4dfdf
--- /dev/null
@@ -0,0 +1,162 @@
+       /* Sample initialization file */\r
+\r
+       .extern main\r
+       .extern exit\r
+       .extern AT91F_LowLevelInit\r
+       .extern vPortYieldProcessor\r
+\r
+       .text\r
+       .code 32\r
+\r
+\r
+       .align  0\r
+\r
+       .extern __stack_end__\r
+       .extern __bss_beg__\r
+       .extern __bss_end__\r
+       .extern __data_beg__\r
+       .extern __data_end__\r
+       .extern __data+beg_src__\r
+\r
+       .global start\r
+       .global endless_loop\r
+\r
+       /* Stack Sizes */\r
+    .set  UND_STACK_SIZE, 0x00000004\r
+    .set  ABT_STACK_SIZE, 0x00000004\r
+    .set  FIQ_STACK_SIZE, 0x00000004\r
+    .set  IRQ_STACK_SIZE, 0X00000400\r
+    .set  SVC_STACK_SIZE, 0x00000400\r
+\r
+       /* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */\r
+    .set  MODE_USR, 0x10            /* User Mode */\r
+    .set  MODE_FIQ, 0x11            /* FIQ Mode */\r
+    .set  MODE_IRQ, 0x12            /* IRQ Mode */\r
+    .set  MODE_SVC, 0x13            /* Supervisor Mode */\r
+    .set  MODE_ABT, 0x17            /* Abort Mode */\r
+    .set  MODE_UND, 0x1B            /* Undefined Mode */\r
+    .set  MODE_SYS, 0x1F            /* System Mode */\r
+\r
+    .equ  I_BIT, 0x80               /* when I bit is set, IRQ is disabled */\r
+    .equ  F_BIT, 0x40               /* when F bit is set, FIQ is disabled */\r
+\r
+\r
+start:\r
+_start:\r
+_mainCRTStartup:\r
+\r
+       /* Setup a stack for each mode - note that this only sets up a usable stack\r
+       for system/user, SWI and IRQ modes.   Also each mode is setup with\r
+       interrupts initially disabled. */\r
+    ldr   r0, .LC6\r
+    msr   CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */\r
+    mov   sp, r0\r
+    sub   r0, r0, #UND_STACK_SIZE\r
+    msr   CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */\r
+    mov   sp, r0\r
+    sub   r0, r0, #ABT_STACK_SIZE\r
+    msr   CPSR_c, #MODE_FIQ|I_BIT|F_BIT /* FIQ Mode */\r
+    mov   sp, r0\r
+    sub   r0, r0, #FIQ_STACK_SIZE\r
+    msr   CPSR_c, #MODE_IRQ|I_BIT|F_BIT /* IRQ Mode */\r
+    mov   sp, r0\r
+    sub   r0, r0, #IRQ_STACK_SIZE\r
+    msr   CPSR_c, #MODE_SVC|I_BIT|F_BIT /* Supervisor Mode */\r
+    mov   sp, r0\r
+    sub   r0, r0, #SVC_STACK_SIZE\r
+    msr   CPSR_c, #MODE_SYS|I_BIT|F_BIT /* System Mode */\r
+    mov   sp, r0\r
+\r
+       /* We want to start in supervisor mode.  Operation will switch to system\r
+       mode when the first task starts. */\r
+       msr   CPSR_c, #MODE_SVC|I_BIT|F_BIT\r
+\r
+    bl         AT91F_LowLevelInit\r
+\r
+       /* Clear BSS. */\r
+\r
+       mov     a2, #0                  /* Fill value */\r
+       mov             fp, a2                  /* Null frame pointer */\r
+       mov             r7, a2                  /* Null frame pointer for Thumb */\r
+\r
+       ldr             r1, .LC1                /* Start of memory block */\r
+       ldr             r3, .LC2                /* End of memory block */\r
+       subs    r3, r3, r1      /* Length of block */\r
+       beq             .end_clear_loop\r
+       mov             r2, #0\r
+\r
+.clear_loop:\r
+       strb    r2, [r1], #1\r
+       subs    r3, r3, #1\r
+       bgt             .clear_loop\r
+\r
+.end_clear_loop:\r
+\r
+       /* Initialise data. */\r
+\r
+       ldr             r1, .LC3                /* Start of memory block */\r
+       ldr             r2, .LC4                /* End of memory block */\r
+       ldr             r3, .LC5\r
+       subs    r3, r3, r1              /* Length of block */\r
+       beq             .end_set_loop\r
+\r
+.set_loop:\r
+       ldrb    r4, [r2], #1\r
+       strb    r4, [r1], #1\r
+       subs    r3, r3, #1\r
+       bgt             .set_loop\r
+\r
+.end_set_loop:\r
+\r
+       mov             r0, #0          /* no arguments  */\r
+       mov             r1, #0          /* no argv either */\r
+\r
+    ldr lr, =main      \r
+       bx      lr\r
+\r
+endless_loop:\r
+       b               endless_loop\r
+\r
+\r
+       .align 0\r
+\r
+       .LC1:\r
+       .word   __bss_beg__\r
+       .LC2:\r
+       .word   __bss_end__\r
+       .LC3:\r
+       .word   __data_beg__\r
+       .LC4:\r
+       .word   __data_beg_src__\r
+       .LC5:\r
+       .word   __data_end__\r
+       .LC6:\r
+       .word   __stack_end__\r
+\r
+\r
+       /* Setup vector table.  Note that undf, pabt, dabt, fiq just execute\r
+       a null loop. */\r
+\r
+.section .startup,"ax"\r
+         .code 32\r
+         .align 0\r
+\r
+       b     _start                                            /* reset - _start                       */\r
+       ldr   pc, _undf                                         /* undefined - _undf            */\r
+       ldr   pc, _swi                                          /* SWI - _swi                           */\r
+       ldr   pc, _pabt                                         /* program abort - _pabt        */\r
+       ldr   pc, _dabt                                         /* data abort - _dabt           */\r
+       nop                                                                     /* reserved                                     */\r
+       ldr   pc, [pc,#-0xF20]                          /* IRQ - read the AIC           */\r
+       ldr   pc, _fiq                                          /* FIQ - _fiq                           */\r
+\r
+_undf:  .word __undf                    /* undefined                           */\r
+_swi:   .word vPortYieldProcessor       /* SWI                                         */\r
+_pabt:  .word __pabt                    /* program abort                       */\r
+_dabt:  .word __dabt                    /* data abort                          */\r
+_fiq:   .word __fiq                     /* FIQ                                         */\r
+\r
+__undf: b     .                         /* undefined                           */\r
+__pabt: b     .                         /* program abort                       */\r
+__dabt: b     .                         /* data abort                          */\r
+__fiq:  b     .                         /* FIQ                                         */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/main.c
new file mode 100644 (file)
index 0000000..618e2d6
--- /dev/null
@@ -0,0 +1,236 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+/*\r
+       NOTE : Tasks run in System mode and the scheduler runs in Supervisor mode.\r
+       The processor MUST be in supervisor mode when vTaskStartScheduler is\r
+       called.  The demo applications included in the FreeRTOS.org download switch\r
+       to supervisor mode prior to main being called.  If you are not using one of\r
+       these demo application projects then ensure Supervisor mode is used.\r
+*/\r
+\r
+/*\r
+ * This demo includes a (basic) USB mouse driver and a WEB server.  It is\r
+ * targeted for the AT91SAM7X EK prototyping board which includes a small\r
+ * joystick to provide the mouse inputs.  The WEB interface provides some basic\r
+ * interactivity through the use of a check box to turn on and off an LED.\r
+ *\r
+ * main() creates the WEB server, USB, and a set of the standard demo tasks\r
+ * before starting the scheduler.  See the online FreeRTOS.org documentation \r
+ * for more information on the standard demo tasks.  \r
+ *\r
+ * LEDs D1 to D3 are controlled by the standard 'flash' tasks - each will \r
+ * toggle at a different fixed frequency.\r
+ *\r
+ * A tick hook function is used to monitor the standard demo tasks - with LED\r
+ * D4 being used to indicate the system status.  D4 toggling every 5 seconds\r
+ * indicates that all the standard demo tasks are executing without error.  The\r
+ * toggle rate increasing to 500ms is indicative of an error having been found\r
+ * in at least one demo task.\r
+ *\r
+ * See the online documentation page that accompanies this demo for full setup\r
+ * and usage information.\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdlib.h>\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Demo application includes. */\r
+#include "partest.h"\r
+#include "USBSample.h"\r
+#include "uip_task.h"\r
+#include "BlockQ.h"\r
+#include "blocktim.h"\r
+#include "flash.h"\r
+#include "QPeek.h"\r
+#include "dynamic.h"\r
+\r
+/* Priorities for the demo application tasks. */\r
+#define mainUIP_PRIORITY                                       ( tskIDLE_PRIORITY + 2 )\r
+#define mainUSB_PRIORITY                                       ( tskIDLE_PRIORITY + 2 )\r
+#define mainBLOCK_Q_PRIORITY                           ( tskIDLE_PRIORITY + 1 )\r
+#define mainFLASH_PRIORITY                  ( tskIDLE_PRIORITY + 2 )\r
+#define mainGEN_QUEUE_TASK_PRIORITY                    ( tskIDLE_PRIORITY ) \r
+\r
+/* The task allocated to the uIP task is large to account for its use of the\r
+sprintf() library function.  Use of a cut down printf() library would allow\r
+the stack usage to be greatly reduced. */\r
+#define mainUIP_TASK_STACK_SIZE                ( configMINIMAL_STACK_SIZE * 6 )\r
+\r
+/* The LED toggle by the tick hook should an error have been found in a task. */\r
+#define mainERROR_LED                                          ( 3 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Configure the processor for use with the Atmel demo board.  Setup is minimal\r
+ * as the low level init function (called from the startup asm file) takes care\r
+ * of most things.\r
+ */\r
+static void prvSetupHardware( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Starts all the other tasks, then starts the scheduler.\r
+ */\r
+int main( void )\r
+{\r
+       /* Setup any hardware that has not already been configured by the low\r
+       level init routines. */\r
+       prvSetupHardware();\r
+\r
+       /* Start the task that handles the TCP/IP and WEB server functionality. */\r
+    xTaskCreate( vuIP_Task, "uIP", mainUIP_TASK_STACK_SIZE, NULL, mainUIP_PRIORITY, NULL );\r
+       \r
+       /* Also start the USB demo which is just for the SAM7. */\r
+    vStartUSBTask( mainUSB_PRIORITY );\r
+       \r
+       /* Start the standard demo tasks. */\r
+       vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
+    vCreateBlockTimeTasks();\r
+    vStartLEDFlashTasks( mainFLASH_PRIORITY );\r
+    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );\r
+    vStartQueuePeekTasks();   \r
+    vStartDynamicPriorityTasks();\r
+\r
+       /* Start the scheduler.\r
+\r
+       NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.\r
+       The processor MUST be in supervisor mode when vTaskStartScheduler is\r
+       called.  The demo applications included in the FreeRTOS.org download switch\r
+       to supervisor mode prior to main being called.  If you are not using one of\r
+       these demo application projects then ensure Supervisor mode is used here. */\r
+\r
+       vTaskStartScheduler();\r
+\r
+       /* We should never get here as control is now taken by the scheduler. */\r
+       return 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHardware( void )\r
+{\r
+       portDISABLE_INTERRUPTS();\r
+       \r
+       /* When using the JTAG debugger the hardware is not always initialised to\r
+       the correct default state.  This line just ensures that this does not\r
+       cause all interrupts to be masked at the start. */\r
+       AT91C_BASE_AIC->AIC_EOICR = 0;\r
+       \r
+       /* Most setup is performed by the low level init function called from the\r
+       startup asm file. */\r
+\r
+       /* Enable the peripheral clock. */\r
+    AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_PIOA;\r
+    AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_PIOB;\r
+       AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_EMAC;\r
+\r
+       /* Initialise the LED outputs for use by the demo application tasks. */\r
+       vParTestInitialise();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationTickHook( void )\r
+{\r
+static unsigned portLONG ulCallCount = 0, ulErrorFound = pdFALSE;\r
+\r
+/* The rate at which LED D4 will toggle if an error has been found in one or \r
+more of the standard demo tasks. */\r
+const unsigned portLONG ulErrorFlashRate = 500 / portTICK_RATE_MS;\r
+\r
+/* The rate at which LED D4 will toggle if no errors have been found in any\r
+of the standard demo tasks. */\r
+const unsigned portLONG ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;\r
+\r
+       ulCallCount++;\r
+\r
+       if( ulErrorFound != pdFALSE )\r
+       {\r
+               /* We have already found an error, so flash the LED with the appropriate\r
+               frequency. */\r
+               if( ulCallCount > ulErrorFlashRate )\r
+               {\r
+                       ulCallCount = 0;\r
+                       vParTestToggleLED( mainERROR_LED );\r
+               }\r
+       }\r
+       else\r
+       {\r
+               if( ulCallCount > ulNoErrorCheckRate )\r
+               {\r
+                       ulCallCount = 0;\r
+                       \r
+                       /* We have not yet found an error.  Check all the demo tasks to ensure\r
+                       this is still the case. */\r
+                       \r
+                       if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
+                       {\r
+                               ulErrorFound |= 0x01;\r
+                       }\r
+                       \r
+                       if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+                       {\r
+                               ulErrorFound |= 0x02;\r
+                       }\r
+       \r
+                       if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+                       {\r
+                               ulErrorFound |= 0x04;\r
+                       }\r
+                       \r
+                       if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+                       {\r
+                               ulErrorFound |= 0x08;\r
+                       }\r
+                       \r
+                       if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
+                       {\r
+                               ulErrorFound |= 0x10;\r
+                       }\r
+                       \r
+                       vParTestToggleLED( mainERROR_LED );\r
+               }\r
+       }\r
+}\r
+\r
+\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
new file mode 100644 (file)
index 0000000..dc04238
--- /dev/null
@@ -0,0 +1,101 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+#include "FreeRTOS.h"\r
+#include "Semphr.h"\r
+#include "Task.h"\r
+\r
+/* Wrapper for the EMAC interrupt. */\r
+void vEMACISR_Wrapper( void ) __attribute__((naked));\r
+\r
+/* Handler called by the ISR wrapper.  This must be kept a separate\r
+function to ensure the stack frame is correctly set up. */\r
+void vEMACISR_Handler( void );\r
+\r
+static xSemaphoreHandle xEMACSemaphore;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vPassEMACSemaphore( xSemaphoreHandle xSemaphore )\r
+{\r
+       xEMACSemaphore = xSemaphore;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vEMACISR_Handler( void )\r
+{\r
+volatile unsigned portLONG ulIntStatus, ulRxStatus;\r
+portBASE_TYPE xSwitchRequired = pdFALSE;\r
+\r
+       ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;\r
+       ulRxStatus = AT91C_BASE_EMAC->EMAC_RSR;\r
+\r
+       if( ( ulIntStatus & AT91C_EMAC_RCOMP ) || ( ulRxStatus & AT91C_EMAC_REC ) )\r
+       {\r
+               /* A frame has been received, signal the uIP task so it can process\r
+               the Rx descriptors. */\r
+               xSwitchRequired = xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE );\r
+               AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_REC;\r
+       }\r
+\r
+       /* Clear the interrupt. */\r
+       AT91C_BASE_AIC->AIC_EOICR = 0;\r
+       \r
+    /* Switch to the uIP task. */\r
+    if( xSwitchRequired )\r
+    {\r
+       /* If a task of higher priority than the interrupted task was\r
+       unblocked by the ISR then this call will ensure that the \r
+       unblocked task is the task the ISR returns to. */\r
+       portYIELD_FROM_ISR();\r
+    }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vEMACISR_Wrapper( void )\r
+{\r
+       /* Save the context of the interrupted task. */\r
+       portSAVE_CONTEXT();\r
+       \r
+       /* Call the handler task to do the actual work.  This must be a separate\r
+       function to ensure the stack frame is correctly set up. */\r
+       vEMACISR_Handler();\r
+       \r
+       /* Restore the context of whichever task is the next to run. */\r
+       portRESTORE_CONTEXT();\r
+}\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/Makefile.webserver b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/Makefile.webserver
new file mode 100644 (file)
index 0000000..f38c47a
--- /dev/null
@@ -0,0 +1 @@
+APP_SOURCES += httpd.c http-strings.c httpd-fs.c httpd-cgi.c\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.c
new file mode 100644 (file)
index 0000000..1b304fa
--- /dev/null
@@ -0,0 +1,674 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+/* Standard includes. */\r
+#include <string.h>\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "semphr.h"\r
+#include "task.h"\r
+\r
+/* Demo application includes. */\r
+#include "SAM7_EMAC.h"\r
+\r
+/* uIP includes. */\r
+#include "uip.h"\r
+\r
+/* Hardware specific includes. */\r
+#include "Emac.h"\r
+#include "mii.h"\r
+#include "AT91SAM7X256.h"\r
+\r
+\r
+/* USE_RMII_INTERFACE must be defined as 1 to use an RMII interface, or 0\r
+to use an MII interface. */\r
+#define USE_RMII_INTERFACE 0\r
+\r
+/* The buffer addresses written into the descriptors must be aligned so the\r
+last few bits are zero.  These bits have special meaning for the EMAC\r
+peripheral and cannot be used as part of the address. */\r
+#define emacADDRESS_MASK                       ( ( unsigned portLONG ) 0xFFFFFFFC )\r
+\r
+/* Bit used within the address stored in the descriptor to mark the last\r
+descriptor in the array. */\r
+#define emacRX_WRAP_BIT                                ( ( unsigned portLONG ) 0x02 )\r
+\r
+/* Bit used within the Tx descriptor status to indicate whether the\r
+descriptor is under the control of the EMAC or the software. */\r
+#define emacTX_BUF_USED                                ( ( unsigned portLONG ) 0x80000000 )\r
+\r
+/* A short delay is used to wait for a buffer to become available, should\r
+one not be immediately available when trying to transmit a frame. */\r
+#define emacBUFFER_WAIT_DELAY          ( 2 )\r
+#define emacMAX_WAIT_CYCLES                    ( configTICK_RATE_HZ / 40 )\r
+\r
+/* Misc defines. */\r
+#define emacINTERRUPT_LEVEL                    ( 5 )\r
+#define emacNO_DELAY                           ( 0 )\r
+#define emacTOTAL_FRAME_HEADER_SIZE    ( 54 )\r
+#define emacPHY_INIT_DELAY                     ( 5000 / portTICK_RATE_MS )\r
+#define emacRESET_KEY                          ( ( unsigned portLONG ) 0xA5000000 )\r
+#define emacRESET_LENGTH                       ( ( unsigned portLONG ) ( 0x01 << 8 ) )\r
+\r
+/* The Atmel header file only defines the TX frame length mask. */\r
+#define emacRX_LENGTH_FRAME                    ( 0xfff )\r
+\r
+/* Peripheral setup for the EMAC. */\r
+#define emacPERIPHERAL_A_SETUP                 ( ( unsigned portLONG ) AT91C_PB2_ETX0                  ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB12_ETXER                ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB16_ECOL                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB11_ETX3                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB6_ERX1                  ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB15_ERXDV                ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB13_ERX2                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB3_ETX1                  ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB8_EMDC                  ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB5_ERX0                  ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB14_ERX3                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB4_ECRS_ECRSDV   ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB1_ETXEN                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB10_ETX2                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB0_ETXCK_EREFCK  ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB9_EMDIO                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB7_ERXER                 ) | \\r
+                                                                       ( ( unsigned portLONG ) AT91C_PB17_ERXCK                );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Prototype for the EMAC interrupt function - called by the asm wrapper.\r
+ */\r
+extern void vEMACISR_Wrapper( void ) __attribute__((naked));\r
+\r
+/*\r
+ * Initialise both the Tx and Rx descriptors used by the EMAC.\r
+ */\r
+static void prvSetupDescriptors(void);\r
+\r
+/*\r
+ * Write our MAC address into the EMAC.  The MAC address is set as one of the\r
+ * uip options.\r
+ */\r
+static void prvSetupMACAddress( void );\r
+\r
+/*\r
+ * Configure the EMAC and AIC for EMAC interrupts.\r
+ */\r
+static void prvSetupEMACInterrupt( void );\r
+\r
+/*\r
+ * Some initialisation functions taken from the Atmel EMAC sample code.\r
+ */\r
+static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue );\r
+#if USE_RMII_INTERFACE != 1\r
+       static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue);\r
+#endif\r
+static portBASE_TYPE xGetLinkSpeed( void );\r
+static portBASE_TYPE prvProbePHY( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Buffer written to by the EMAC DMA.  Must be aligned as described by the\r
+comment above the emacADDRESS_MASK definition. */\r
+#pragma data_alignment=8\r
+static volatile portCHAR pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];\r
+\r
+/* Buffer read by the EMAC DMA.  Must be aligned as described by he comment\r
+above the emacADDRESS_MASK definition. */\r
+#pragma data_alignment=8\r
+static portCHAR pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];\r
+\r
+/* Descriptors used to communicate between the program and the EMAC peripheral.\r
+These descriptors hold the locations and state of the Rx and Tx buffers. */\r
+static volatile AT91S_TxTdDescriptor xTxDescriptors[ NB_TX_BUFFERS ];\r
+static volatile AT91S_RxTdDescriptor xRxDescriptors[ NB_RX_BUFFERS ];\r
+\r
+/* The IP and Ethernet addresses are read from the uIP setup. */\r
+const portCHAR cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };\r
+const unsigned char ucIPAddress[ 4 ]  = { uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 };\r
+\r
+/* The semaphore used by the EMAC ISR to wake the EMAC task. */\r
+static xSemaphoreHandle xSemaphore = NULL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+xSemaphoreHandle xEMACInit( void )\r
+{\r
+       /* Code supplied by Atmel -------------------------------*/\r
+\r
+       /* Disable pull up on RXDV => PHY normal mode (not in test mode),\r
+       PHY has internal pull down. */\r
+       AT91C_BASE_PIOB->PIO_PPUDR = 1 << 15;\r
+\r
+       #if USE_RMII_INTERFACE != 1\r
+               /* PHY has internal pull down : set MII mode. */\r
+               AT91C_BASE_PIOB->PIO_PPUDR = 1 << 16;\r
+       #endif\r
+\r
+       /* Clear PB18 <=> PHY powerdown. */\r
+       AT91C_BASE_PIOB->PIO_PER = 1 << 18;\r
+       AT91C_BASE_PIOB->PIO_OER = 1 << 18;\r
+       AT91C_BASE_PIOB->PIO_CODR = 1 << 18;\r
+\r
+       /* After PHY power up, hardware reset. */\r
+       AT91C_BASE_RSTC->RSTC_RMR = emacRESET_KEY | emacRESET_LENGTH;\r
+       AT91C_BASE_RSTC->RSTC_RCR = emacRESET_KEY | AT91C_RSTC_EXTRST;\r
+\r
+       /* Wait for hardware reset end. */\r
+       while( !( AT91C_BASE_RSTC->RSTC_RSR & AT91C_RSTC_NRSTL ) )\r
+       {\r
+               __asm volatile ( "NOP" );\r
+       }\r
+    __asm volatile ( "NOP" );\r
+\r
+       /* Setup the pins. */\r
+       AT91C_BASE_PIOB->PIO_ASR = emacPERIPHERAL_A_SETUP;\r
+       AT91C_BASE_PIOB->PIO_PDR = emacPERIPHERAL_A_SETUP;\r
+\r
+       /* Enable com between EMAC PHY.\r
+\r
+       Enable management port. */\r
+       AT91C_BASE_EMAC->EMAC_NCR |= AT91C_EMAC_MPE;    \r
+\r
+       /* MDC = MCK/32. */\r
+       AT91C_BASE_EMAC->EMAC_NCFGR |= ( 2 ) << 10;     \r
+\r
+       /* Wait for PHY auto init end (rather crude delay!). */\r
+       vTaskDelay( emacPHY_INIT_DELAY );\r
+\r
+       /* PHY configuration. */\r
+       #if USE_RMII_INTERFACE != 1\r
+       {\r
+               unsigned portLONG ulControl;\r
+\r
+               /* PHY has internal pull down : disable MII isolate. */\r
+               vReadPHY( AT91C_PHY_ADDR, MII_BMCR, &ulControl );\r
+               vReadPHY( AT91C_PHY_ADDR, MII_BMCR, &ulControl );\r
+               ulControl &= ~BMCR_ISOLATE;\r
+               vWritePHY( AT91C_PHY_ADDR, MII_BMCR, ulControl );\r
+       }\r
+       #endif\r
+\r
+       /* Disable management port again. */\r
+       AT91C_BASE_EMAC->EMAC_NCR &= ~AT91C_EMAC_MPE;\r
+\r
+       #if USE_RMII_INTERFACE != 1\r
+               /* Enable EMAC in MII mode, enable clock ERXCK and ETXCK. */\r
+               AT91C_BASE_EMAC->EMAC_USRIO = AT91C_EMAC_CLKEN ;\r
+       #else\r
+               /* Enable EMAC in RMII mode, enable RMII clock (50MHz from oscillator\r
+               on ERFCK). */\r
+               AT91C_BASE_EMAC->EMAC_USRIO = AT91C_EMAC_RMII | AT91C_EMAC_CLKEN ;\r
+       #endif\r
+\r
+       /* End of code supplied by Atmel ------------------------*/\r
+\r
+       /* Setup the buffers and descriptors. */\r
+       prvSetupDescriptors();\r
+       \r
+       /* Load our MAC address into the EMAC. */\r
+       prvSetupMACAddress();\r
+\r
+       /* Are we connected? */\r
+       if( prvProbePHY() )\r
+       {\r
+               /* Enable the interrupt! */\r
+               portENTER_CRITICAL();\r
+               {\r
+                       prvSetupEMACInterrupt();\r
+                       vPassEMACSemaphore( xSemaphore );\r
+               }\r
+               portEXIT_CRITICAL();\r
+       }\r
+\r
+       return xSemaphore;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+portLONG lEMACSend( void )\r
+{\r
+static unsigned portBASE_TYPE uxTxBufferIndex = 0;\r
+portBASE_TYPE xWaitCycles = 0;\r
+portLONG lReturn = pdPASS;\r
+portCHAR *pcBuffer;\r
+\r
+       /* Is a buffer available? */\r
+       while( !( xTxDescriptors[ uxTxBufferIndex ].U_Status.status & AT91C_TRANSMIT_OK ) )\r
+       {\r
+               /* There is no room to write the Tx data to the Tx buffer.  Wait a\r
+               short while, then try again. */\r
+               xWaitCycles++;\r
+               if( xWaitCycles > emacMAX_WAIT_CYCLES )\r
+               {\r
+                       /* Give up. */\r
+                       lReturn = pdFAIL;\r
+                       break;\r
+               }\r
+               else\r
+               {\r
+                       vTaskDelay( emacBUFFER_WAIT_DELAY );\r
+               }\r
+       }\r
+\r
+       /* lReturn will only be pdPASS if a buffer is available. */\r
+       if( lReturn == pdPASS )\r
+       {\r
+               /* Copy the headers into the Tx buffer.  These will be in the uIP buffer. */\r
+               pcBuffer = ( portCHAR * ) xTxDescriptors[ uxTxBufferIndex ].addr;\r
+               memcpy( ( void * ) pcBuffer, ( void * ) uip_buf, emacTOTAL_FRAME_HEADER_SIZE );\r
+\r
+               /* If there is room, also copy in the application data if any. */\r
+               if( ( uip_len > emacTOTAL_FRAME_HEADER_SIZE ) && ( uip_len <= ( ETH_TX_BUFFER_SIZE - emacTOTAL_FRAME_HEADER_SIZE ) ) )\r
+               {\r
+                       memcpy( ( void * ) &( pcBuffer[ emacTOTAL_FRAME_HEADER_SIZE ] ), ( void * ) uip_appdata, ( uip_len - emacTOTAL_FRAME_HEADER_SIZE ) );\r
+               }\r
+\r
+               /* Send. */     \r
+               portENTER_CRITICAL();\r
+               {\r
+                       if( uxTxBufferIndex >= ( NB_TX_BUFFERS - 1 ) )\r
+                       {\r
+                               /* Fill out the necessary in the descriptor to get the data sent. */\r
+                               xTxDescriptors[ uxTxBufferIndex ].U_Status.status =     ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )\r
+                                                                                                                                               | AT91C_LAST_BUFFER\r
+                                                                                                                                               | AT91C_TRANSMIT_WRAP;\r
+                               uxTxBufferIndex = 0;\r
+                       }\r
+                       else\r
+                       {\r
+                               /* Fill out the necessary in the descriptor to get the data sent. */\r
+                               xTxDescriptors[ uxTxBufferIndex ].U_Status.status =     ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )\r
+                                                                                                                                               | AT91C_LAST_BUFFER;\r
+                               uxTxBufferIndex++;\r
+                       }\r
+       \r
+                       AT91C_BASE_EMAC->EMAC_NCR |= AT91C_EMAC_TSTART;\r
+               }\r
+               portEXIT_CRITICAL();\r
+       }\r
+\r
+       return lReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+unsigned portLONG ulEMACPoll( void )\r
+{\r
+static unsigned portBASE_TYPE ulNextRxBuffer = 0;\r
+unsigned portLONG ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;\r
+portCHAR *pcSource;\r
+\r
+       /* Skip any fragments. */\r
+       while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !( xRxDescriptors[ ulNextRxBuffer ].U_Status.status & AT91C_SOF ) )\r
+       {\r
+               /* Mark the buffer as free again. */\r
+               xRxDescriptors[ ulNextRxBuffer ].addr &= ~( AT91C_OWNERSHIP_BIT );              \r
+               ulNextRxBuffer++;\r
+               if( ulNextRxBuffer >= NB_RX_BUFFERS )\r
+               {\r
+                       ulNextRxBuffer = 0;\r
+               }\r
+       }\r
+\r
+       /* Is there a packet ready? */\r
+\r
+       while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !ulSectionLength )\r
+       {\r
+               pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );\r
+               ulSectionLength = xRxDescriptors[ ulNextRxBuffer ].U_Status.status & emacRX_LENGTH_FRAME;\r
+\r
+               if( ulSectionLength == 0 )\r
+               {\r
+                       /* The frame is longer than the buffer pointed to by this\r
+                       descriptor so copy the entire buffer to uIP - then move onto\r
+                       the next descriptor to get the rest of the frame. */\r
+                       if( ( ulLengthSoFar + ETH_RX_BUFFER_SIZE ) <= UIP_BUFSIZE )\r
+                       {\r
+                               memcpy( &( uip_buf[ ulLengthSoFar ] ), pcSource, ETH_RX_BUFFER_SIZE );\r
+                               ulLengthSoFar += ETH_RX_BUFFER_SIZE;\r
+                       }                       \r
+               }\r
+               else\r
+               {\r
+                       /* This is the last section of the frame.  Copy the section to\r
+                       uIP. */\r
+                       if( ulSectionLength < UIP_BUFSIZE )\r
+                       {\r
+                               /* The section length holds the length of the entire frame.\r
+                               ulLengthSoFar holds the length of the frame sections already\r
+                               copied to uIP, so the length of the final section is\r
+                               ulSectionLength - ulLengthSoFar; */\r
+                               if( ulSectionLength > ulLengthSoFar )\r
+                               {\r
+                                       memcpy( &( uip_buf[ ulLengthSoFar ] ), pcSource, ( ulSectionLength - ulLengthSoFar ) );\r
+                               }\r
+                       }                       \r
+\r
+                       /* Is this the last buffer for the frame?  If not why? */\r
+                       ulEOF = xRxDescriptors[ ulNextRxBuffer ].U_Status.status & AT91C_EOF;\r
+               }\r
+\r
+               /* Mark the buffer as free again. */\r
+               xRxDescriptors[ ulNextRxBuffer ].addr &= ~( AT91C_OWNERSHIP_BIT );\r
+\r
+               /* Increment to the next buffer, wrapping if necessary. */\r
+               ulNextRxBuffer++;\r
+               if( ulNextRxBuffer >= NB_RX_BUFFERS )\r
+               {\r
+                       ulNextRxBuffer = 0;\r
+               }\r
+       }\r
+\r
+       /* If we obtained data but for some reason did not find the end of the\r
+       frame then discard the data as it must contain an error. */\r
+       if( !ulEOF )\r
+       {\r
+               ulSectionLength = 0;\r
+       }\r
+\r
+       return ulSectionLength;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupDescriptors(void)\r
+{\r
+unsigned portBASE_TYPE xIndex;\r
+unsigned portLONG ulAddress;\r
+\r
+       /* Initialise xRxDescriptors descriptor. */\r
+       for( xIndex = 0; xIndex < NB_RX_BUFFERS; ++xIndex )\r
+       {\r
+               /* Calculate the address of the nth buffer within the array. */\r
+               ulAddress = ( unsigned portLONG )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) );\r
+\r
+               /* Write the buffer address into the descriptor.  The DMA will place\r
+               the data at this address when this descriptor is being used.  Mask off\r
+               the bottom bits of the address as these have special meaning. */\r
+               xRxDescriptors[ xIndex ].addr = ulAddress & emacADDRESS_MASK;\r
+       }       \r
+\r
+       /* The last buffer has the wrap bit set so the EMAC knows to wrap back\r
+       to the first buffer. */\r
+       xRxDescriptors[ NB_RX_BUFFERS - 1 ].addr |= emacRX_WRAP_BIT;\r
+\r
+       /* Initialise xTxDescriptors. */\r
+       for( xIndex = 0; xIndex < NB_TX_BUFFERS; ++xIndex )\r
+       {\r
+               /* Calculate the address of the nth buffer within the array. */\r
+               ulAddress = ( unsigned portLONG )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) );\r
+\r
+               /* Write the buffer address into the descriptor.  The DMA will read\r
+               data from here when the descriptor is being used. */\r
+               xTxDescriptors[ xIndex ].addr = ulAddress & emacADDRESS_MASK;\r
+               xTxDescriptors[ xIndex ].U_Status.status = AT91C_TRANSMIT_OK;\r
+       }       \r
+\r
+       /* The last buffer has the wrap bit set so the EMAC knows to wrap back\r
+       to the first buffer. */\r
+       xTxDescriptors[ NB_TX_BUFFERS - 1 ].U_Status.status = AT91C_TRANSMIT_WRAP | AT91C_TRANSMIT_OK;\r
+\r
+       /* Tell the EMAC where to find the descriptors. */\r
+       AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned portLONG ) xRxDescriptors;\r
+       AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned portLONG ) xTxDescriptors;\r
+       \r
+       /* Clear all the bits in the receive status register. */\r
+       AT91C_BASE_EMAC->EMAC_RSR = ( AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA );\r
+\r
+       /* Enable the copy of data into the buffers, ignore broadcasts,\r
+       and don't copy FCS. */\r
+       AT91C_BASE_EMAC->EMAC_NCFGR |= ( AT91C_EMAC_CAF | AT91C_EMAC_NBC | AT91C_EMAC_DRFCS);\r
+\r
+       /* Enable Rx and Tx, plus the stats register. */\r
+       AT91C_BASE_EMAC->EMAC_NCR |= ( AT91C_EMAC_TE | AT91C_EMAC_RE | AT91C_EMAC_WESTAT );\r
+}      \r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupMACAddress( void )\r
+{\r
+       /* Must be written SA1L then SA1H. */\r
+       AT91C_BASE_EMAC->EMAC_SA1L =    ( ( unsigned portLONG ) cMACAddress[ 3 ] << 24 ) |\r
+                                                                       ( ( unsigned portLONG ) cMACAddress[ 2 ] << 16 ) |\r
+                                                                       ( ( unsigned portLONG ) cMACAddress[ 1 ] << 8  ) |\r
+                                                                       cMACAddress[ 0 ];\r
+\r
+       AT91C_BASE_EMAC->EMAC_SA1H =    ( ( unsigned portLONG ) cMACAddress[ 5 ] << 8 ) |\r
+                                                                       cMACAddress[ 4 ];\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupEMACInterrupt( void )\r
+{\r
+       /* Create the semaphore used to trigger the EMAC task. */\r
+       vSemaphoreCreateBinary( xSemaphore );\r
+       if( xSemaphore )\r
+       {\r
+               /* We start by 'taking' the semaphore so the ISR can 'give' it when the\r
+               first interrupt occurs. */\r
+               xSemaphoreTake( xSemaphore, emacNO_DELAY );\r
+               portENTER_CRITICAL();\r
+               {\r
+                       /* We want to interrupt on Rx events. */\r
+                       AT91C_BASE_EMAC->EMAC_IER = AT91C_EMAC_RCOMP;\r
+\r
+                       /* Enable the interrupts in the AIC. */\r
+                       AT91F_AIC_ConfigureIt( AT91C_ID_EMAC, emacINTERRUPT_LEVEL, AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, ( void (*)( void ) ) vEMACISR_Wrapper );\r
+                       AT91C_BASE_AIC->AIC_IECR = 0x1 << AT91C_ID_EMAC;\r
+               }\r
+               portEXIT_CRITICAL();\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+\r
+\r
+\r
+/*\r
+ * The following functions are initialisation functions taken from the Atmel\r
+ * EMAC sample code.\r
+ */\r
+\r
+static portBASE_TYPE prvProbePHY( void )\r
+{\r
+unsigned portLONG ulPHYId1, ulPHYId2, ulStatus;\r
+portBASE_TYPE xReturn = pdPASS;\r
+       \r
+       /* Code supplied by Atmel (reformatted) -----------------*/\r
+\r
+       /* Enable management port */\r
+       AT91C_BASE_EMAC->EMAC_NCR |= AT91C_EMAC_MPE;    \r
+       AT91C_BASE_EMAC->EMAC_NCFGR |= ( 2 ) << 10;\r
+\r
+       /* Read the PHY ID. */\r
+       vReadPHY( AT91C_PHY_ADDR, MII_PHYSID1, &ulPHYId1 );\r
+       vReadPHY( AT91C_PHY_ADDR, MII_PHYSID2, &ulPHYId2 );\r
+\r
+       /* AMD AM79C875:\r
+                       PHY_ID1 = 0x0022\r
+                       PHY_ID2 = 0x5541\r
+                       Bits 3:0 Revision Number Four bit manufacturer\92s revision number.\r
+                               0001 stands for Rev. A, etc.\r
+       */\r
+       if( ( ( ulPHYId1 << 16 ) | ( ulPHYId2 & 0xfff0 ) ) != MII_DM9161_ID )\r
+       {\r
+               /* Did not expect this ID. */\r
+               xReturn = pdFAIL;\r
+       }\r
+       else\r
+       {\r
+               ulStatus = xGetLinkSpeed();\r
+\r
+               if( ulStatus != pdPASS )\r
+               {\r
+                       xReturn = pdFAIL;\r
+               }\r
+       }\r
+\r
+       /* Disable management port */\r
+       AT91C_BASE_EMAC->EMAC_NCR &= ~AT91C_EMAC_MPE;   \r
+\r
+       /* End of code supplied by Atmel ------------------------*/\r
+\r
+       return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue )\r
+{\r
+       /* Code supplied by Atmel (reformatted) ----------------------*/\r
+\r
+       AT91C_BASE_EMAC->EMAC_MAN =     (AT91C_EMAC_SOF & (0x01<<30))\r
+                                                                       | (2 << 16) | (2 << 28)\r
+                                                                       | ((ucPHYAddress & 0x1f) << 23)\r
+                                                                       | (ucAddress << 18);\r
+\r
+       /* Wait until IDLE bit in Network Status register is cleared. */\r
+       while( !( AT91C_BASE_EMAC->EMAC_NSR & AT91C_EMAC_IDLE ) )\r
+       {\r
+               __asm( "NOP" );\r
+       }\r
+\r
+       *pulValue = ( AT91C_BASE_EMAC->EMAC_MAN & 0x0000ffff ); \r
+\r
+       /* End of code supplied by Atmel ------------------------*/\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+#if USE_RMII_INTERFACE != 1\r
+static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue )\r
+{\r
+       /* Code supplied by Atmel (reformatted) ----------------------*/\r
+\r
+       AT91C_BASE_EMAC->EMAC_MAN = (( AT91C_EMAC_SOF & (0x01<<30))\r
+                                                               | (2 << 16) | (1 << 28)\r
+                                                               | ((ucPHYAddress & 0x1f) << 23)\r
+                                                               | (ucAddress << 18))\r
+                                                               | (ulValue & 0xffff);\r
+\r
+       /* Wait until IDLE bit in Network Status register is cleared */\r
+       while( !( AT91C_BASE_EMAC->EMAC_NSR & AT91C_EMAC_IDLE ) )\r
+       {\r
+               __asm( "NOP" );\r
+       };\r
+\r
+       /* End of code supplied by Atmel ------------------------*/\r
+}\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE xGetLinkSpeed( void )\r
+{\r
+       unsigned portLONG ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex;\r
+\r
+       /* Code supplied by Atmel (reformatted) -----------------*/\r
+\r
+       /* Link status is latched, so read twice to get current value */\r
+       vReadPHY(AT91C_PHY_ADDR, MII_BMSR, &ulBMSR);\r
+       vReadPHY(AT91C_PHY_ADDR, MII_BMSR, &ulBMSR);\r
+\r
+       if( !( ulBMSR & BMSR_LSTATUS ) )\r
+       {       \r
+               /* No Link. */\r
+               return pdFAIL;\r
+       }\r
+\r
+       vReadPHY(AT91C_PHY_ADDR, MII_BMCR, &ulBMCR);\r
+       if (ulBMCR & BMCR_ANENABLE)\r
+       {                               \r
+               /* AutoNegotiation is enabled. */\r
+               if (!(ulBMSR & BMSR_ANEGCOMPLETE))\r
+               {\r
+                       /* Auto-negotiation in progress. */\r
+                       return pdFAIL;                          \r
+               }               \r
+\r
+               vReadPHY(AT91C_PHY_ADDR, MII_LPA, &ulLPA);\r
+               if( ( ulLPA & LPA_100FULL ) || ( ulLPA & LPA_100HALF ) )\r
+               {\r
+                       ulSpeed = SPEED_100;\r
+               }\r
+               else\r
+               {\r
+                       ulSpeed = SPEED_10;\r
+               }\r
+\r
+               if( ( ulLPA & LPA_100FULL ) || ( ulLPA & LPA_10FULL ) )\r
+               {\r
+                       ulDuplex = DUPLEX_FULL;\r
+               }\r
+               else\r
+               {\r
+                       ulDuplex = DUPLEX_HALF;\r
+               }\r
+       }\r
+       else\r
+       {\r
+               ulSpeed = ( ulBMCR & BMCR_SPEED100 ) ? SPEED_100 : SPEED_10;\r
+               ulDuplex = ( ulBMCR & BMCR_FULLDPLX ) ? DUPLEX_FULL : DUPLEX_HALF;\r
+       }\r
+\r
+       /* Update the MAC */\r
+       ulMACCfg = AT91C_BASE_EMAC->EMAC_NCFGR & ~( AT91C_EMAC_SPD | AT91C_EMAC_FD );\r
+       if( ulSpeed == SPEED_100 )\r
+       {\r
+               if( ulDuplex == DUPLEX_FULL )\r
+               {\r
+                       /* 100 Full Duplex */\r
+                       AT91C_BASE_EMAC->EMAC_NCFGR = ulMACCfg | AT91C_EMAC_SPD | AT91C_EMAC_FD;\r
+               }\r
+               else\r
+               {                                       \r
+                       /* 100 Half Duplex */\r
+                       AT91C_BASE_EMAC->EMAC_NCFGR = ulMACCfg | AT91C_EMAC_SPD;\r
+               }\r
+       }\r
+       else\r
+       {\r
+               if (ulDuplex == DUPLEX_FULL)\r
+               {\r
+                       /* 10 Full Duplex */\r
+                       AT91C_BASE_EMAC->EMAC_NCFGR = ulMACCfg | AT91C_EMAC_FD;\r
+               }\r
+               else\r
+               {\r
+                       /* 10 Half Duplex */\r
+                       AT91C_BASE_EMAC->EMAC_NCFGR = ulMACCfg;\r
+               }\r
+       }\r
+\r
+       /* End of code supplied by Atmel ------------------------*/\r
+\r
+       return pdPASS;\r
+}\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/SAM7_EMAC.h
new file mode 100644 (file)
index 0000000..3231488
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+#ifndef SAM_7_EMAC_H\r
+#define SAM_7_EMAC_H\r
+\r
+\r
+/*\r
+ * Initialise the EMAC driver.  If successful a semaphore is returned that\r
+ * is used by the EMAC ISR to indicate that Rx packets have been received.\r
+ * If the initialisation fails then NULL is returned.\r
+ */\r
+xSemaphoreHandle xEMACInit( void );\r
+\r
+/*\r
+ * Send the current uIP buffer.  This copies the uIP buffer to one of the\r
+ * EMAC Tx buffers, then indicates to the EMAC that the buffer is ready.\r
+ */\r
+portLONG lEMACSend( void );\r
+\r
+/*\r
+ * Called in response to an EMAC Rx interrupt.  Copies the received frame\r
+ * into the uIP buffer.\r
+ */\r
+unsigned portLONG ulEMACPoll( void );\r
+\r
+#endif\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/clock-arch.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/clock-arch.h
new file mode 100644 (file)
index 0000000..cde657b
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (c) 2006, Swedish Institute of Computer Science.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. Neither the name of the Institute nor the names of its contributors\r
+ *    may be used to endorse or promote products derived from this software\r
+ *    without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE\r
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+ * SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack\r
+ *\r
+ * $Id: clock-arch.h,v 1.2 2006/06/12 08:00:31 adam Exp $\r
+ */\r
+\r
+#ifndef __CLOCK_ARCH_H__\r
+#define __CLOCK_ARCH_H__\r
+\r
+#include "FreeRTOS.h"\r
+\r
+typedef unsigned long clock_time_t;\r
+#define CLOCK_CONF_SECOND configTICK_RATE_HZ\r
+\r
+#endif /* __CLOCK_ARCH_H__ */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/emac_atmel.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/emac_atmel.h
new file mode 100644 (file)
index 0000000..7551a36
--- /dev/null
@@ -0,0 +1,195 @@
+//*----------------------------------------------------------------------------\r
+//*         ATMEL Microcontroller Software Support  -  ROUSSET  -\r
+//*----------------------------------------------------------------------------\r
+//* The software is delivered "AS IS" without warranty or condition of any\r
+//* kind, either express, implied or statutory. This includes without\r
+//* limitation any warranty or condition with respect to merchantability or\r
+//* fitness for any particular purpose, or against the infringements of\r
+//* intellectual property rights of others.\r
+//*----------------------------------------------------------------------------\r
+//* File Name           : Emac.h\r
+//* Object              : Emac header file\r
+//* Creation            : Hi   11/18/2002\r
+//*\r
+//*----------------------------------------------------------------------------\r
+#ifndef AT91C_EMAC_H\r
+#define AT91C_EMAC_H\r
+\r
+\r
+//* Allows to display all IP header in the main.c\r
+//* If not defined, only ICMP packets are displayed\r
+#define AT91C_DISPLAY_ALL_IPHEADER             0\r
+\r
+#define NB_RX_BUFFERS                  25                      //* Number of receive buffers\r
+#define ETH_RX_BUFFER_SIZE             128         //*\r
+\r
+#define NB_TX_BUFFERS                  2               //* Number of Transmit buffers\r
+#define ETH_TX_BUFFER_SIZE             UIP_BUFSIZE       //*\r
+\r
+#define AT91C_NO_IPPACKET              0\r
+#define AT91C_IPPACKET         1\r
+\r
+#define ARP_REQUEST                            0x0001\r
+#define ARP_REPLY                              0x0002\r
+#define PROT_ARP                               0x0806\r
+#define PROT_IP                                        0x0800\r
+#define PROT_ICMP                              0x01\r
+#define ICMP_ECHO_REQUEST              0x08\r
+#define ICMP_ECHO_REPLY                        0x00\r
+\r
+#define AT91C_EMAC_CLKEN 0x2\r
+#define SWAP16(x)      (((x & 0xff) << 8) | (x >> 8))\r
+\r
+#if 0\r
+//* Transfer descriptor structure\r
+typedef struct _AT91S_TdDescriptor {\r
+       unsigned int addr;\r
+       unsigned int status;\r
+}AT91S_TdDescriptor, *AT91PS_TdDescriptor;\r
+#endif\r
+\r
+//* Receive Transfer descriptor structure\r
+typedef struct  _AT91S_RxTdDescriptor {\r
+       unsigned int addr;\r
+       union\r
+       {\r
+               unsigned int status;\r
+               struct {\r
+                       unsigned int Length:11;\r
+                       unsigned int Res0:1;\r
+                       unsigned int Rxbuf_off:2;\r
+                       unsigned int StartOfFrame:1;\r
+                       unsigned int EndOfFrame:1;\r
+                       unsigned int Cfi:1;\r
+                       unsigned int VlanPriority:3;\r
+                       unsigned int PriorityTag:1;\r
+                       unsigned int VlanTag:1;\r
+                       unsigned int TypeID:1;\r
+                       unsigned int Sa4Match:1;\r
+                       unsigned int Sa3Match:1;\r
+                       unsigned int Sa2Match:1;\r
+                       unsigned int Sa1Match:1;\r
+                       unsigned int Res1:1;\r
+                       unsigned int ExternalAdd:1;\r
+                       unsigned int UniCast:1;\r
+                       unsigned int MultiCast:1;\r
+                       unsigned int BroadCast:1;\r
+               }S_Status;              \r
+       }U_Status;\r
+}AT91S_RxTdDescriptor, *AT91PS_RxTdDescriptor;\r
+\r
+\r
+//* Transmit Transfer descriptor structure\r
+typedef struct _AT91S_TxTdDescriptor {\r
+       unsigned int addr;\r
+       union\r
+       {\r
+               unsigned int status;\r
+               struct {\r
+                       unsigned int Length:11;\r
+                       unsigned int Res0:4;\r
+                       unsigned int LastBuff:1;\r
+                       unsigned int NoCrc:1;\r
+                       unsigned int Res1:10;\r
+                       unsigned int BufExhausted:1;\r
+                       unsigned int TransmitUnderrun:1;\r
+                       unsigned int TransmitError:1;\r
+                       unsigned int Wrap:1;\r
+                       unsigned int BuffUsed:1;\r
+               }S_Status;              \r
+       }U_Status;\r
+}AT91S_TxTdDescriptor, *AT91PS_TxTdDescriptor;\r
+\r
+#define AT91C_OWNERSHIP_BIT            0x00000001\r
+\r
+/* Receive status defintion */\r
+#define AT91C_BROADCAST_ADDR   ((unsigned int) (1 << 31))      //* Broadcat address detected\r
+#define AT91C_MULTICAST_HASH   ((unsigned int) (1 << 30))      //* MultiCast hash match\r
+#define AT91C_UNICAST_HASH         ((unsigned int) (1 << 29))  //* UniCast hash match\r
+#define AT91C_EXTERNAL_ADDR        ((unsigned int) (1 << 28))  //* External Address match\r
+#define AT91C_SA1_ADDR         ((unsigned int) (1 << 26))      //* Specific address 1 match\r
+#define AT91C_SA2_ADDR         ((unsigned int) (1 << 25))      //* Specific address 2 match\r
+#define AT91C_SA3_ADDR         ((unsigned int) (1 << 24))      //* Specific address 3 match\r
+#define AT91C_SA4_ADDR         ((unsigned int) (1 << 23))      //* Specific address 4 match\r
+#define AT91C_TYPE_ID          ((unsigned int) (1 << 22))      //* Type ID match\r
+#define AT91C_VLAN_TAG         ((unsigned int) (1 << 21))      //* VLAN tag detected\r
+#define AT91C_PRIORITY_TAG     ((unsigned int) (1 << 20))      //* PRIORITY tag detected\r
+#define AT91C_VLAN_PRIORITY            ((unsigned int) (7 << 17))  //* PRIORITY Mask\r
+#define AT91C_CFI_IND          ((unsigned int) (1 << 16))  //* CFI indicator\r
+#define AT91C_EOF              ((unsigned int) (1 << 15))  //* EOF\r
+#define AT91C_SOF              ((unsigned int) (1 << 14))  //* SOF\r
+#define AT91C_RBF_OFFSET       ((unsigned int) (3 << 12))  //* Receive Buffer Offset Mask\r
+#define AT91C_LENGTH_FRAME             ((unsigned int) 0x07FF)     //* Length of frame\r
+\r
+/* Transmit Status definition */\r
+#define AT91C_TRANSMIT_OK              ((unsigned int) (1 << 31))      //*\r
+#define AT91C_TRANSMIT_WRAP            ((unsigned int) (1 << 30))      //* Wrap bit: mark the last descriptor\r
+#define AT91C_TRANSMIT_ERR             ((unsigned int) (1 << 29))      //* RLE:transmit error\r
+#define AT91C_TRANSMIT_UND             ((unsigned int) (1 << 28))      //* Transmit Underrun\r
+#define AT91C_BUF_EX                   ((unsigned int) (1 << 27))      //* Buffers exhausted in mid frame\r
+#define AT91C_TRANSMIT_NO_CRC  ((unsigned int) (1 << 16))      //* No CRC will be appended to the current frame\r
+#define AT91C_LAST_BUFFER      ((unsigned int) (1 << 15))      //*\r
+\r
+#define ARP_ETHER                      1               /* Ethernet  hardware address   */\r
+#define ARPOP_REQUEST          1               /* Request  to resolve  address */\r
+#define ARPOP_REPLY            2               /* Response to previous request */\r
+#define RARPOP_REQUEST         3               /* Request  to resolve  address */\r
+#define RARPOP_REPLY       4           /* Response to previous request */\r
+\r
+\r
+typedef struct _AT91S_EthHdr\r
+{\r
+       unsigned char           et_dest[6];     /* Destination node             */\r
+       unsigned char           et_src[6];      /* Source node                  */\r
+       unsigned short          et_protlen;     /* Protocol or length           */\r
+} AT91S_EthHdr, *AT91PS_EthHdr;\r
+\r
+typedef struct _AT91S_ArpHdr\r
+{\r
+       unsigned short          ar_hrd;         /* Format of hardware address   */\r
+       unsigned short          ar_pro;         /* Format of protocol address   */\r
+       unsigned char           ar_hln;         /* Length of hardware address   */\r
+       unsigned char           ar_pln;         /* Length of protocol address   */\r
+       unsigned short          ar_op;          /* Operation                    */\r
+       unsigned char           ar_sha[6];      /* Sender hardware address      */\r
+       unsigned char           ar_spa[4];      /* Sender protocol address      */\r
+       unsigned char           ar_tha[6];      /* Target hardware address      */\r
+       unsigned char           ar_tpa[4];      /* Target protocol address      */\r
+} AT91S_ArpHdr, *AT91PS_ArpHdr;\r
+\r
+//* IP Header structure\r
+typedef struct _AT91S_IPheader {\r
+       unsigned char   ip_hl_v;        /* header length and version    */\r
+       unsigned char   ip_tos;         /* type of service              */\r
+       unsigned short  ip_len;         /* total length                 */\r
+       unsigned short  ip_id;          /* identification               */\r
+       unsigned short  ip_off;         /* fragment offset field        */\r
+       unsigned char   ip_ttl;         /* time to live                 */\r
+       unsigned char   ip_p;           /* protocol                     */\r
+       unsigned short  ip_sum;         /* checksum                     */\r
+       unsigned char   ip_src[4];      /* Source IP address            */\r
+       unsigned char   ip_dst[4];      /* Destination IP address       */\r
+       unsigned short  udp_src;        /* UDP source port              */\r
+       unsigned short  udp_dst;        /* UDP destination port         */\r
+       unsigned short  udp_len;        /* Length of UDP packet         */\r
+       unsigned short  udp_xsum;       /* Checksum                     */\r
+} AT91S_IPheader, *AT91PS_IPheader;\r
+\r
+//* ICMP echo header structure\r
+typedef struct _AT91S_IcmpEchoHdr {\r
+    unsigned char   type;       /* type of message */\r
+    unsigned char   code;       /* type subcode */\r
+    unsigned short  cksum;      /* ones complement cksum of struct */\r
+    unsigned short  id;         /* identifier */\r
+    unsigned short  seq;        /* sequence number */\r
+}AT91S_IcmpEchoHdr, *AT91PS_IcmpEchoHdr;\r
+\r
+\r
+typedef struct _AT91S_EthPack\r
+{\r
+       AT91S_EthHdr    EthHdr;\r
+       AT91S_ArpHdr    ArpHdr;\r
+} AT91S_EthPack, *AT91PS_EthPack;\r
+\r
+\r
+#endif //* AT91C_EMAC_H\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings
new file mode 100644 (file)
index 0000000..0d3c30c
--- /dev/null
@@ -0,0 +1,35 @@
+http_http "http://"\r
+http_200 "200 "\r
+http_301 "301 "\r
+http_302 "302 "\r
+http_get "GET "\r
+http_10 "HTTP/1.0"\r
+http_11 "HTTP/1.1"\r
+http_content_type "content-type: "\r
+http_texthtml "text/html"\r
+http_location "location: "\r
+http_host "host: "\r
+http_crnl "\r\n"\r
+http_index_html "/index.html"\r
+http_404_html "/404.html"\r
+http_referer "Referer:"\r
+http_header_200 "HTTP/1.0 200 OK\r\nServer: uIP/1.0 http://www.sics.se/~adam/uip/\r\nConnection: close\r\n"\r
+http_header_404 "HTTP/1.0 404 Not found\r\nServer: uIP/1.0 http://www.sics.se/~adam/uip/\r\nConnection: close\r\n"\r
+http_content_type_plain "Content-type: text/plain\r\n\r\n"\r
+http_content_type_html "Content-type: text/html\r\n\r\n"\r
+http_content_type_css  "Content-type: text/css\r\n\r\n"\r
+http_content_type_text "Content-type: text/text\r\n\r\n"\r
+http_content_type_png  "Content-type: image/png\r\n\r\n"\r
+http_content_type_gif  "Content-type: image/gif\r\n\r\n"\r
+http_content_type_jpg  "Content-type: image/jpeg\r\n\r\n"\r
+http_content_type_binary "Content-type: application/octet-stream\r\n\r\n"\r
+http_html ".html"\r
+http_shtml ".shtml"\r
+http_htm ".htm"\r
+http_css ".css"\r
+http_png ".png"\r
+http_gif ".gif"\r
+http_jpg ".jpg"\r
+http_text ".txt"\r
+http_txt ".txt"\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings.c
new file mode 100644 (file)
index 0000000..ef7a41c
--- /dev/null
@@ -0,0 +1,102 @@
+const char http_http[8] = \r
+/* "http://" */\r
+{0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, };\r
+const char http_200[5] = \r
+/* "200 " */\r
+{0x32, 0x30, 0x30, 0x20, };\r
+const char http_301[5] = \r
+/* "301 " */\r
+{0x33, 0x30, 0x31, 0x20, };\r
+const char http_302[5] = \r
+/* "302 " */\r
+{0x33, 0x30, 0x32, 0x20, };\r
+const char http_get[5] = \r
+/* "GET " */\r
+{0x47, 0x45, 0x54, 0x20, };\r
+const char http_10[9] = \r
+/* "HTTP/1.0" */\r
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, };\r
+const char http_11[9] = \r
+/* "HTTP/1.1" */\r
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, };\r
+const char http_content_type[15] = \r
+/* "content-type: " */\r
+{0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, };\r
+const char http_texthtml[10] = \r
+/* "text/html" */\r
+{0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, };\r
+const char http_location[11] = \r
+/* "location: " */\r
+{0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, };\r
+const char http_host[7] = \r
+/* "host: " */\r
+{0x68, 0x6f, 0x73, 0x74, 0x3a, 0x20, };\r
+const char http_crnl[3] = \r
+/* "\r\n" */\r
+{0xd, 0xa, };\r
+const char http_index_html[12] = \r
+/* "/index.html" */\r
+{0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, };\r
+const char http_404_html[10] = \r
+/* "/404.html" */\r
+{0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, };\r
+const char http_referer[9] = \r
+/* "Referer:" */\r
+{0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x3a, };\r
+const char http_header_200[84] = \r
+/* "HTTP/1.0 200 OK\r\nServer: uIP/1.0 http://www.sics.se/~adam/uip/\r\nConnection: close\r\n" */\r
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69, 0x70, 0x2f, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, };\r
+const char http_header_404[91] = \r
+/* "HTTP/1.0 404 Not found\r\nServer: uIP/1.0 http://www.sics.se/~adam/uip/\r\nConnection: close\r\n" */\r
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x34, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0xd, 0xa, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x75, 0x49, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x7e, 0x61, 0x64, 0x61, 0x6d, 0x2f, 0x75, 0x69, 0x70, 0x2f, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, };\r
+const char http_content_type_plain[29] = \r
+/* "Content-type: text/plain\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_html[28] = \r
+/* "Content-type: text/html\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_css [27] = \r
+/* "Content-type: text/css\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_text[28] = \r
+/* "Content-type: text/text\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x74, 0x65, 0x78, 0x74, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_png [28] = \r
+/* "Content-type: image/png\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_gif [28] = \r
+/* "Content-type: image/gif\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_jpg [29] = \r
+/* "Content-type: image/jpeg\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x65, 0x67, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_content_type_binary[43] = \r
+/* "Content-type: application/octet-stream\r\n\r\n" */\r
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xd, 0xa, 0xd, 0xa, };\r
+const char http_html[6] = \r
+/* ".html" */\r
+{0x2e, 0x68, 0x74, 0x6d, 0x6c, };\r
+const char http_shtml[7] = \r
+/* ".shtml" */\r
+{0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, };\r
+const char http_htm[5] = \r
+/* ".htm" */\r
+{0x2e, 0x68, 0x74, 0x6d, };\r
+const char http_css[5] = \r
+/* ".css" */\r
+{0x2e, 0x63, 0x73, 0x73, };\r
+const char http_png[5] = \r
+/* ".png" */\r
+{0x2e, 0x70, 0x6e, 0x67, };\r
+const char http_gif[5] = \r
+/* ".gif" */\r
+{0x2e, 0x67, 0x69, 0x66, };\r
+const char http_jpg[5] = \r
+/* ".jpg" */\r
+{0x2e, 0x6a, 0x70, 0x67, };\r
+const char http_text[5] = \r
+/* ".txt" */\r
+{0x2e, 0x74, 0x78, 0x74, };\r
+const char http_txt[5] = \r
+/* ".txt" */\r
+{0x2e, 0x74, 0x78, 0x74, };\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/http-strings.h
new file mode 100644 (file)
index 0000000..acbe7e1
--- /dev/null
@@ -0,0 +1,34 @@
+extern const char http_http[8];\r
+extern const char http_200[5];\r
+extern const char http_301[5];\r
+extern const char http_302[5];\r
+extern const char http_get[5];\r
+extern const char http_10[9];\r
+extern const char http_11[9];\r
+extern const char http_content_type[15];\r
+extern const char http_texthtml[10];\r
+extern const char http_location[11];\r
+extern const char http_host[7];\r
+extern const char http_crnl[3];\r
+extern const char http_index_html[12];\r
+extern const char http_404_html[10];\r
+extern const char http_referer[9];\r
+extern const char http_header_200[84];\r
+extern const char http_header_404[91];\r
+extern const char http_content_type_plain[29];\r
+extern const char http_content_type_html[28];\r
+extern const char http_content_type_css [27];\r
+extern const char http_content_type_text[28];\r
+extern const char http_content_type_png [28];\r
+extern const char http_content_type_gif [28];\r
+extern const char http_content_type_jpg [29];\r
+extern const char http_content_type_binary[43];\r
+extern const char http_html[6];\r
+extern const char http_shtml[7];\r
+extern const char http_htm[5];\r
+extern const char http_css[5];\r
+extern const char http_png[5];\r
+extern const char http_gif[5];\r
+extern const char http_jpg[5];\r
+extern const char http_text[5];\r
+extern const char http_txt[5];\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.c
new file mode 100644 (file)
index 0000000..43b7afb
--- /dev/null
@@ -0,0 +1,268 @@
+/**\r
+ * \addtogroup httpd\r
+ * @{\r
+ */\r
+\r
+/**\r
+ * \file\r
+ *         Web server script interface\r
+ * \author\r
+ *         Adam Dunkels <adam@sics.se>\r
+ *\r
+ */\r
+\r
+/*\r
+ * Copyright (c) 2001-2006, Adam Dunkels.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote\r
+ *    products derived from this software without specific prior\r
+ *    written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack.\r
+ *\r
+ * $Id: httpd-cgi.c,v 1.2 2006/06/11 21:46:37 adam Exp $\r
+ *\r
+ */\r
+\r
+#include "uip.h"\r
+#include "psock.h"\r
+#include "httpd.h"\r
+#include "httpd-cgi.h"\r
+#include "httpd-fs.h"\r
+\r
+#include <stdio.h>\r
+#include <string.h>\r
+\r
+HTTPD_CGI_CALL(file, "file-stats", file_stats);\r
+HTTPD_CGI_CALL(tcp, "tcp-connections", tcp_stats);\r
+HTTPD_CGI_CALL(net, "net-stats", net_stats);\r
+HTTPD_CGI_CALL(rtos, "rtos-stats", rtos_stats );\r
+HTTPD_CGI_CALL(io, "led-io", led_io );\r
+\r
+\r
+static const struct httpd_cgi_call *calls[] = { &file, &tcp, &net, &rtos, &io, NULL };\r
+\r
+/*---------------------------------------------------------------------------*/\r
+static\r
+PT_THREAD(nullfunction(struct httpd_state *s, char *ptr))\r
+{\r
+  PSOCK_BEGIN(&s->sout);\r
+  PSOCK_END(&s->sout);\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+httpd_cgifunction\r
+httpd_cgi(char *name)\r
+{\r
+  const struct httpd_cgi_call **f;\r
+\r
+  /* Find the matching name in the table, return the function. */\r
+  for(f = calls; *f != NULL; ++f) {\r
+    if(strncmp((*f)->name, name, strlen((*f)->name)) == 0) {\r
+      return (*f)->function;\r
+    }\r
+  }\r
+  return nullfunction;\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+static unsigned short\r
+generate_file_stats(void *arg)\r
+{\r
+  char *f = (char *)arg;\r
+  return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE, "%5u", httpd_fs_count(f));\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+static\r
+PT_THREAD(file_stats(struct httpd_state *s, char *ptr))\r
+{\r
+  PSOCK_BEGIN(&s->sout);\r
+\r
+  PSOCK_GENERATOR_SEND(&s->sout, generate_file_stats, strchr(ptr, ' ') + 1);\r
+  \r
+  PSOCK_END(&s->sout);\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+static const char closed[] =   /*  "CLOSED",*/\r
+{0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0};\r
+static const char syn_rcvd[] = /*  "SYN-RCVD",*/\r
+{0x53, 0x59, 0x4e, 0x2d, 0x52, 0x43, 0x56,\r
+ 0x44,  0};\r
+static const char syn_sent[] = /*  "SYN-SENT",*/\r
+{0x53, 0x59, 0x4e, 0x2d, 0x53, 0x45, 0x4e,\r
+ 0x54,  0};\r
+static const char established[] = /*  "ESTABLISHED",*/\r
+{0x45, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x49, 0x53, 0x48,\r
+ 0x45, 0x44, 0};\r
+static const char fin_wait_1[] = /*  "FIN-WAIT-1",*/\r
+{0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49,\r
+ 0x54, 0x2d, 0x31, 0};\r
+static const char fin_wait_2[] = /*  "FIN-WAIT-2",*/\r
+{0x46, 0x49, 0x4e, 0x2d, 0x57, 0x41, 0x49,\r
+ 0x54, 0x2d, 0x32, 0};\r
+static const char closing[] = /*  "CLOSING",*/\r
+{0x43, 0x4c, 0x4f, 0x53, 0x49,\r
+ 0x4e, 0x47, 0};\r
+static const char time_wait[] = /*  "TIME-WAIT,"*/\r
+{0x54, 0x49, 0x4d, 0x45, 0x2d, 0x57, 0x41,\r
+ 0x49, 0x54, 0};\r
+static const char last_ack[] = /*  "LAST-ACK"*/\r
+{0x4c, 0x41, 0x53, 0x54, 0x2d, 0x41, 0x43,\r
+ 0x4b, 0};\r
+\r
+static const char *states[] = {\r
+  closed,\r
+  syn_rcvd,\r
+  syn_sent,\r
+  established,\r
+  fin_wait_1,\r
+  fin_wait_2,\r
+  closing,\r
+  time_wait,\r
+  last_ack};\r
+  \r
+\r
+static unsigned short\r
+generate_tcp_stats(void *arg)\r
+{\r
+  struct uip_conn *conn;\r
+  struct httpd_state *s = (struct httpd_state *)arg;\r
+    \r
+  conn = &uip_conns[s->count];\r
+  return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE,\r
+                "<tr><td>%d</td><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",\r
+                htons(conn->lport),\r
+                htons(conn->ripaddr[0]) >> 8,\r
+                htons(conn->ripaddr[0]) & 0xff,\r
+                htons(conn->ripaddr[1]) >> 8,\r
+                htons(conn->ripaddr[1]) & 0xff,\r
+                htons(conn->rport),\r
+                states[conn->tcpstateflags & UIP_TS_MASK],\r
+                conn->nrtx,\r
+                conn->timer,\r
+                (uip_outstanding(conn))? '*':' ',\r
+                (uip_stopped(conn))? '!':' ');\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+static\r
+PT_THREAD(tcp_stats(struct httpd_state *s, char *ptr))\r
+{\r
+  \r
+  PSOCK_BEGIN(&s->sout);\r
+\r
+  for(s->count = 0; s->count < UIP_CONNS; ++s->count) {\r
+    if((uip_conns[s->count].tcpstateflags & UIP_TS_MASK) != UIP_CLOSED) {\r
+      PSOCK_GENERATOR_SEND(&s->sout, generate_tcp_stats, s);\r
+    }\r
+  }\r
+\r
+  PSOCK_END(&s->sout);\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+static unsigned short\r
+generate_net_stats(void *arg)\r
+{\r
+  struct httpd_state *s = (struct httpd_state *)arg;\r
+  return snprintf((char *)uip_appdata, UIP_APPDATA_SIZE,\r
+                 "%5u\n", ((uip_stats_t *)&uip_stat)[s->count]);\r
+}\r
+\r
+static\r
+PT_THREAD(net_stats(struct httpd_state *s, char *ptr))\r
+{\r
+  PSOCK_BEGIN(&s->sout);\r
+\r
+#if UIP_STATISTICS\r
+\r
+  for(s->count = 0; s->count < sizeof(uip_stat) / sizeof(uip_stats_t);\r
+      ++s->count) {\r
+    PSOCK_GENERATOR_SEND(&s->sout, generate_net_stats, s);\r
+  }\r
+  \r
+#endif /* UIP_STATISTICS */\r
+  \r
+  PSOCK_END(&s->sout);\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+\r
+extern void vTaskList( signed char *pcWriteBuffer );\r
+static char cCountBuf[ 32 ];\r
+long lRefreshCount = 0;\r
+static unsigned short\r
+generate_rtos_stats(void *arg)\r
+{\r
+       lRefreshCount++;\r
+       sprintf( cCountBuf, "<p><br>Refresh count = %ld", lRefreshCount );\r
+    vTaskList( uip_appdata );\r
+       strcat( uip_appdata, cCountBuf );\r
+  \r
+       return strlen( uip_appdata );\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+\r
+\r
+static\r
+PT_THREAD(rtos_stats(struct httpd_state *s, char *ptr))\r
+{\r
+  PSOCK_BEGIN(&s->sout);\r
+  PSOCK_GENERATOR_SEND(&s->sout, generate_rtos_stats, NULL);  \r
+  PSOCK_END(&s->sout);\r
+}\r
+/*---------------------------------------------------------------------------*/\r
+\r
+char *pcStatus;\r
+unsigned long ulString;\r
+extern unsigned long uxParTextGetLED( unsigned long uxLED );\r
+\r
+static unsigned short generate_io_state( void *arg )\r
+{\r
+       if( uxParTestGetLED() )\r
+       {\r
+               pcStatus = "checked";\r
+       }\r
+       else\r
+       {\r
+               pcStatus = "";\r
+       }\r
+\r
+       sprintf( uip_appdata,\r
+               "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED DS4,"\\r
+               "<p>",\r
+               pcStatus ); \r
+\r
+       return strlen( uip_appdata );\r
+}\r
+\r
+static PT_THREAD(led_io(struct httpd_state *s, char *ptr))\r
+{\r
+  PSOCK_BEGIN(&s->sout);\r
+  PSOCK_GENERATOR_SEND(&s->sout, generate_io_state, NULL);\r
+  PSOCK_END(&s->sout);\r
+}\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-cgi.h
new file mode 100644 (file)
index 0000000..7ae9283
--- /dev/null
@@ -0,0 +1,84 @@
+/**\r
+ * \addtogroup httpd\r
+ * @{\r
+ */\r
+\r
+/**\r
+ * \file\r
+ *         Web server script interface header file\r
+ * \author\r
+ *         Adam Dunkels <adam@sics.se>\r
+ *\r
+ */\r
+\r
+\r
+\r
+/*\r
+ * Copyright (c) 2001, Adam Dunkels.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote\r
+ *    products derived from this software without specific prior\r
+ *    written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack.\r
+ *\r
+ * $Id: httpd-cgi.h,v 1.2 2006/06/11 21:46:38 adam Exp $\r
+ *\r
+ */\r
+\r
+#ifndef __HTTPD_CGI_H__\r
+#define __HTTPD_CGI_H__\r
+\r
+#include "psock.h"\r
+#include "httpd.h"\r
+\r
+typedef PT_THREAD((* httpd_cgifunction)(struct httpd_state *, char *));\r
+\r
+httpd_cgifunction httpd_cgi(char *name);\r
+\r
+struct httpd_cgi_call {\r
+  const char *name;\r
+  const httpd_cgifunction function;\r
+};\r
+\r
+/**\r
+ * \brief      HTTPD CGI function declaration\r
+ * \param name The C variable name of the function\r
+ * \param str  The string name of the function, used in the script file\r
+ * \param function A pointer to the function that implements it\r
+ *\r
+ *             This macro is used for declaring a HTTPD CGI\r
+ *             function. This function is then added to the list of\r
+ *             HTTPD CGI functions with the httpd_cgi_add() function.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define HTTPD_CGI_CALL(name, str, function) \\r
+static PT_THREAD(function(struct httpd_state *, char *)); \\r
+static const struct httpd_cgi_call name = {str, function}\r
+\r
+void httpd_cgi_init(void);\r
+#endif /* __HTTPD_CGI_H__ */\r
+\r
+/** @} */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs.c
new file mode 100644 (file)
index 0000000..dc4aef0
--- /dev/null
@@ -0,0 +1,132 @@
+/*\r
+ * Copyright (c) 2001, Swedish Institute of Computer Science.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. Neither the name of the Institute nor the names of its contributors\r
+ *    may be used to endorse or promote products derived from this software\r
+ *    without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE\r
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+ * SUCH DAMAGE.\r
+ *\r
+ * This file is part of the lwIP TCP/IP stack.\r
+ *\r
+ * Author: Adam Dunkels <adam@sics.se>\r
+ *\r
+ * $Id: httpd-fs.c,v 1.1 2006/06/07 09:13:08 adam Exp $\r
+ */\r
+\r
+#include "httpd.h"\r
+#include "httpd-fs.h"\r
+#include "httpd-fsdata.h"\r
+\r
+#ifndef NULL\r
+#define NULL 0\r
+#endif /* NULL */\r
+\r
+#include "httpd-fsdata.c"\r
+\r
+#if HTTPD_FS_STATISTICS\r
+static u16_t count[HTTPD_FS_NUMFILES];\r
+#endif /* HTTPD_FS_STATISTICS */\r
+\r
+/*-----------------------------------------------------------------------------------*/\r
+static u8_t\r
+httpd_fs_strcmp(const char *str1, const char *str2)\r
+{\r
+  u8_t i;\r
+  i = 0;\r
+ loop:\r
+\r
+  if(str2[i] == 0 ||\r
+     str1[i] == '\r' ||\r
+     str1[i] == '\n') {\r
+    return 0;\r
+  }\r
+\r
+  if(str1[i] != str2[i]) {\r
+    return 1;\r
+  }\r
+\r
+\r
+  ++i;\r
+  goto loop;\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+int\r
+httpd_fs_open(const char *name, struct httpd_fs_file *file)\r
+{\r
+#if HTTPD_FS_STATISTICS\r
+  u16_t i = 0;\r
+#endif /* HTTPD_FS_STATISTICS */\r
+  struct httpd_fsdata_file_noconst *f;\r
+\r
+  for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT;\r
+      f != NULL;\r
+      f = (struct httpd_fsdata_file_noconst *)f->next) {\r
+\r
+    if(httpd_fs_strcmp(name, f->name) == 0) {\r
+      file->data = f->data;\r
+      file->len = f->len;\r
+#if HTTPD_FS_STATISTICS\r
+      ++count[i];\r
+#endif /* HTTPD_FS_STATISTICS */\r
+      return 1;\r
+    }\r
+#if HTTPD_FS_STATISTICS\r
+    ++i;\r
+#endif /* HTTPD_FS_STATISTICS */\r
+\r
+  }\r
+  return 0;\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+void\r
+httpd_fs_init(void)\r
+{\r
+#if HTTPD_FS_STATISTICS\r
+  u16_t i;\r
+  for(i = 0; i < HTTPD_FS_NUMFILES; i++) {\r
+    count[i] = 0;\r
+  }\r
+#endif /* HTTPD_FS_STATISTICS */\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+#if HTTPD_FS_STATISTICS\r
+u16_t httpd_fs_count\r
+(char *name)\r
+{\r
+  struct httpd_fsdata_file_noconst *f;\r
+  u16_t i;\r
+\r
+  i = 0;\r
+  for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT;\r
+      f != NULL;\r
+      f = (struct httpd_fsdata_file_noconst *)f->next) {\r
+\r
+    if(httpd_fs_strcmp(name, f->name) == 0) {\r
+      return count[i];\r
+    }\r
+    ++i;\r
+  }\r
+  return 0;\r
+}\r
+#endif /* HTTPD_FS_STATISTICS */\r
+/*-----------------------------------------------------------------------------------*/\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs.h
new file mode 100644 (file)
index 0000000..b594eea
--- /dev/null
@@ -0,0 +1,57 @@
+/*\r
+ * Copyright (c) 2001, Swedish Institute of Computer Science.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. Neither the name of the Institute nor the names of its contributors\r
+ *    may be used to endorse or promote products derived from this software\r
+ *    without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE\r
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+ * SUCH DAMAGE.\r
+ *\r
+ * This file is part of the lwIP TCP/IP stack.\r
+ *\r
+ * Author: Adam Dunkels <adam@sics.se>\r
+ *\r
+ * $Id: httpd-fs.h,v 1.1 2006/06/07 09:13:08 adam Exp $\r
+ */\r
+#ifndef __HTTPD_FS_H__\r
+#define __HTTPD_FS_H__\r
+\r
+#define HTTPD_FS_STATISTICS 1\r
+\r
+struct httpd_fs_file {\r
+  char *data;\r
+  int len;\r
+};\r
+\r
+/* file must be allocated by caller and will be filled in\r
+   by the function. */\r
+int httpd_fs_open(const char *name, struct httpd_fs_file *file);\r
+\r
+#ifdef HTTPD_FS_STATISTICS\r
+#if HTTPD_FS_STATISTICS == 1\r
+u16_t httpd_fs_count(char *name);\r
+#endif /* HTTPD_FS_STATISTICS */\r
+#endif /* HTTPD_FS_STATISTICS */\r
+\r
+void httpd_fs_init(void);\r
+\r
+#endif /* __HTTPD_FS_H__ */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/404.html b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/404.html
new file mode 100644 (file)
index 0000000..43e7f4c
--- /dev/null
@@ -0,0 +1,8 @@
+<html>\r
+  <body bgcolor="white">\r
+    <center>\r
+      <h1>404 - file not found</h1>\r
+      <h3>Go <a href="/">here</a> instead.</h3>\r
+    </center>\r
+  </body>\r
+</html>
\ No newline at end of file
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/index.html b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/index.html
new file mode 100644 (file)
index 0000000..1d3bbee
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
+<html>\r
+  <head>\r
+    <title>FreeRTOS.org uIP WEB server demo</title>\r
+  </head>\r
+  <BODY onLoad="window.setTimeout(&quot;location.href='index.shtml'&quot;,100)"bgcolor="#CCCCff">\r
+<font face="arial">\r
+Loading index.shtml.  Click <a href="index.shtml">here</a> if not automatically redirected.\r
+</font>\r
+</font>\r
+</body>\r
+</html>\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/index.shtml b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/index.shtml
new file mode 100644 (file)
index 0000000..0ce405b
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
+<html>\r
+  <head>\r
+    <title>FreeRTOS.org uIP WEB server demo</title>\r
+  </head>\r
+  <BODY onLoad="window.setTimeout(&quot;location.href='index.shtml'&quot;,2000)"bgcolor="#CCCCff">\r
+<font face="arial">\r
+<a href="index.shtml">RTOS Stats</a> <b>|</b> <a href="stats.shtml">TCP Stats</a> <b>|</b> <a href="tcp.shtml">Connections</a> <b>|</b> <a href="http://www.freertos.org/">FreeRTOS.org Homepage</a> <b>|</b> <a href="io.shtml">IO</a>\r
+<br><p>\r
+<hr>\r
+<br><p>\r
+<h2>Task statistics</h2>\r
+Page will refresh evey 2 seconds.<p>\r
+<font face="courier"><pre>Task          State  Priority  Stack #<br>************************************************<br>\r
+%! rtos-stats\r
+</pre></font>\r
+</font>\r
+</body>\r
+</html>\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/io.shtml b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/io.shtml
new file mode 100644 (file)
index 0000000..bacef5f
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
+<html>\r
+  <head>\r
+    <title>FreeRTOS.org uIP WEB server demo</title>\r
+  </head>\r
+  <BODY bgcolor="#CCCCff">\r
+<font face="arial">\r
+<a href="index.shtml">RTOS Stats</a> <b>|</b> <a href="stats.shtml">TCP Stats</a> <b>|</b> <a href="tcp.shtml">Connections</a> <b>|</b> <a href="http://www.freertos.org/">FreeRTOS.org Homepage</a> <b>|</b> <a href="io.shtml">IO</a>\r
+<br><p>\r
+<hr>\r
+<b>LED IO</b><br>\r
+\r
+<p>\r
+\r
+Use the check box to set the LED state, then click "Update IO" to send the new state to the microcontroller.\r
+\r
+\r
+<p>\r
+<form name="aForm" action="/io.shtml" method="get">\r
+%! led-io\r
+<p>\r
+<input type="submit" value="Update IO">\r
+</form>\r
+<br><p>\r
+</font>\r
+</body>\r
+</html>\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/stats.shtml b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/stats.shtml
new file mode 100644 (file)
index 0000000..d762f40
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
+<html>\r
+  <head>\r
+    <title>FreeRTOS.org uIP WEB server demo</title>\r
+  </head>\r
+  <BODY bgcolor="#CCCCff">\r
+<font face="arial">\r
+<a href="index.shtml">RTOS Stats</a> <b>|</b> <a href="stats.shtml">TCP Stats</a> <b>|</b> <a href="tcp.shtml">Connections</a> <b>|</b> <a href="http://www.freertos.org/">FreeRTOS.org Homepage</a> <b>|</b> <a href="io.shtml">IO</a>\r
+<br><p>\r
+<hr>\r
+<br><p>\r
+<h2>Network statistics</h2>\r
+<table width="300" border="0">\r
+<tr><td align="left"><font face="courier"><pre>\r
+IP           Packets dropped\r
+             Packets received\r
+             Packets sent\r
+IP errors    IP version/header length\r
+             IP length, high byte\r
+             IP length, low byte\r
+             IP fragments\r
+             Header checksum\r
+             Wrong protocol\r
+ICMP        Packets dropped\r
+             Packets received\r
+             Packets sent\r
+             Type errors\r
+TCP          Packets dropped\r
+             Packets received\r
+             Packets sent\r
+             Checksum errors\r
+             Data packets without ACKs\r
+             Resets\r
+             Retransmissions\r
+            No connection avaliable\r
+            Connection attempts to closed ports\r
+</pre></font></td><td><pre>%! net-stats\r
+</pre></table>\r
+</font>\r
+</body>\r
+</html>\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/tcp.shtml b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fs/tcp.shtml
new file mode 100644 (file)
index 0000000..654d61f
--- /dev/null
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
+<html>\r
+  <head>\r
+    <title>FreeRTOS.org uIP WEB server demo</title>\r
+  </head>\r
+  <BODY bgcolor="#CCCCff">\r
+<font face="arial">\r
+<a href="index.shtml">RTOS Stats</a> <b>|</b> <a href="stats.shtml">TCP Stats</a> <b>|</b> <a href="tcp.shtml">Connections</a> <b>|</b> <a href="http://www.freertos.org/">FreeRTOS.org Homepage</a> <b>|</b> <a href="io.shtml">IO</a>\r
+<br><p>\r
+<hr>\r
+<br>\r
+<h2>Network connections</h2>\r
+<p>\r
+<table>\r
+<tr><th>Local</th><th>Remote</th><th>State</th><th>Retransmissions</th><th>Timer</th><th>Flags</th></tr>\r
+%! tcp-connections\r
+</pre></font>\r
+</font>\r
+</body>\r
+</html>\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fsdata.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fsdata.c
new file mode 100644 (file)
index 0000000..481f3af
--- /dev/null
@@ -0,0 +1,468 @@
+static const unsigned char data_404_html[] = {
+       /* /404.html */
+       0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
+       0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 0xa, 0x20, 0x20, 
+       0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 
+       0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 
+       0x22, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 
+       0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0xd, 0xa, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 
+       0x34, 0x20, 0x2d, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 
+       0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 
+       0x68, 0x31, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x3c, 0x68, 0x33, 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 
+       0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 
+       0x68, 0x65, 0x72, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 
+       0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 
+       0x33, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 
+       0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0xd, 0xa, 0x20, 
+       0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 
+       0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0};
+
+static const unsigned char data_index_html[] = {
+       /* /index.html */
+       0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
+       0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 
+       0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 
+       0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 
+       0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 
+       0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 
+       0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, 
+       0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 
+       0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 
+       0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, 
+       0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 
+       0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, 
+       0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 
+       0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, 
+       0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, 
+       0x4f, 0x44, 0x59, 0x20, 0x6f, 0x6e, 0x4c, 0x6f, 0x61, 0x64, 
+       0x3d, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, 
+       0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 
+       0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6c, 0x6f, 0x63, 0x61, 
+       0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x3d, 
+       0x27, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 
+       0x6d, 0x6c, 0x27, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x2c, 
+       0x31, 0x30, 0x30, 0x29, 0x22, 0x62, 0x67, 0x63, 0x6f, 0x6c, 
+       0x6f, 0x72, 0x3d, 0x22, 0x23, 0x43, 0x43, 0x43, 0x43, 0x66, 
+       0x66, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 
+       0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, 0x69, 
+       0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, 0x4c, 0x6f, 0x61, 0x64, 
+       0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 
+       0x73, 0x68, 0x74, 0x6d, 0x6c, 0x2e, 0x20, 0x20, 0x43, 0x6c, 
+       0x69, 0x63, 0x6b, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 
+       0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 
+       0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65, 
+       0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 
+       0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 
+       0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x64, 0x69, 
+       0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0xd, 0xa, 0x3c, 
+       0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 
+       0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 
+       0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 
+       0x6d, 0x6c, 0x3e, 0xd, 0xa, 0xd, 0xa, 0};
+
+static const unsigned char data_index_shtml[] = {
+       /* /index.shtml */
+       0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
+       0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 
+       0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 
+       0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 
+       0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 
+       0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 
+       0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, 
+       0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 
+       0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 
+       0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, 
+       0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 
+       0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, 
+       0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 
+       0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, 
+       0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, 
+       0x4f, 0x44, 0x59, 0x20, 0x6f, 0x6e, 0x4c, 0x6f, 0x61, 0x64, 
+       0x3d, 0x22, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, 
+       0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 
+       0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x6c, 0x6f, 0x63, 0x61, 
+       0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x3d, 
+       0x27, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 
+       0x6d, 0x6c, 0x27, 0x26, 0x71, 0x75, 0x6f, 0x74, 0x3b, 0x2c, 
+       0x32, 0x30, 0x30, 0x30, 0x29, 0x22, 0x62, 0x67, 0x63, 0x6f, 
+       0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x43, 0x43, 0x43, 0x43, 
+       0x66, 0x66, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, 
+       0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, 
+       0x69, 0x61, 0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, 
+       0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, 
+       0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 
+       0x54, 0x4f, 0x53, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 
+       0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 
+       0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 
+       0x3d, 0x22, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 
+       0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, 0x20, 0x53, 
+       0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 
+       0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 
+       0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, 0x63, 0x70, 
+       0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x43, 0x6f, 
+       0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 
+       0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 
+       0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 
+       0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 
+       0x77, 0x77, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, 0x74, 0x6f, 
+       0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, 0x46, 0x72, 
+       0x65, 0x65, 0x52, 0x54, 0x4f, 0x53, 0x2e, 0x6f, 0x72, 0x67, 
+       0x20, 0x48, 0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 
+       0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 
+       0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 
+       0x3d, 0x22, 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 
+       0x22, 0x3e, 0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 
+       0x3c, 0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 
+       0x68, 0x72, 0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, 
+       0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x32, 0x3e, 0x54, 0x61, 
+       0x73, 0x6b, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 
+       0x69, 0x63, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, 0xa, 
+       0x50, 0x61, 0x67, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 
+       0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x20, 0x65, 0x76, 
+       0x65, 0x79, 0x20, 0x32, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 
+       0x64, 0x73, 0x2e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x66, 
+       0x6f, 0x6e, 0x74, 0x20, 0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 
+       0x63, 0x6f, 0x75, 0x72, 0x69, 0x65, 0x72, 0x22, 0x3e, 0x3c, 
+       0x70, 0x72, 0x65, 0x3e, 0x54, 0x61, 0x73, 0x6b, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x74, 
+       0x61, 0x74, 0x65, 0x20, 0x20, 0x50, 0x72, 0x69, 0x6f, 0x72, 
+       0x69, 0x74, 0x79, 0x20, 0x20, 0x53, 0x74, 0x61, 0x63, 0x6b, 
+       0x9, 0x23, 0x3c, 0x62, 0x72, 0x3e, 0x2a, 0x2a, 0x2a, 0x2a, 
+       0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 
+       0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 
+       0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 
+       0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 
+       0x2a, 0x2a, 0x2a, 0x2a, 0x3c, 0x62, 0x72, 0x3e, 0xd, 0xa, 
+       0x25, 0x21, 0x20, 0x72, 0x74, 0x6f, 0x73, 0x2d, 0x73, 0x74, 
+       0x61, 0x74, 0x73, 0xd, 0xa, 0x3c, 0x2f, 0x70, 0x72, 0x65, 
+       0x3e, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 
+       0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 
+       0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 
+       0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 0xa, 0xd, 0xa, 0};
+
+static const unsigned char data_io_shtml[] = {
+       /* /io.shtml */
+       0x2f, 0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
+       0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 
+       0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 
+       0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 
+       0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 
+       0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 
+       0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, 
+       0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 
+       0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 
+       0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, 
+       0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 
+       0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, 
+       0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 
+       0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, 
+       0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, 
+       0x4f, 0x44, 0x59, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 
+       0x72, 0x3d, 0x22, 0x23, 0x43, 0x43, 0x43, 0x43, 0x66, 0x66, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 
+       0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, 0x69, 0x61, 
+       0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 
+       0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 
+       0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 0x54, 0x4f, 
+       0x53, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 
+       0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, 0x20, 0x53, 0x74, 0x61, 
+       0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 
+       0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 
+       0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, 0x63, 0x70, 0x2e, 0x73, 
+       0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x6e, 
+       0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 
+       0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, 0x74, 0x6f, 0x73, 0x2e, 
+       0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x65, 0x65, 
+       0x52, 0x54, 0x4f, 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x48, 
+       0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 
+       0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 0x3c, 0x62, 
+       0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x72, 
+       0x3e, 0xd, 0xa, 0x3c, 0x62, 0x3e, 0x4c, 0x45, 0x44, 0x20, 
+       0x49, 0x4f, 0x3c, 0x2f, 0x62, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 
+       0xd, 0xa, 0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0xd, 
+       0xa, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 
+       0x68, 0x65, 0x63, 0x6b, 0x20, 0x62, 0x6f, 0x78, 0x20, 0x74, 
+       0x6f, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 
+       0x4c, 0x45, 0x44, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2c, 
+       0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x6c, 0x69, 0x63, 
+       0x6b, 0x20, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 
+       0x49, 0x4f, 0x22, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x6e, 
+       0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 
+       0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 
+       0x68, 0x65, 0x20, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x63, 0x6f, 
+       0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0xd, 
+       0xa, 0xd, 0xa, 0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 
+       0x3c, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 
+       0x3d, 0x22, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x22, 0x20, 0x61, 
+       0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x2f, 0x69, 0x6f, 
+       0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x20, 0x6d, 0x65, 
+       0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x67, 0x65, 0x74, 0x22, 
+       0x3e, 0xd, 0xa, 0x25, 0x21, 0x20, 0x6c, 0x65, 0x64, 0x2d, 
+       0x69, 0x6f, 0xd, 0xa, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 
+       0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 
+       0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20, 
+       0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x55, 0x70, 0x64, 
+       0x61, 0x74, 0x65, 0x20, 0x49, 0x4f, 0x22, 0x3e, 0xd, 0xa, 
+       0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e, 0xd, 0xa, 0x3c, 
+       0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 
+       0x66, 0x6f, 0x6e, 0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 
+       0x6f, 0x64, 0x79, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 
+       0x6d, 0x6c, 0x3e, 0xd, 0xa, 0xd, 0xa, 0};
+
+static const unsigned char data_stats_shtml[] = {
+       /* /stats.shtml */
+       0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
+       0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 
+       0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 
+       0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 
+       0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 
+       0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 
+       0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, 
+       0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 
+       0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 
+       0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, 
+       0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 
+       0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, 
+       0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 
+       0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, 
+       0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, 
+       0x4f, 0x44, 0x59, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 
+       0x72, 0x3d, 0x22, 0x23, 0x43, 0x43, 0x43, 0x43, 0x66, 0x66, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 
+       0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, 0x69, 0x61, 
+       0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 
+       0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 
+       0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 0x54, 0x4f, 
+       0x53, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 
+       0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, 0x20, 0x53, 0x74, 0x61, 
+       0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 
+       0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 
+       0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, 0x63, 0x70, 0x2e, 0x73, 
+       0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x6e, 
+       0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 
+       0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, 0x74, 0x6f, 0x73, 0x2e, 
+       0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x65, 0x65, 
+       0x52, 0x54, 0x4f, 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x48, 
+       0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 
+       0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 0x3c, 0x62, 
+       0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x72, 
+       0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0x3c, 0x70, 0x3e, 
+       0xd, 0xa, 0x3c, 0x68, 0x32, 0x3e, 0x4e, 0x65, 0x74, 0x77, 
+       0x6f, 0x72, 0x6b, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 
+       0x74, 0x69, 0x63, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, 
+       0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 
+       0x64, 0x74, 0x68, 0x3d, 0x22, 0x33, 0x30, 0x30, 0x22, 0x20, 
+       0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 
+       0x3e, 0xd, 0xa, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 
+       0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, 
+       0x66, 0x74, 0x22, 0x3e, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 
+       0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x75, 0x72, 
+       0x69, 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x65, 0x3e, 
+       0xd, 0xa, 0x49, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 
+       0x74, 0x73, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 
+       0x74, 0x73, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 
+       0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 
+       0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e, 0x74, 0xd, 0xa, 
+       0x49, 0x50, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x20, 
+       0x20, 0x20, 0x20, 0x49, 0x50, 0x20, 0x76, 0x65, 0x72, 0x73, 
+       0x69, 0x6f, 0x6e, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 
+       0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0xd, 0xa, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x49, 0x50, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 
+       0x68, 0x2c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x20, 0x62, 0x79, 
+       0x74, 0x65, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x50, 0x20, 
+       0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2c, 0x20, 0x6c, 0x6f, 
+       0x77, 0x20, 0x62, 0x79, 0x74, 0x65, 0xd, 0xa, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x49, 0x50, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 
+       0x6e, 0x74, 0x73, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x65, 
+       0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 
+       0x73, 0x75, 0x6d, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x57, 0x72, 
+       0x6f, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 
+       0x6f, 0x6c, 0xd, 0xa, 0x49, 0x43, 0x4d, 0x50, 0x9, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 
+       0x73, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0xd, 
+       0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 
+       0x73, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x65, 
+       0x74, 0x73, 0x20, 0x73, 0x65, 0x6e, 0x74, 0xd, 0xa, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x65, 0x72, 0x72, 
+       0x6f, 0x72, 0x73, 0xd, 0xa, 0x54, 0x43, 0x50, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 
+       0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x64, 0x72, 0x6f, 0x70, 
+       0x70, 0x65, 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x61, 
+       0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x72, 0x65, 0x63, 0x65, 
+       0x69, 0x76, 0x65, 0x64, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 
+       0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x6e, 
+       0x74, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x68, 0x65, 0x63, 
+       0x6b, 0x73, 0x75, 0x6d, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 
+       0x73, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x61, 0x74, 0x61, 
+       0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x20, 0x77, 
+       0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x41, 0x43, 0x4b, 
+       0x73, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x65, 0x73, 0x65, 
+       0x74, 0x73, 0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x65, 0x74, 
+       0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 
+       0x6e, 0x73, 0xd, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x20, 
+       0x4e, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 
+       0x69, 0x6f, 0x6e, 0x20, 0x61, 0x76, 0x61, 0x6c, 0x69, 0x61, 
+       0x62, 0x6c, 0x65, 0xd, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 
+       0x20, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 
+       0x6e, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 
+       0x20, 0x74, 0x6f, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 
+       0x20, 0x70, 0x6f, 0x72, 0x74, 0x73, 0xd, 0xa, 0x3c, 0x2f, 
+       0x70, 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 
+       0x3e, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, 0x3e, 
+       0x3c, 0x70, 0x72, 0x65, 0x3e, 0x25, 0x21, 0x20, 0x6e, 0x65, 
+       0x74, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x73, 0xd, 0xa, 0x3c, 
+       0x2f, 0x70, 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, 
+       0x6c, 0x65, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 
+       0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 
+       0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 
+       0xd, 0xa, 0};
+
+static const unsigned char data_tcp_shtml[] = {
+       /* /tcp.shtml */
+       0x2f, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
+       0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 
+       0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 
+       0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 
+       0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, 
+       0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 
+       0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, 
+       0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 
+       0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 
+       0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, 
+       0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 
+       0xd, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x54, 0x4f, 
+       0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x75, 0x49, 0x50, 0x20, 
+       0x57, 0x45, 0x42, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 
+       0x20, 0x64, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x74, 0x69, 0x74, 
+       0x6c, 0x65, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x68, 
+       0x65, 0x61, 0x64, 0x3e, 0xd, 0xa, 0x20, 0x20, 0x3c, 0x42, 
+       0x4f, 0x44, 0x59, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 
+       0x72, 0x3d, 0x22, 0x23, 0x43, 0x43, 0x43, 0x43, 0x66, 0x66, 
+       0x22, 0x3e, 0xd, 0xa, 0x3c, 0x66, 0x6f, 0x6e, 0x74, 0x20, 
+       0x66, 0x61, 0x63, 0x65, 0x3d, 0x22, 0x61, 0x72, 0x69, 0x61, 
+       0x6c, 0x22, 0x3e, 0xd, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 
+       0x65, 0x66, 0x3d, 0x22, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 
+       0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x52, 0x54, 0x4f, 
+       0x53, 0x20, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 
+       0x6c, 0x22, 0x3e, 0x54, 0x43, 0x50, 0x20, 0x53, 0x74, 0x61, 
+       0x74, 0x73, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x3c, 0x62, 0x3e, 
+       0x7c, 0x3c, 0x2f, 0x62, 0x3e, 0x20, 0x3c, 0x61, 0x20, 0x68, 
+       0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, 0x63, 0x70, 0x2e, 0x73, 
+       0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x6e, 
+       0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 
+       0x2e, 0x66, 0x72, 0x65, 0x65, 0x72, 0x74, 0x6f, 0x73, 0x2e, 
+       0x6f, 0x72, 0x67, 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x65, 0x65, 
+       0x52, 0x54, 0x4f, 0x53, 0x2e, 0x6f, 0x72, 0x67, 0x20, 0x48, 
+       0x6f, 0x6d, 0x65, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, 
+       0x3e, 0x20, 0x3c, 0x62, 0x3e, 0x7c, 0x3c, 0x2f, 0x62, 0x3e, 
+       0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 
+       0x69, 0x6f, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 
+       0x49, 0x4f, 0x3c, 0x2f, 0x61, 0x3e, 0xd, 0xa, 0x3c, 0x62, 
+       0x72, 0x3e, 0x3c, 0x70, 0x3e, 0xd, 0xa, 0x3c, 0x68, 0x72, 
+       0x3e, 0xd, 0xa, 0x3c, 0x62, 0x72, 0x3e, 0xd, 0xa, 0x3c, 
+       0x68, 0x32, 0x3e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 
+       0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 
+       0x6e, 0x73, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0xd, 0xa, 0x3c, 
+       0x70, 0x3e, 0xd, 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 
+       0x3e, 0xd, 0xa, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x68, 
+       0x3e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x3c, 0x2f, 0x74, 0x68, 
+       0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 
+       0x65, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, 0x68, 0x3e, 
+       0x53, 0x74, 0x61, 0x74, 0x65, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 
+       0x3c, 0x74, 0x68, 0x3e, 0x52, 0x65, 0x74, 0x72, 0x61, 0x6e, 
+       0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 
+       0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, 0x68, 0x3e, 0x54, 0x69, 
+       0x6d, 0x65, 0x72, 0x3c, 0x2f, 0x74, 0x68, 0x3e, 0x3c, 0x74, 
+       0x68, 0x3e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x3c, 0x2f, 0x74, 
+       0x68, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0xd, 0xa, 0x25, 
+       0x21, 0x20, 0x74, 0x63, 0x70, 0x2d, 0x63, 0x6f, 0x6e, 0x6e, 
+       0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xd, 0xa, 0x3c, 
+       0x2f, 0x70, 0x72, 0x65, 0x3e, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 
+       0x74, 0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x6e, 0x74, 
+       0x3e, 0xd, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 
+       0xd, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xd, 
+       0xa, 0xd, 0xa, 0};
+
+const struct httpd_fsdata_file file_404_html[] = {{NULL, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
+
+const struct httpd_fsdata_file file_index_html[] = {{file_404_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
+
+const struct httpd_fsdata_file file_index_shtml[] = {{file_index_html, data_index_shtml, data_index_shtml + 13, sizeof(data_index_shtml) - 13}};
+
+const struct httpd_fsdata_file file_io_shtml[] = {{file_index_shtml, data_io_shtml, data_io_shtml + 10, sizeof(data_io_shtml) - 10}};
+
+const struct httpd_fsdata_file file_stats_shtml[] = {{file_io_shtml, data_stats_shtml, data_stats_shtml + 13, sizeof(data_stats_shtml) - 13}};
+
+const struct httpd_fsdata_file file_tcp_shtml[] = {{file_stats_shtml, data_tcp_shtml, data_tcp_shtml + 11, sizeof(data_tcp_shtml) - 11}};
+
+#define HTTPD_FS_ROOT file_tcp_shtml
+
+#define HTTPD_FS_NUMFILES 6
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fsdata.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd-fsdata.h
new file mode 100644 (file)
index 0000000..52d35c2
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ * Copyright (c) 2001, Swedish Institute of Computer Science.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. Neither the name of the Institute nor the names of its contributors\r
+ *    may be used to endorse or promote products derived from this software\r
+ *    without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE\r
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+ * SUCH DAMAGE.\r
+ *\r
+ * This file is part of the lwIP TCP/IP stack.\r
+ *\r
+ * Author: Adam Dunkels <adam@sics.se>\r
+ *\r
+ * $Id: httpd-fsdata.h,v 1.1 2006/06/07 09:13:08 adam Exp $\r
+ */\r
+#ifndef __HTTPD_FSDATA_H__\r
+#define __HTTPD_FSDATA_H__\r
+\r
+#include "uip.h"\r
+\r
+struct httpd_fsdata_file {\r
+  const struct httpd_fsdata_file *next;\r
+  const char *name;\r
+  const char *data;\r
+  const int len;\r
+#ifdef HTTPD_FS_STATISTICS\r
+#if HTTPD_FS_STATISTICS == 1\r
+  u16_t count;\r
+#endif /* HTTPD_FS_STATISTICS */\r
+#endif /* HTTPD_FS_STATISTICS */\r
+};\r
+\r
+struct httpd_fsdata_file_noconst {\r
+  struct httpd_fsdata_file *next;\r
+  char *name;\r
+  char *data;\r
+  int len;\r
+#ifdef HTTPD_FS_STATISTICS\r
+#if HTTPD_FS_STATISTICS == 1\r
+  u16_t count;\r
+#endif /* HTTPD_FS_STATISTICS */\r
+#endif /* HTTPD_FS_STATISTICS */\r
+};\r
+\r
+#endif /* __HTTPD_FSDATA_H__ */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd.c
new file mode 100644 (file)
index 0000000..5c0b409
--- /dev/null
@@ -0,0 +1,413 @@
+/*$T httpd.c GC 1.138 11/17/07 13:10:22 */\r
+\r
+/*\r
+ * \addtogroup apps @{ Â£\r
+ * \defgroup httpd Web server @{ The uIP web server is a very simplistic\r
+ * implementation of an HTTP server. It can serve web pages and files from a\r
+ * read-only ROM filesystem, and provides a very small scripting language. Â£\r
+ * \file Web server \author Adam Dunkels <adam@sics.se> Â£\r
+ * Copyright (c) 2004, Adam Dunkels. All rights reserved. Redistribution and use\r
+ * in source and binary forms, with or without modification, are permitted\r
+ * provided that the following conditions are met: 1. Redistributions of source\r
+ * code must retain the above copyright notice, this list of conditions and the\r
+ * following disclaimer. 2. Redistributions in binary form must reproduce the\r
+ * above copyright notice, this list of conditions and the following disclaimer in\r
+ * the documentation and/or other materials provided with the distribution. 3.\r
+ * Neither the name of the Institute nor the names of its contributors may be used\r
+ * to endorse or promote products derived from this software without specific\r
+ * prior written permission. THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND\r
+ * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT\r
+ * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\r
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\r
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY\r
+ * OF SUCH DAMAGE. This file is part of the uIP TCP/IP stack. Author: Adam Dunkels\r
+ * <adam@sics.se> $Id: httpd.c,v 1.2 2006/06/11 21:46:38 adam Exp $\r
+ */\r
+#include "uip.h"\r
+#include "httpd.h"\r
+#include "httpd-fs.h"\r
+#include "httpd-cgi.h"\r
+#include "http-strings.h"\r
+\r
+#include <string.h>\r
+\r
+#define STATE_WAITING  0\r
+#define STATE_OUTPUT   1\r
+\r
+#define ISO_nl                 0x0a\r
+#define ISO_space              0x20\r
+#define ISO_bang               0x21\r
+#define ISO_percent            0x25\r
+#define ISO_period             0x2e\r
+#define ISO_slash              0x2f\r
+#define ISO_colon              0x3a\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static unsigned short generate_part_of_file(void *state)\r
+{\r
+       /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/\r
+       struct httpd_state      *s = (struct httpd_state *) state;\r
+       /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/\r
+\r
+       if(s->file.len > uip_mss())\r
+       {\r
+               s->len = uip_mss();\r
+       }\r
+       else\r
+       {\r
+               s->len = s->file.len;\r
+       }\r
+\r
+       memcpy(uip_appdata, s->file.data, s->len);\r
+\r
+       return s->len;\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static PT_THREAD(send_file (struct httpd_state *s))\r
+{\r
+       PSOCK_BEGIN(&s->sout);\r
+\r
+       do\r
+       {\r
+               PSOCK_GENERATOR_SEND(&s->sout, generate_part_of_file, s);\r
+               s->file.len -= s->len;\r
+               s->file.data += s->len;\r
+       } while(s->file.len > 0);\r
+\r
+       PSOCK_END(&s->sout);\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static PT_THREAD(send_part_of_file (struct httpd_state *s))\r
+{\r
+       PSOCK_BEGIN(&s->sout);\r
+\r
+       PSOCK_SEND(&s->sout, s->file.data, s->len);\r
+\r
+       PSOCK_END(&s->sout);\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static void next_scriptstate(struct httpd_state *s)\r
+{\r
+       /*~~~~~~~*/\r
+       char    *p;\r
+       /*~~~~~~~*/\r
+\r
+       p = strchr(s->scriptptr, ISO_nl) + 1;\r
+       s->scriptlen -= (unsigned short) (p - s->scriptptr);\r
+       s->scriptptr = p;\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static PT_THREAD(handle_script (struct httpd_state *s))\r
+{\r
+       /*~~~~~~~~~*/\r
+       char    *ptr;\r
+       /*~~~~~~~~~*/\r
+\r
+       PT_BEGIN(&s->scriptpt);\r
+\r
+       while(s->file.len > 0)\r
+       {\r
+               /* Check if we should start executing a script. */\r
+               if(*s->file.data == ISO_percent && *(s->file.data + 1) == ISO_bang)\r
+               {\r
+                       s->scriptptr = s->file.data + 3;\r
+                       s->scriptlen = s->file.len - 3;\r
+                       if(*(s->scriptptr - 1) == ISO_colon)\r
+                       {\r
+                               httpd_fs_open(s->scriptptr + 1, &s->file);\r
+                               PT_WAIT_THREAD(&s->scriptpt, send_file(s));\r
+                       }\r
+                       else\r
+                       {\r
+                               PT_WAIT_THREAD(&s->scriptpt, httpd_cgi(s->scriptptr) (s, s->scriptptr));\r
+                       }\r
+\r
+                       next_scriptstate(s);\r
+\r
+                       /*\r
+                        * The script is over, so we reset the pointers and continue sending the rest of\r
+                        * the file.\r
+                        */\r
+                       s->file.data = s->scriptptr;\r
+                       s->file.len = s->scriptlen;\r
+               }\r
+               else\r
+               {\r
+                       /* See if we find the start of script marker in the block of HTML to be sent. */\r
+                       if(s->file.len > uip_mss())\r
+                       {\r
+                               s->len = uip_mss();\r
+                       }\r
+                       else\r
+                       {\r
+                               s->len = s->file.len;\r
+                       }\r
+\r
+                       if(*s->file.data == ISO_percent)\r
+                       {\r
+                               ptr = strchr(s->file.data + 1, ISO_percent);\r
+                       }\r
+                       else\r
+                       {\r
+                               ptr = strchr(s->file.data, ISO_percent);\r
+                       }\r
+\r
+                       if(ptr != NULL && ptr != s->file.data)\r
+                       {\r
+                               s->len = (int) (ptr - s->file.data);\r
+                               if(s->len >= uip_mss())\r
+                               {\r
+                                       s->len = uip_mss();\r
+                               }\r
+                       }\r
+\r
+                       PT_WAIT_THREAD(&s->scriptpt, send_part_of_file(s));\r
+                       s->file.data += s->len;\r
+                       s->file.len -= s->len;\r
+               }\r
+       }\r
+\r
+       PT_END(&s->scriptpt);\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static PT_THREAD(send_headers (struct httpd_state *s, const char *statushdr))\r
+{\r
+       /*~~~~~~~~~*/\r
+       char    *ptr;\r
+       /*~~~~~~~~~*/\r
+\r
+       PSOCK_BEGIN(&s->sout);\r
+\r
+       PSOCK_SEND_STR(&s->sout, statushdr);\r
+\r
+       ptr = strrchr(s->filename, ISO_period);\r
+       if(ptr == NULL)\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_binary);\r
+       }\r
+       else if(strncmp(http_html, ptr, 5) == 0 || strncmp(http_shtml, ptr, 6) == 0)\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_html);\r
+       }\r
+       else if(strncmp(http_css, ptr, 4) == 0)\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_css);\r
+       }\r
+       else if(strncmp(http_png, ptr, 4) == 0)\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_png);\r
+       }\r
+       else if(strncmp(http_gif, ptr, 4) == 0)\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_gif);\r
+       }\r
+       else if(strncmp(http_jpg, ptr, 4) == 0)\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_jpg);\r
+       }\r
+       else\r
+       {\r
+               PSOCK_SEND_STR(&s->sout, http_content_type_plain);\r
+       }\r
+\r
+       PSOCK_END(&s->sout);\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static PT_THREAD(handle_output (struct httpd_state *s))\r
+{\r
+       /*~~~~~~~~~*/\r
+       char    *ptr;\r
+       /*~~~~~~~~~*/\r
+\r
+       PT_BEGIN(&s->outputpt);\r
+\r
+       if(!httpd_fs_open(s->filename, &s->file))\r
+       {\r
+               httpd_fs_open(http_404_html, &s->file);\r
+               strcpy(s->filename, http_404_html);\r
+               PT_WAIT_THREAD(&s->outputpt, send_headers(s, http_header_404));\r
+               PT_WAIT_THREAD(&s->outputpt, send_file(s));\r
+       }\r
+       else\r
+       {\r
+               PT_WAIT_THREAD(&s->outputpt, send_headers(s, http_header_200));\r
+               ptr = strchr(s->filename, ISO_period);\r
+               if(ptr != NULL && strncmp(ptr, http_shtml, 6) == 0)\r
+               {\r
+                       vProcessInput( s->filename );\r
+                       PT_INIT(&s->scriptpt);\r
+                       PT_WAIT_THREAD(&s->outputpt, handle_script(s));\r
+               }\r
+               else\r
+               {\r
+                       PT_WAIT_THREAD(&s->outputpt, send_file(s));\r
+               }\r
+       }\r
+\r
+       PSOCK_CLOSE(&s->sout);\r
+       PT_END(&s->outputpt);\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static PT_THREAD(handle_input (struct httpd_state *s))\r
+{\r
+       PSOCK_BEGIN(&s->sin);\r
+\r
+       PSOCK_READTO(&s->sin, ISO_space);\r
+\r
+       if(strncmp(s->inputbuf, http_get, 4) != 0)\r
+       {\r
+               PSOCK_CLOSE_EXIT(&s->sin);\r
+       }\r
+\r
+       PSOCK_READTO(&s->sin, ISO_space);\r
+\r
+       if(s->inputbuf[0] != ISO_slash)\r
+       {\r
+               PSOCK_CLOSE_EXIT(&s->sin);\r
+       }\r
+\r
+       if(s->inputbuf[1] == ISO_space)\r
+       {\r
+               strncpy(s->filename, http_index_html, sizeof(s->filename));\r
+       }\r
+       else\r
+       {\r
+               s->inputbuf[PSOCK_DATALEN(&s->sin) - 1] = 0;\r
+\r
+               /* Process any form input being sent to the server. */\r
+               {\r
+                       /*\r
+                        * extern void vApplicationProcessFormInput( char *pcInputString, long\r
+                        * xInputLength ); Â£\r
+                        * vApplicationProcessFormInput( s->inputbuf, PSOCK_DATALEN(&s->sin) );\r
+                        */\r
+               }\r
+\r
+               strncpy(s->filename, &s->inputbuf[0], sizeof(s->filename));\r
+       }\r
+\r
+       /* httpd_log_file(uip_conn->ripaddr, s->filename); */\r
+       s->state = STATE_OUTPUT;\r
+\r
+       while(1)\r
+       {\r
+               PSOCK_READTO(&s->sin, ISO_nl);\r
+\r
+               if(strncmp(s->inputbuf, http_referer, 8) == 0)\r
+               {\r
+                       s->inputbuf[PSOCK_DATALEN(&s->sin) - 2] = 0;\r
+\r
+                       /* httpd_log(&s->inputbuf[9]); */\r
+               }\r
+       }\r
+\r
+       PSOCK_END(&s->sin);\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+static void handle_connection(struct httpd_state *s)\r
+{\r
+       handle_input(s);\r
+       if(s->state == STATE_OUTPUT)\r
+       {\r
+               handle_output(s);\r
+       }\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+ =======================================================================================================================\r
+ */\r
+void httpd_appcall(void)\r
+{\r
+       /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/\r
+       struct httpd_state      *s = (struct httpd_state *) &(uip_conn->appstate);\r
+       /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/\r
+\r
+       if(uip_closed() || uip_aborted() || uip_timedout())\r
+       {\r
+       }\r
+       else if(uip_connected())\r
+       {\r
+               PSOCK_INIT(&s->sin, s->inputbuf, sizeof(s->inputbuf) - 1);\r
+               PSOCK_INIT(&s->sout, s->inputbuf, sizeof(s->inputbuf) - 1);\r
+               PT_INIT(&s->outputpt);\r
+               s->state = STATE_WAITING;\r
+\r
+               /* timer_set(&s->timer, CLOCK_SECOND * 100); */\r
+               s->timer = 0;\r
+               handle_connection(s);\r
+       }\r
+       else if(s != NULL)\r
+       {\r
+               if(uip_poll())\r
+               {\r
+                       ++s->timer;\r
+                       if(s->timer >= 20)\r
+                       {\r
+                               uip_abort();\r
+                       }\r
+               }\r
+               else\r
+               {\r
+                       s->timer = 0;\r
+               }\r
+\r
+               handle_connection(s);\r
+       }\r
+       else\r
+       {\r
+               uip_abort();\r
+       }\r
+}\r
+\r
+/*\r
+ =======================================================================================================================\r
+    \brief Initialize the web server This function initializes the web server and should be called at system boot-up.\r
+ =======================================================================================================================\r
+ */\r
+void httpd_init(void)\r
+{\r
+       uip_listen(HTONS(80));\r
+}\r
+\r
+/* @} */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/httpd.h
new file mode 100644 (file)
index 0000000..7f7a666
--- /dev/null
@@ -0,0 +1,62 @@
+/*\r
+ * Copyright (c) 2001-2005, Adam Dunkels.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote\r
+ *    products derived from this software without specific prior\r
+ *    written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack.\r
+ *\r
+ * $Id: httpd.h,v 1.2 2006/06/11 21:46:38 adam Exp $\r
+ *\r
+ */\r
+\r
+#ifndef __HTTPD_H__\r
+#define __HTTPD_H__\r
+\r
+#include "psock.h"\r
+#include "httpd-fs.h"\r
+\r
+struct httpd_state {\r
+  unsigned char timer;\r
+  struct psock sin, sout;\r
+  struct pt outputpt, scriptpt;\r
+  char inputbuf[50];\r
+  char filename[20];\r
+  char state;\r
+  struct httpd_fs_file file;\r
+  int len;\r
+  char *scriptptr;\r
+  int scriptlen;\r
+  \r
+  unsigned short count;\r
+};\r
+\r
+void httpd_init(void);\r
+void httpd_appcall(void);\r
+\r
+void httpd_log(char *msg);\r
+void httpd_log_file(u16_t *requester, char *file);\r
+\r
+#endif /* __HTTPD_H__ */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/makefsdata b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/makefsdata
new file mode 100644 (file)
index 0000000..8d2715a
--- /dev/null
@@ -0,0 +1,78 @@
+#!/usr/bin/perl\r
+\r
+open(OUTPUT, "> httpd-fsdata.c");\r
+\r
+chdir("httpd-fs");\r
+\r
+opendir(DIR, ".");\r
+@files =  grep { !/^\./ && !/(CVS|~)/ } readdir(DIR);\r
+closedir(DIR);\r
+\r
+foreach $file (@files) {  \r
+   \r
+    if(-d $file && $file !~ /^\./) {\r
+       print "Processing directory $file\n";\r
+       opendir(DIR, $file);\r
+       @newfiles =  grep { !/^\./ && !/(CVS|~)/ } readdir(DIR);\r
+       closedir(DIR);\r
+       printf "Adding files @newfiles\n";\r
+       @files = (@files, map { $_ = "$file/$_" } @newfiles);\r
+       next;\r
+    }\r
+}\r
+\r
+foreach $file (@files) {\r
+    if(-f $file) {\r
+       \r
+       print "Adding file $file\n";\r
+       \r
+       open(FILE, $file) || die "Could not open file $file\n";\r
+\r
+       $file =~ s-^-/-;\r
+       $fvar = $file;\r
+       $fvar =~ s-/-_-g;\r
+       $fvar =~ s-\.-_-g;\r
+       # for AVR, add PROGMEM here\r
+       print(OUTPUT "static const unsigned char data".$fvar."[] = {\n");\r
+       print(OUTPUT "\t/* $file */\n\t");\r
+       for($j = 0; $j < length($file); $j++) {\r
+           printf(OUTPUT "%#02x, ", unpack("C", substr($file, $j, 1)));\r
+       }\r
+       printf(OUTPUT "0,\n");\r
+       \r
+       \r
+       $i = 0;        \r
+       while(read(FILE, $data, 1)) {\r
+           if($i == 0) {\r
+               print(OUTPUT "\t");\r
+           }\r
+           printf(OUTPUT "%#02x, ", unpack("C", $data));\r
+           $i++;\r
+           if($i == 10) {\r
+               print(OUTPUT "\n");\r
+               $i = 0;\r
+           }\r
+       }\r
+       print(OUTPUT "0};\n\n");\r
+       close(FILE);\r
+       push(@fvars, $fvar);\r
+       push(@pfiles, $file);\r
+    }\r
+}\r
+\r
+for($i = 0; $i < @fvars; $i++) {\r
+    $file = $pfiles[$i];\r
+    $fvar = $fvars[$i];\r
+\r
+    if($i == 0) {\r
+        $prevfile = "NULL";\r
+    } else {\r
+        $prevfile = "file" . $fvars[$i - 1];\r
+    }\r
+    print(OUTPUT "const struct httpd_fsdata_file file".$fvar."[] = {{$prevfile, data$fvar, ");\r
+    print(OUTPUT "data$fvar + ". (length($file) + 1) .", ");\r
+    print(OUTPUT "sizeof(data$fvar) - ". (length($file) + 1) ."}};\n\n");\r
+}\r
+\r
+print(OUTPUT "#define HTTPD_FS_ROOT file$fvars[$i - 1]\n\n");\r
+print(OUTPUT "#define HTTPD_FS_NUMFILES $i\n");\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/makestrings b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/makestrings
new file mode 100644 (file)
index 0000000..8a13c6d
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/perl\r
+\r
+\r
+sub stringify {\r
+  my $name = shift(@_);\r
+  open(OUTPUTC, "> $name.c");\r
+  open(OUTPUTH, "> $name.h");\r
+  \r
+  open(FILE, "$name");\r
+  \r
+  while(<FILE>) {\r
+    if(/(.+) "(.+)"/) {\r
+      $var = $1;\r
+      $data = $2;\r
+      \r
+      $datan = $data;\r
+      $datan =~ s/\\r/\r/g;\r
+      $datan =~ s/\\n/\n/g;\r
+      $datan =~ s/\\01/\01/g;      \r
+      $datan =~ s/\\0/\0/g;\r
+      \r
+      printf(OUTPUTC "const char $var\[%d] = \n", length($datan) + 1);\r
+      printf(OUTPUTC "/* \"$data\" */\n");\r
+      printf(OUTPUTC "{");\r
+      for($j = 0; $j < length($datan); $j++) {\r
+       printf(OUTPUTC "%#02x, ", unpack("C", substr($datan, $j, 1)));\r
+      }\r
+      printf(OUTPUTC "};\n");\r
+      \r
+      printf(OUTPUTH "extern const char $var\[%d];\n", length($datan) + 1);\r
+      \r
+    }\r
+  }\r
+  close(OUTPUTC);\r
+  close(OUTPUTH);\r
+}\r
+stringify("http-strings");\r
+\r
+exit 0;\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.c
new file mode 100644 (file)
index 0000000..4f2d2a8
--- /dev/null
@@ -0,0 +1,197 @@
+/*\r
+ * Modified from an original work that is Copyright (c) 2001-2003, Adam Dunkels.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote\r
+ *    products derived from this software without specific prior\r
+ *    written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack.\r
+ *\r
+ * $Id: main.c,v 1.10.2.4 2003/10/21 21:27:51 adam Exp $\r
+ *\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <stdio.h>\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "semphr.h"\r
+\r
+/* uip includes. */\r
+#include "uip.h"\r
+#include "uip_arp.h"\r
+#include "httpd.h"\r
+#include "timer.h"\r
+#include "clock-arch.h"\r
+\r
+/* Demo includes. */\r
+#include "SAM7_EMAC.h"\r
+#include "partest.h"\r
+\r
+/* How long to wait before attempting to connect the MAC again. */\r
+#define uipINIT_WAIT    ( 100 / portTICK_RATE_MS )\r
+\r
+/* Shortcut to the header within the Rx buffer. */\r
+#define xHeader ((struct uip_eth_hdr *) &uip_buf[ 0 ])\r
+\r
+/* The semaphore used by the ISR to wake the uIP task. */\r
+static xSemaphoreHandle xEMACSemaphore;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vuIP_Task( void *pvParameters )\r
+{\r
+portBASE_TYPE i;\r
+uip_ipaddr_t xIPAddr;\r
+struct timer periodic_timer, arp_timer;\r
+\r
+       /* Initialise the uIP stack. */\r
+       timer_set( &periodic_timer, configTICK_RATE_HZ / 2 );\r
+       timer_set( &arp_timer, configTICK_RATE_HZ * 10 );\r
+       uip_init();\r
+       uip_ipaddr( xIPAddr, uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 );\r
+       uip_sethostaddr( xIPAddr );\r
+       httpd_init();\r
+\r
+       /* Initialise the MAC. */\r
+       do\r
+    {\r
+               vTaskDelay( uipINIT_WAIT );\r
+               xEMACSemaphore = xEMACInit();        \r
+    } while( xEMACSemaphore == NULL );\r
+\r
+       for( ;; )\r
+       {\r
+               /* Is there received data ready to be processed? */\r
+               uip_len = ulEMACPoll();\r
+               \r
+               if( uip_len > 0 )\r
+               {\r
+                       /* Standard uIP loop taken from the uIP manual. */\r
+                       if( xHeader->type == htons( UIP_ETHTYPE_IP ) )\r
+                       {\r
+                               uip_arp_ipin();\r
+                               uip_input();\r
+\r
+                               /* If the above function invocation resulted in data that \r
+                               should be sent out on the network, the global variable \r
+                               uip_len is set to a value > 0. */\r
+                               if( uip_len > 0 )\r
+                               {\r
+                                       uip_arp_out();\r
+                                       lEMACSend();\r
+                               }\r
+                       }\r
+                       else if( xHeader->type == htons( UIP_ETHTYPE_ARP ) )\r
+                       {\r
+                               uip_arp_arpin();\r
+\r
+                               /* If the above function invocation resulted in data that \r
+                               should be sent out on the network, the global variable \r
+                               uip_len is set to a value > 0. */\r
+                               if( uip_len > 0 )\r
+                               {\r
+                                       lEMACSend();\r
+                               }\r
+                       }\r
+               }\r
+               else\r
+               {\r
+                       if( timer_expired( &periodic_timer ) )\r
+                       {\r
+                               timer_reset( &periodic_timer );\r
+                               for( i = 0; i < UIP_CONNS; i++ )\r
+                               {\r
+                                       uip_periodic( i );\r
+       \r
+                                       /* If the above function invocation resulted in data that \r
+                                       should be sent out on the network, the global variable \r
+                                       uip_len is set to a value > 0. */\r
+                                       if( uip_len > 0 )\r
+                                       {\r
+                                               uip_arp_out();\r
+                                               lEMACSend();\r
+                                       }\r
+                               }       \r
+       \r
+                               /* Call the ARP timer function every 10 seconds. */\r
+                               if( timer_expired( &arp_timer ) )\r
+                               {\r
+                                       timer_reset( &arp_timer );\r
+                                       uip_arp_timer();\r
+                               }\r
+                       }\r
+                       else\r
+                       {                       \r
+                               /* We did not receive a packet, and there was no periodic\r
+                               processing to perform.  Block for a fixed period.  If a packet\r
+                               is received during this period we will be woken by the ISR\r
+                               giving us the Semaphore. */\r
+                               xSemaphoreTake( xEMACSemaphore, configTICK_RATE_HZ / 2 );                       \r
+                       }\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+\r
+void clock_init(void)\r
+{\r
+       /* This is done when the scheduler starts. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+clock_time_t clock_time( void )\r
+{\r
+       return xTaskGetTickCount();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vProcessInput( char *pcInput )\r
+{\r
+char *c;\r
+\r
+       /* Turn the LED on or off depending on the checkbox status. */\r
+\r
+       c = strstr( pcInput, "?" );\r
+       if( c )\r
+       {\r
+               if( strstr( c, "LED0=1" ) != NULL )\r
+               {\r
+                       vParTestSetLED( 3, 0 );\r
+               }\r
+               else\r
+               {\r
+                       vParTestSetLED( 3, 1 );\r
+               }               \r
+       }\r
+}\r
+\r
+\r
+\r
+\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uIP_Task.h
new file mode 100644 (file)
index 0000000..3b9e73a
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+       FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 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
+       See http://www.FreeRTOS.org for documentation, latest information, license \r
+       and contact details.  Please ensure to read the configuration and relevant \r
+       port sections of the online documentation.\r
+\r
+       Also see http://www.SafeRTOS.com a version that has been certified for use\r
+       in safety critical systems, plus commercial licensing, development and\r
+       support options.\r
+       ***************************************************************************\r
+*/\r
+\r
+#ifndef UIP_TASK_H\r
+#define UIP_TASK_H\r
+\r
+/* The task that handles all uIP data. */\r
+void vuIP_Task( void *pvParameters );\r
+\r
+#endif\r
+\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uip-conf.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/uip-conf.h
new file mode 100644 (file)
index 0000000..3e6f7f3
--- /dev/null
@@ -0,0 +1,157 @@
+/**\r
+ * \addtogroup uipopt\r
+ * @{\r
+ */\r
+\r
+/**\r
+ * \name Project-specific configuration options\r
+ * @{\r
+ *\r
+ * uIP has a number of configuration options that can be overridden\r
+ * for each project. These are kept in a project-specific uip-conf.h\r
+ * file and all configuration names have the prefix UIP_CONF.\r
+ */\r
+\r
+/*\r
+ * Copyright (c) 2006, Swedish Institute of Computer Science.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ * 3. Neither the name of the Institute nor the names of its contributors\r
+ *    may be used to endorse or promote products derived from this software\r
+ *    without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE\r
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+ * SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack\r
+ *\r
+ * $Id: uip-conf.h,v 1.6 2006/06/12 08:00:31 adam Exp $\r
+ */\r
+\r
+/**\r
+ * \file\r
+ *         An example uIP configuration file\r
+ * \author\r
+ *         Adam Dunkels <adam@sics.se>\r
+ */\r
+\r
+#ifndef __UIP_CONF_H__\r
+#define __UIP_CONF_H__\r
+\r
+#include <stdint.h>\r
+\r
+/**\r
+ * 8 bit datatype\r
+ *\r
+ * This typedef defines the 8-bit type used throughout uIP.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+typedef uint8_t u8_t;\r
+\r
+/**\r
+ * 16 bit datatype\r
+ *\r
+ * This typedef defines the 16-bit type used throughout uIP.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+typedef uint16_t u16_t;\r
+\r
+/**\r
+ * Statistics datatype\r
+ *\r
+ * This typedef defines the dataype used for keeping statistics in\r
+ * uIP.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+typedef unsigned short uip_stats_t;\r
+\r
+/**\r
+ * Maximum number of TCP connections.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_MAX_CONNECTIONS 40\r
+\r
+/**\r
+ * Maximum number of listening TCP ports.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_MAX_LISTENPORTS 40\r
+\r
+/**\r
+ * uIP buffer size.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_BUFFER_SIZE     1480\r
+\r
+/**\r
+ * CPU byte order.\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_BYTE_ORDER      LITTLE_ENDIAN\r
+\r
+/**\r
+ * Logging on or off\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_LOGGING         0\r
+\r
+/**\r
+ * UDP support on or off\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_UDP             0\r
+\r
+/**\r
+ * UDP checksums on or off\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_UDP_CHECKSUMS   1\r
+\r
+/**\r
+ * uIP statistics on or off\r
+ *\r
+ * \hideinitializer\r
+ */\r
+#define UIP_CONF_STATISTICS      1\r
+\r
+/* Here we include the header file for the application(s) we use in\r
+   our project. */\r
+/*#include "smtp.h"*/\r
+/*#include "hello-world.h"*/\r
+/*#include "telnetd.h"*/\r
+#include "webserver.h"\r
+/*#include "dhcpc.h"*/\r
+/*#include "resolv.h"*/\r
+/*#include "webclient.h"*/\r
+\r
+#endif /* __UIP_CONF_H__ */\r
+\r
+/** @} */\r
+/** @} */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/webserver.h b/Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/webserver/webserver.h
new file mode 100644 (file)
index 0000000..1acb290
--- /dev/null
@@ -0,0 +1,49 @@
+/*\r
+ * Copyright (c) 2002, Adam Dunkels.\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above\r
+ *    copyright notice, this list of conditions and the following\r
+ *    disclaimer in the documentation and/or other materials provided\r
+ *    with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote\r
+ *    products derived from this software without specific prior\r
+ *    written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS\r
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\r
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * This file is part of the uIP TCP/IP stack\r
+ *\r
+ * $Id: webserver.h,v 1.2 2006/06/11 21:46:38 adam Exp $\r
+ *\r
+ */\r
+#ifndef __WEBSERVER_H__\r
+#define __WEBSERVER_H__\r
+\r
+#include "httpd.h"\r
+\r
+typedef struct httpd_state uip_tcp_appstate_t;\r
+/* UIP_APPCALL: the name of the application function. This function\r
+   must return void and take no arguments (i.e., C type "void\r
+   appfunc(void)"). */\r
+#ifndef UIP_APPCALL\r
+#define UIP_APPCALL     httpd_appcall\r
+#endif\r
+\r
+\r
+#endif /* __WEBSERVER_H__ */\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/SAM7_flash.cfg b/Demo/ARM7_AT91SAM7X256_Eclipse/SAM7_flash.cfg
new file mode 100644 (file)
index 0000000..2fb93b3
--- /dev/null
@@ -0,0 +1,30 @@
+#daemon configuration\r
+telnet_port 4444\r
+gdb_port 3333\r
+\r
+#interface\r
+interface parport\r
+parport_port 0x378\r
+parport_cable wiggler\r
+jtag_speed 2\r
+\r
+#use combined on interfaces or targets that can't set TRST/SRST separately\r
+reset_config trst_and_srst srst_pulls_trst\r
+\r
+#jtag scan chain\r
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)\r
+jtag_device 4 0x1 0xf 0xe\r
+\r
+#target configuration\r
+daemon_startup reset\r
+\r
+#target <type> <startup mode>\r
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>\r
+target arm7tdmi little run_and_init 0 arm7tdmi\r
+run_and_halt_time 0 30\r
+working_area 0 0x40000000 0x40000 nobackup\r
+\r
+#flash configuration\r
+flash bank at91sam7 0 0 0 0 0\r
+\r
+target_script 0 reset program.script\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/SAM7_pp.cfg b/Demo/ARM7_AT91SAM7X256_Eclipse/SAM7_pp.cfg
new file mode 100644 (file)
index 0000000..3cb965f
--- /dev/null
@@ -0,0 +1,26 @@
+#daemon configuration\r
+telnet_port 4444\r
+gdb_port 3333\r
+\r
+#interface\r
+interface parport\r
+parport_port 0x378\r
+parport_cable wiggler\r
+jtag_speed 2\r
+reset_config srst_only\r
+\r
+#jtag scan chain\r
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)\r
+jtag_device 4 0x1 0xf 0xe\r
+\r
+#target configuration\r
+daemon_startup reset\r
+\r
+#target <type> <startup mode>\r
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>\r
+target arm7tdmi little reset_halt 0 arm7tdmi\r
+target_script 0 reset at91sam7_ecr.script\r
+working_area 0 0x40000000 0x40000 nobackup\r
+\r
+#flash configuration\r
+flash bank at91sam7 0 0 0 0 0\r
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/at91sam7_ecr.cfg b/Demo/ARM7_AT91SAM7X256_Eclipse/at91sam7_ecr.cfg
new file mode 100644 (file)
index 0000000..69a2d4d
--- /dev/null
@@ -0,0 +1,25 @@
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface at91rm9200
+at91rm9200_device rea_ecr
+jtag_speed 0
+reset_config srst_only
+
+#jtag scan chain
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
+jtag_device 4 0x1 0xf 0xe
+
+#target configuration
+daemon_startup reset
+
+#target <type> <startup mode>
+#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
+target arm7tdmi little reset_halt 0 arm7tdmi
+target_script 0 reset at91sam7_ecr.script
+working_area 0 0x40000000 0x40000 nobackup
+
+#flash configuration
+flash bank at91sam7 0 0 0 0 0
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/at91sam7_ecr.script b/Demo/ARM7_AT91SAM7X256_Eclipse/at91sam7_ecr.script
new file mode 100644 (file)
index 0000000..2d47380
--- /dev/null
@@ -0,0 +1,13 @@
+halt\r
+wait_halt\r
+sleep 10\r
+mww 0xfffffd44 0x00008000      # disable watchdog
+mww 0xfffffd08 0xa5000001      # enable user reset
+mww 0xfffffc20 0x00000601      # CKGR_MOR : enable the main oscillator
+sleep 10
+mww 0xfffffc2c 0x12560a64      # CKGR_PLLR: 119.8MHz (DIV=100,MUL=598+1)
+sleep 10
+mww 0xfffffc30 0x00000007      # PMC_MCKR : MCK = PLL / 2 = 59.9MHz
+sleep 10
+mww 0xffffff60 0x003c0100      # MC_FMR: flash mode (FWS=1,FMCN=60)
+arm7_9 force_hw_bkpts enable   # program resides in flash
diff --git a/Demo/ARM7_AT91SAM7X256_Eclipse/program.script b/Demo/ARM7_AT91SAM7X256_Eclipse/program.script
new file mode 100644 (file)
index 0000000..a60e135
--- /dev/null
@@ -0,0 +1,11 @@
+arm7_9 dcc_downloads enable\r
+halt\r
+wait_halt\r
+sleep 10\r
+poll\r
+flash probe 0\r
+#flash protect 0 0 26 'off'\r
+flash erase 0 0 15\r
+flash write 0 ./RTOSDemo/RTOSDemo.bin 0x0\r
+sleep 10\r
+shutdown\r