From cde04f6c50c2ef98ba353092e87bc59537a8b192 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 12 Sep 2010 20:56:04 +0000 Subject: [PATCH] Add in web server to RX/IAR demo application. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1091 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Demo/RX600_RX62N-MDK_IAR/FreeRTOSConfig.h | 19 +- .../HighFrequencyTimerTest.c | 7 + Demo/RX600_RX62N-MDK_IAR/RTOSDemo.ewd | 2 +- Demo/RX600_RX62N-MDK_IAR/RTOSDemo.ewp | 109 +- .../Renesas-Files/hwsetup.c | 195 +- Demo/RX600_RX62N-MDK_IAR/main-blinky.c | 13 +- Demo/RX600_RX62N-MDK_IAR/main-full.c | 175 +- .../settings/RTOSDemo.dbgdt | 30 +- .../RX600_RX62N-MDK_IAR/settings/RTOSDemo.dni | 8 +- .../settings/RTOSDemo.wsdt | 8 +- Demo/RX600_RX62N-MDK_IAR/uIP_Task.c | 266 ++ Demo/RX600_RX62N-MDK_IAR/webserver/EMAC.c | 555 +++ .../RX600_RX62N-MDK_IAR/webserver/httpd-cgi.c | 277 ++ .../webserver/httpd-fs/404.html | 8 + .../webserver/httpd-fs/index.html | 13 + .../webserver/httpd-fs/index.shtml | 20 + .../webserver/httpd-fs/io.shtml | 28 + .../webserver/httpd-fs/logo.jpg | Bin 0 -> 32592 bytes .../webserver/httpd-fs/runtime.shtml | 20 + .../webserver/httpd-fs/stats.shtml | 47 + .../webserver/httpd-fs/tcp.shtml | 21 + .../webserver/httpd-fsdata.c | 3871 +++++++++++++++++ Demo/RX600_RX62N-MDK_IAR/webserver/makefsdata | 79 + Demo/RX600_RX62N-MDK_IAR/webserver/phy.c | 468 ++ Demo/RX600_RX62N-MDK_IAR/webserver/phy.h | 84 + Demo/RX600_RX62N-MDK_IAR/webserver/r_ether.h | 185 + Demo/RX600_RX62N-MDK_IAR/webserver/uip-conf.h | 167 + .../RX600_RX62N-MDK_IAR/webserver/webserver.h | 47 + 28 files changed, 6564 insertions(+), 158 deletions(-) create mode 100644 Demo/RX600_RX62N-MDK_IAR/uIP_Task.c create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/EMAC.c create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-cgi.c create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/404.html create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/index.html create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/index.shtml create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/io.shtml create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/logo.jpg create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/runtime.shtml create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/stats.shtml create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fs/tcp.shtml create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/httpd-fsdata.c create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/makefsdata create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/phy.c create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/phy.h create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/r_ether.h create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/uip-conf.h create mode 100644 Demo/RX600_RX62N-MDK_IAR/webserver/webserver.h diff --git a/Demo/RX600_RX62N-MDK_IAR/FreeRTOSConfig.h b/Demo/RX600_RX62N-MDK_IAR/FreeRTOSConfig.h index 7990d1b91..c9f684505 100644 --- a/Demo/RX600_RX62N-MDK_IAR/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-MDK_IAR/FreeRTOSConfig.h @@ -70,7 +70,7 @@ *----------------------------------------------------------*/ #define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 1 +#define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ICLK_FREQUENCY ) /* Set in rskrx62ndef.h. */ #define configPERIPHERAL_CLOCK_HZ ( PCLK_FREQUENCY ) /* Set in rskrx62ndef.h. */ @@ -78,19 +78,19 @@ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 140 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 45 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) -#define configUSE_TRACE_FACILITY 0 +#define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 #define configUSE_CO_ROUTINES 0 #define configUSE_MUTEXES 1 -#define configGENERATE_RUN_TIME_STATS 0 +#define configGENERATE_RUN_TIME_STATS 1 #define configCHECK_FOR_STACK_OVERFLOW 2 #define configUSE_RECURSIVE_MUTEXES 1 #define configQUEUE_REGISTRY_SIZE 0 #define configUSE_MALLOC_FAILED_HOOK 1 #define configUSE_APPLICATION_TASK_TAG 0 -#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) +#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) /* The interrupt priority used by the kernel itself for the tick interrupt and @@ -120,6 +120,15 @@ to exclude the API function. */ #define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_xTaskGetSchedulerState 1 +extern volatile unsigned long ulHighFrequencyTickCount; +#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() portNOP() /* Run time stats use the same timer as the high frequency timer test. */ +#define portGET_RUN_TIME_COUNTER_VALUE() ulHighFrequencyTickCount + + +/* Override some of the priorities set in the common demo tasks. This is +required to ensure flase positive timing errors are not reported. */ +#define bktPRIMARY_PRIORITY ( configMAX_PRIORITIES - 2 ) +#define bktSECONDARY_PRIORITY ( configMAX_PRIORITIES - 3 ) /*----------------------------------------------------------- @@ -138,7 +147,7 @@ to exclude the API function. */ #define configIP_ADDR0 192 #define configIP_ADDR1 168 #define configIP_ADDR2 0 -#define configIP_ADDR3 201 +#define configIP_ADDR3 200 /* Netmask configuration. */ #define configNET_MASK0 255 diff --git a/Demo/RX600_RX62N-MDK_IAR/HighFrequencyTimerTest.c b/Demo/RX600_RX62N-MDK_IAR/HighFrequencyTimerTest.c index a26ccc01e..50250217b 100644 --- a/Demo/RX600_RX62N-MDK_IAR/HighFrequencyTimerTest.c +++ b/Demo/RX600_RX62N-MDK_IAR/HighFrequencyTimerTest.c @@ -83,6 +83,10 @@ __interrupt void vTimer2IntHandler( void ); /* Stores the value of the maximum recorded jitter between interrupts. */ volatile unsigned short usMaxJitter = 0; +/* Counts the number of high frequency interrupts - used to generate the run +time stats. */ +volatile unsigned long ulHighFrequencyTickCount = 0UL; + /*-----------------------------------------------------------*/ void vSetupHighFrequencyTimer( void ) @@ -147,6 +151,9 @@ static unsigned long ulErrorCount = 0UL; usMaxCount = usCurrentCount; } + /* Used to generate the run time stats. */ + ulHighFrequencyTickCount++; + /* Clear the timer. */ timerTIMER_3_COUNT_VALUE = 0; diff --git a/Demo/RX600_RX62N-MDK_IAR/RTOSDemo.ewd b/Demo/RX600_RX62N-MDK_IAR/RTOSDemo.ewd index 2808ba314..d977e66ee 100644 --- a/Demo/RX600_RX62N-MDK_IAR/RTOSDemo.ewd +++ b/Demo/RX600_RX62N-MDK_IAR/RTOSDemo.ewd @@ -262,7 +262,7 @@