From 14c3bded7a00a2833d54febe3b8442e75e52c89c Mon Sep 17 00:00:00 2001 From: rtel Date: Mon, 14 Jul 2014 14:01:07 +0000 Subject: [PATCH] Re-test Zynq demo now it is using the latest tools. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2279 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.cproject | 10 +++++----- .../RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c | 5 ++++- .../src/lwIP_Demo/lwIP_port/netif/xemacpsif_physpeed.c | 2 +- .../Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h | 2 +- FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.cproject b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.cproject index ae8e1ba1a..379bb3599 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.cproject +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.cproject @@ -23,7 +23,7 @@ - - @@ -59,6 +59,9 @@ @@ -77,9 +80,6 @@ - - - diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c index 737348182..861340256 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_Apps/lwIP_Apps.c @@ -63,6 +63,7 @@ #include "lwip/opt.h" #include "lwip/tcpip.h" #include "lwip/inet.h" +#include "lwip/dhcp.h" /* applications includes */ #include "apps/httpserver_raw_from_lwIP_download/httpd.h" @@ -125,11 +126,13 @@ static signed char cTxBuffer[ lwipappsTX_BUFFER_SIZE ]; void vStatusCallback( struct netif *pxNetIf ) { char pcMessage[20]; +struct in_addr* pxIPAddress; if( netif_is_up( pxNetIf ) != 0 ) { strcpy( pcMessage, "IP=" ); - strcat( pcMessage, inet_ntoa( *( struct in_addr* ) &( pxNetIf->ip_addr ) ) ); + pxIPAddress = ( struct in_addr* ) &( pxNetIf->ip_addr ); + strcat( pcMessage, inet_ntoa( ( *pxIPAddress ) ) ); xil_printf( pcMessage ); } else diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_port/netif/xemacpsif_physpeed.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_port/netif/xemacpsif_physpeed.c index 367a9b30f..440101eea 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_port/netif/xemacpsif_physpeed.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwIP_Demo/lwIP_port/netif/xemacpsif_physpeed.c @@ -428,7 +428,7 @@ static void SetUpSLCRDivisors(int mac_baseaddr, int speed) volatile u32 slcrBaseAddress; #ifndef PEEP u32 SlcrDiv0; - u32 SlcrDiv1; + u32 SlcrDiv1=0; u32 SlcrTxClkCntrl; #endif diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h index 30025dc2d..46f58d145 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/lwipopts.h @@ -245,7 +245,7 @@ a lot of data that needs to be copied, this should be set high. */ /* ---------- DHCP options ---------- */ /* Define LWIP_DHCP to 1 if you want DHCP configuration of interfaces. */ -#define LWIP_DHCP 0 +#define LWIP_DHCP 1 /* 1 if you want to do an ARP check on the offered address (recommended). */ diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c index 5019093db..c09e4056e 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c @@ -124,7 +124,7 @@ * * When mainSELECTED_APPLICATION is set to 2 the lwIP example will be run. */ -#define mainSELECTED_APPLICATION 1 +#define mainSELECTED_APPLICATION 0 /*-----------------------------------------------------------*/ -- 2.39.5