From 5c9ff6dd0291894e4188cd8dc63345848d12c369 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 5 Sep 2010 20:06:30 +0000 Subject: [PATCH] Start to configure the uIP demo for the RX RDK hardware. ping is working, but thus far the web server is not. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1081 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.Hbp | 2 +- Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws | 2 + .../RTOSDemo/FreeRTOSConfig.h | 6 +- .../RTOSDemo/RTOSDemo.hwp | 4 +- .../RTOSDemo/RTOSDemo.nav | Bin 130648 -> 130529 bytes .../RTOSDemo/SessionRX600_E1_E20_SYSTEM.hsf | 123 +++++++++++++----- .../RTOSDemo/webserver/EMAC.c | 97 ++++++++------ .../RTOSDemo/webserver/uip-conf.h | 2 +- 8 files changed, 152 insertions(+), 84 deletions(-) diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.Hbp b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.Hbp index 2a473f11a..0d3910dbc 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.Hbp +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.Hbp @@ -1,4 +1,4 @@ [Setting] ToolChain=0 [Section] -WindowSize=341,352 +WindowSize=726,544 diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws index ef666fddb..91b379218 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo.tws @@ -7,7 +7,9 @@ [GENERAL_DATA] [BREAKPOINTS] [OPEN_WORKSPACE_FILES] +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" [WORKSPACE_FILE_STATES] +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" -4 -23 982 516 1 0 [LOADED_PROJECTS] "RTOSDemo" [END] diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h index ae232e346..7a3ea5f6f 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/FreeRTOSConfig.h @@ -135,9 +135,9 @@ to exclude the API function. */ #define configMAC_ADDR5 0x11 /* IP address configuration. */ -#define configIP_ADDR0 172 -#define configIP_ADDR1 25 -#define configIP_ADDR2 218 +#define configIP_ADDR0 192 +#define configIP_ADDR1 168 +#define configIP_ADDR2 0 #define configIP_ADDR3 200 /* Netmask configuration. */ diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.hwp b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.hwp index 1aa687967..340acd12c 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.hwp +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.hwp @@ -273,7 +273,7 @@ [LINKAGE_ORDER_Blinky] [GENERAL_DATA_CONFIGURATION_Blinky] [OPTIONS_Debug_Renesas OptLinker] -"Single Shot" "0cb38d9776b4bc10" 5 +"Single Shot" "0413bf9353d4bc10" 5 [OPTIONS_Debug_Renesas RX Assembler] "Assembly source file" "088b30f0a993bc10" 4 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\Renesas-Files\lowlvl.src" "0cd92d23ed14bc10" 4 @@ -337,7 +337,7 @@ " 2 "[V|VERSION|1] [S|MODE|BUILD/CHANGED] [S|EXISTOUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|RUNTIME|1] [B|MATH|1] [B|STDIO|1] [B|STDLIB|1] [B|STRING|1] [B|NOFLOAT|1] [S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [B|SIZE|1] [I|INLINE|100] [I|LOOP|2] [S|CPU|RX600] [S|BASE|00000000=NONE] [B|SKIPDEPENDENCY|1] " 1 -"[V|VERSION|6] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)|(D_1,R_1)|(D_2,R_2)] [S|CRC|NONE|DEFAULT|00000000] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|SHOW|METHODCUSTOM|] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [I|SPACE|^"FF^"] [B|OPTIMIZE|0] [S|START|B_1,R_1,B_2,R_2,B,R,SU,SI(01000)|PResetPRG(0FFF80000)|C_1,C_2,C,C$*,D*,P,PIntPRG,W*(0FFF81000)|FIXEDVECT(0FFFFFFD0)] [B|SKIPDEPENDENCY|1] +"[V|VERSION|6] [S|PRELINK|SKIP] [S|FORM|STYPE] [S|BYTE_COUNT_VALUE|FF] [B|DEBUG|1] [S|ROM|(D,R)|(D_1,R_1)|(D_2,R_2)] [S|CRC|NONE|DEFAULT|00000000] [B|LIST|1] [S|LIST|^"$(CONFIGDIR)\$(PROJECTNAME).map^"] [S|SHOW|METHODCUSTOM|] [S|OUTPUT|^"$(CONFIGDIR)\$(PROJECTNAME).mot^"] [I|SPACE|^"FF^"] [B|OPTIMIZE|0] [S|START|B_RX_DESC,B_TX_DESC,B_ETHERNET_BUFFERS,B_1,R_1,B_2,R_2,B,R,SU,SI(01000)|PResetPRG(0FFF80000)|C_1,C_2,C,C$*,D*,P,PIntPRG,W*(0FFF81000)|FIXEDVECT(0FFFFFFD0)] [B|SKIPDEPENDENCY|1] " 5 [EXCLUDED_FILES_Debug] "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-blinky.c" diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.nav b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/RTOSDemo.nav index 39863df2d58806ac89bbe870e9951b84507ff86a..1977f93ee836afcbb854ee186c67f438d253b040 100644 GIT binary patch delta 592 zcmZvXQAkr^7>0fS&dxb2rn4I76t$)oT|^n@#_-gtLtB<^&JBeOnFg&QSPZ%~)7!cU z{_+Pef{5s%B=vxQQCScLu^XeZ1gSGhh-56h$fyn4{!@3}J>UC&@B8t6EGvaSif5hC z(zb2Nb5z4IYUnyWt!+U>(3s{&O3*V+L#LpUwh4(UZKomKPt$r+eY7hwaJ;K0no9L{ z_w-k-5WTGX(D#o#-bgfN^$lb%_SOpQw|ZulG=QF}Xm;|$L(sN`vvlt}m9{Q!v{x4b zGI=6QI^#6bAxEVLojYX3-7h=KAVY$uzYK#!T$z0xSBdSWI*LKEe&p%_2M|LMR_ZvIeWIuMX!)ZvoeF<4fPOr>g&BSV#4VDWd$kHQFxc@t**Y;Gt aql8<^|2GRIba4MFMm=jh=i}eX$l))KN!g+R delta 627 zcmYk1T}V@59L9U*&e>;d*6JI1V0#7P-~%O0<^Pcr)51+CsMTcGAzU#7XI9 zlZeqBX!7i9^PlZ$kvoZLKA3`q+{^HZ=9wh;s!&*Pxcq`G(sj`v3WtRHXm_Y%a~p|G z@ic1$OHAp&hPwZ)o}l0lToAg$!Om_W6cB=?%5Axlh@`i%h)eU|;*;{qjqDfTyn^Io zAFxZohTI)39?D4OzFP54AxqwcA%#9nYstuhHqn#6s#kqqLGEX`MCH=FTBTOWObo>; z)hi_?SKhE>Z_$KD32$+D9h$^^E!;JFx5Mdj%7;tb+&Be~+OWjMAar0(Sh<40LP(I=;iLbefg^imQA-LU5IZl7lot<)aFA=)?y6J0Y4t(Z?@rs8ku<_omb`U!NhC7&Mu zfsNGGi}hk=0;lcT=-i^y@Z>eCWr;=)JLxVV#!#Oo`D-ykSLjGr~ bIP@9uav(~>|32773|32774|<>|32820|<>|32801|32824" "0.0" -"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 307 0 0 350 200 17 0 "57634|57637|57633|<>|32781|32782|<>|32780|32785|32787" "0.0" +"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.07" 344 0 0 350 200 17 0 "32771|32772|32778|<>|32773|32774|<>|32820|<>|32801|32824" "0.0" +"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 307 0 0 350 200 17 0 "57634|57637|57633|<>|32781|32782|<>|32780|32785|32787" "0.0" "{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 0 0 1062 571 9 0 "" "0.0" -"{WK_00000001_IO}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 3 "0.58" 270 0 0 350 200 17 0 "32817|32826|32819|32820|32821" "0.0" -"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.64" 289 0 0 350 200 2065 0 "42202|42203|42204|42233|<>|42206|42205|42230|42229|42207|<>|42208|42209|42210|49076|42228|42227|<>|42231|42232|42234|42235|<>|42211|<>" "0.0" -"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "0.97" 270 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" -"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 307 0 0 350 200 2065 0 "" "0.0" -"{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 1 "0.03" 270 0 0 853 610 18 0 "32781|32783|<>|32771|32829|32772|32827|32773|<>|32786|<>|32810|32811" "0.0" +"{WK_00000001_IO}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 3 "0.39" 344 0 0 350 200 17 0 "32817|32826|32819|32820|32821" "0.0" +"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.35" 344 0 0 350 200 2065 0 "42202|42203|42204|42233|<>|42206|42205|42230|42229|42207|<>|42208|42209|42210|49076|42228|42227|<>|42231|42232|42234|42235|<>|42211|<>" "0.0" +"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 344 560 340 350 200 18 0 "36756|36757|36758|36759|<>|36746|36747|<>|39531|<>|39500|39534|<>|36687" "0.0" +"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 307 0 0 350 200 18 0 "" "0.0" +"{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 1 "0.72" 344 0 0 853 610 17 0 "32781|32783|<>|32771|32829|32772|32827|32773|<>|32786|<>|32810|32811" "0.0" "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 360 560 340 350 200 18 0 "" "0.0" "{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" "{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" @@ -352,6 +401,7 @@ [WINDOW_POSITION_STATE_DATA_VD3] [WINDOW_POSITION_STATE_DATA_VD4] [WINDOW_Z_ORDER] +"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N-RDK_Renesas\RTOSDemo\main-full.c" [TARGET_NAME] "RX600 E1/E20 SYSTEM" "" 0 [STATUSBAR_STATEINFO_VD1] @@ -374,8 +424,8 @@ "SBK_TAR_EMUE100|Exception" 1 "SBK_TAR_EMUE100|BreakCondition" 1 "SBK_TAR_EMUE100|TaskID" 1 -"SBK_TAR_EMUE100|PC" 1 "SBK_TAR_EMUE100|ExecutionTime" 1 +"SBK_TAR_EMUE100|PC" 1 [STATUSBAR_DEBUGGER_PANESTATE_VD2] [STATUSBAR_DEBUGGER_PANESTATE_VD3] [STATUSBAR_DEBUGGER_PANESTATE_VD4] @@ -403,4 +453,5 @@ [FLASH_DETAILS] "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" [BREAKPOINTS] +"c:\e\dev\freertos\workingcopy\demo\rx600_rx62n-rdk_renesas\rtosdemo\main-full.c" 436 -450004 1 "{00000000-0000-0000-C000-000000000046}" "" [END] diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c index 2824ca066..5181d452f 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/EMAC.c @@ -55,7 +55,6 @@ #include "iodefine.h" #include "typedefine.h" #include "r_ether.h" -#include "phy.h" /* FreeRTOS includes. */ #include "FreeRTOS.h" @@ -95,28 +94,24 @@ become free. */ /*-----------------------------------------------------------*/ -/* The buffers and descriptors themselves. */ -static union x_RX_Desc -{ - unsigned long long ullAlignmentVariable; - ethfifo xDescriptorArray[ emacNUM_RX_DESCRIPTORS ]; -} xRxDescriptors; +/* The buffers and descriptors themselves. */ +#pragma section _RX_DESC + volatile ethfifo xRxDescriptors[ emacNUM_RX_DESCRIPTORS ]; +#pragma section _TX_DESC + volatile ethfifo xTxDescriptors[ emacNUM_TX_BUFFERS ]; +#pragma section _ETHERNET_BUFFERS + struct + { + unsigned long ulAlignmentVariable; + char cBuffer[ emacNUM_BUFFERS ][ UIP_BUFSIZE ]; + } xEthernetBuffers; +#pragma section -static union x_TX_Desc -{ - unsigned long long ullAlignmentVariable; - ethfifo xDescriptorArray[ emacNUM_TX_BUFFERS ]; -} xTxDescriptors; -static union x_ETH_Buffers -{ - unsigned long long ullAlignmentVariable; - char xDataBuffers[ emacNUM_BUFFERS ][ UIP_BUFSIZE ]; -} xEthernetBuffers; /* Used to indicate which buffers are free and which are in use. If an index -contains 0 then the corresponding buffer in xEthernetBuffers.xDataBuffers is free, otherwise +contains 0 then the corresponding buffer in xEthernetBuffers is free, otherwise the buffer is in use or about to be used. */ static unsigned char ucBufferInUse[ emacNUM_BUFFERS ]; @@ -128,7 +123,7 @@ static unsigned char ucBufferInUse[ emacNUM_BUFFERS ]; static void prvInitialiseDescriptors( void ); /* - * Return a pointer to a free buffer within xEthernetBuffers.xDataBuffers. + * Return a pointer to a free buffer within xEthernetBuffers. */ static unsigned char *prvGetNextBuffer( void ); @@ -204,7 +199,7 @@ long x; /* Wait until the second transmission of the last packet has completed. */ for( x = 0; x < emacTX_WAIT_ATTEMPTS; x++ ) { - if( ( xTxDescriptors.xDescriptorArray[ 1 ].status & ACT ) != 0 ) + if( ( xTxDescriptors[ 1 ].status & ACT ) != 0 ) { /* Descriptor is still active. */ vTaskDelay( emacTX_WAIT_DELAY_ms ); @@ -216,27 +211,27 @@ long x; } /* Is the descriptor free after waiting for it? */ - if( ( xTxDescriptors.xDescriptorArray[ 1 ].status & ACT ) != 0 ) + if( ( xTxDescriptors[ 1 ].status & ACT ) != 0 ) { /* Something has gone wrong. */ prvResetEverything(); } /* Setup both descriptors to transmit the frame. */ - xTxDescriptors.xDescriptorArray[ 0 ].buf_p = ( char * ) uip_buf; - xTxDescriptors.xDescriptorArray[ 0 ].bufsize = uip_len; - xTxDescriptors.xDescriptorArray[ 1 ].buf_p = ( char * ) uip_buf; - xTxDescriptors.xDescriptorArray[ 1 ].bufsize = uip_len; + xTxDescriptors[ 0 ].buf_p = ( char * ) uip_buf; + xTxDescriptors[ 0 ].bufsize = uip_len; + xTxDescriptors[ 1 ].buf_p = ( char * ) uip_buf; + xTxDescriptors[ 1 ].bufsize = uip_len; /* uip_buf is being sent by the Tx descriptor. Allocate a new buffer for use by the stack. */ uip_buf = prvGetNextBuffer(); /* Clear previous settings and go. */ - xTxDescriptors.xDescriptorArray[0].status &= ~( FP1 | FP0 ); - xTxDescriptors.xDescriptorArray[0].status |= ( FP1 | FP0 | ACT ); - xTxDescriptors.xDescriptorArray[1].status &= ~( FP1 | FP0 ); - xTxDescriptors.xDescriptorArray[1].status |= ( FP1 | FP0 | ACT ); + xTxDescriptors[0].status &= ~( FP1 | FP0 ); + xTxDescriptors[0].status |= ( FP1 | FP0 | ACT ); + xTxDescriptors[1].status &= ~( FP1 | FP0 ); + xTxDescriptors[1].status |= ( FP1 | FP0 | ACT ); EDMAC.EDTRR.LONG = 0x00000001; } @@ -282,15 +277,28 @@ long lReturn; { /* Half duplex link */ case PHY_LINK_100H: + ETHERC.ECMR.BIT.DM = 0; + ETHERC.ECMR.BIT.RTM = 1; + lReturn = pdPASS; + break; + case PHY_LINK_10H: ETHERC.ECMR.BIT.DM = 0; + ETHERC.ECMR.BIT.RTM = 0; lReturn = pdPASS; break; + /* Full duplex link */ case PHY_LINK_100F: + ETHERC.ECMR.BIT.DM = 1; + ETHERC.ECMR.BIT.RTM = 1; + lReturn = pdPASS; + break; + case PHY_LINK_10F: ETHERC.ECMR.BIT.DM = 1; + ETHERC.ECMR.BIT.RTM = 0; lReturn = pdPASS; break; @@ -327,13 +335,13 @@ long x; /* Initialise the Rx descriptors. */ for( x = 0; x < emacNUM_RX_DESCRIPTORS; x++ ) { - pxDescriptor = &( xRxDescriptors.xDescriptorArray[ x ] ); - pxDescriptor->buf_p = &( xEthernetBuffers.xDataBuffers[ x ][ 0 ] ); + pxDescriptor = &( xRxDescriptors[ x ] ); + pxDescriptor->buf_p = &( xEthernetBuffers.cBuffer[ x ][ 0 ] ); pxDescriptor->bufsize = UIP_BUFSIZE; pxDescriptor->size = 0; pxDescriptor->status = ACT; - pxDescriptor->next = &xRxDescriptors.xDescriptorArray[ x + 1 ]; + pxDescriptor->next = &xRxDescriptors[ x + 1 ]; /* Mark this buffer as in use. */ ucBufferInUse[ x ] = pdTRUE; @@ -341,12 +349,12 @@ long x; /* The last descriptor points back to the start. */ pxDescriptor->status |= DL; - pxDescriptor->next = &xRxDescriptors.xDescriptorArray[ 0 ]; + pxDescriptor->next = &xRxDescriptors[ 0 ]; /* Initialise the Tx descriptors. */ for( x = 0; x < emacNUM_TX_BUFFERS; x++ ) { - pxDescriptor = &( xTxDescriptors.xDescriptorArray[ x ] ); + pxDescriptor = &( xTxDescriptors[ x ] ); /* A buffer is not allocated to the Tx descriptor until a send is actually required. */ @@ -355,15 +363,15 @@ long x; pxDescriptor->bufsize = UIP_BUFSIZE; pxDescriptor->size = 0; pxDescriptor->status = 0; - pxDescriptor->next = &xTxDescriptors.xDescriptorArray[ x + 1 ]; + pxDescriptor->next = &xTxDescriptors[ x + 1 ]; } /* The last descriptor points back to the start. */ pxDescriptor->status |= DL; - pxDescriptor->next = &( xTxDescriptors.xDescriptorArray[ 0 ] ); + pxDescriptor->next = &( xTxDescriptors[ 0 ] ); /* Use the first Rx descriptor to start with. */ - xCurrentRxDesc = &( xRxDescriptors.xDescriptorArray[ 0 ] ); + xCurrentRxDesc = &( xRxDescriptors[ 0 ] ); } /*-----------------------------------------------------------*/ @@ -382,7 +390,7 @@ unsigned long ulAttempts = 0; if( ucBufferInUse[ x ] == pdFALSE ) { ucBufferInUse[ x ] = pdTRUE; - pucReturn = ( unsigned char * ) &( xEthernetBuffers.xDataBuffers[ x ][ 0 ] ); + pucReturn = ( unsigned char * ) &( xEthernetBuffers.cBuffer[ x ][ 0 ] ); break; } } @@ -413,7 +421,7 @@ unsigned long ul; /* Return a buffer to the pool of free buffers. */ for( ul = 0; ul < emacNUM_BUFFERS; ul++ ) { - if( &( xEthernetBuffers.xDataBuffers[ ul ][ 0 ] ) == ( void * ) pucBuffer ) + if( &( xEthernetBuffers.cBuffer[ ul ][ 0 ] ) == ( void * ) pucBuffer ) { ucBufferInUse[ ul ] = pdFALSE; break; @@ -503,12 +511,18 @@ static void prvConfigureEtherCAndEDMAC( void ) /* EDMAC */ EDMAC.EESR.LONG = 0x47FF0F9F; /* Clear all ETHERC and EDMAC status bits */ + #ifdef __LIT + EDMAC.EDMR.BIT.DE = 1; + #endif EDMAC.RDLAR = ( void * ) xCurrentRxDesc; /* Initialaize Rx Descriptor List Address */ - EDMAC.TDLAR = &( xTxDescriptors.xDescriptorArray[ 0 ] ); /* Initialaize Tx Descriptor List Address */ + EDMAC.TDLAR = &( xTxDescriptors[ 0 ] ); /* Initialaize Tx Descriptor List Address */ EDMAC.TRSCER.LONG = 0x00000000; /* Copy-back status is RFE & TFE only */ EDMAC.TFTR.LONG = 0x00000000; /* Threshold of Tx_FIFO */ EDMAC.FDR.LONG = 0x00000000; /* Transmit fifo & receive fifo is 256 bytes */ EDMAC.RMCR.LONG = 0x00000003; /* Receive function is normal mode(continued) */ + + /* Enable the interrupt... */ + _IEN( _ETHER_EINT ) = 1; } /*-----------------------------------------------------------*/ @@ -527,7 +541,7 @@ static long ulTxEndInts = 0; if( ulTxEndInts >= 2 ) { /* Only return the buffer to the pool once both Txes have completed. */ - prvReturnBuffer( ( void * ) xTxDescriptors.xDescriptorArray[ 0 ].buf_p ); + prvReturnBuffer( ( void * ) xTxDescriptors[ 0 ].buf_p ); ulTxEndInts = 0; } EDMAC.EESR.LONG = emacTX_END_INTERRUPT; @@ -542,3 +556,4 @@ static long ulTxEndInts = 0; EDMAC.EESR.LONG = emacRX_END_INTERRUPT; } } + diff --git a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/uip-conf.h b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/uip-conf.h index 62572085f..70b70337b 100644 --- a/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/uip-conf.h +++ b/Demo/RX600_RX62N-RDK_Renesas/RTOSDemo/webserver/uip-conf.h @@ -114,7 +114,7 @@ typedef unsigned short uip_stats_t; * * \hideinitializer */ -#define UIP_CONF_BYTE_ORDER UIP_BIG_ENDIAN +#define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN /** * Logging on or off -- 2.39.5