From 84f2c0ef3247a667d699e27bd49b2b237db5fc7b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 29 Feb 2012 14:05:19 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3998 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32F107-LWIP/Makefile | 12 +++--------- .../lwip => os/various/lwip_bindings}/arch/cc.h | 0 .../lwip => os/various/lwip_bindings}/arch/perf.h | 0 .../various/lwip_bindings}/arch/sys_arch.c | 0 .../various/lwip_bindings}/arch/sys_arch.h | 0 .../lwip => os/various/lwip_bindings}/lwip.mk | 7 +++++++ os/various/{ => lwip_bindings}/lwipthread.c | 0 os/various/{ => lwip_bindings}/lwipthread.h | 0 readme.txt | 3 ++- 9 files changed, 12 insertions(+), 10 deletions(-) rename {demos/ARMCM3-STM32F107-LWIP/lwip => os/various/lwip_bindings}/arch/cc.h (100%) rename {demos/ARMCM3-STM32F107-LWIP/lwip => os/various/lwip_bindings}/arch/perf.h (100%) rename {demos/ARMCM3-STM32F107-LWIP/lwip => os/various/lwip_bindings}/arch/sys_arch.c (100%) rename {demos/ARMCM3-STM32F107-LWIP/lwip => os/various/lwip_bindings}/arch/sys_arch.h (100%) rename {demos/ARMCM3-STM32F107-LWIP/lwip => os/various/lwip_bindings}/lwip.mk (81%) rename os/various/{ => lwip_bindings}/lwipthread.c (100%) rename os/various/{ => lwip_bindings}/lwipthread.h (100%) diff --git a/demos/ARMCM3-STM32F107-LWIP/Makefile b/demos/ARMCM3-STM32F107-LWIP/Makefile index 8ca3fcf88..28772cfa8 100644 --- a/demos/ARMCM3-STM32F107-LWIP/Makefile +++ b/demos/ARMCM3-STM32F107-LWIP/Makefile @@ -64,8 +64,8 @@ include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk include $(CHIBIOS)/os/kernel/kernel.mk +include $(CHIBIOS)/os/various/lwip_bindings/lwip.mk include $(CHIBIOS)/test/test.mk -include ./lwip/lwip.mk # Define linker script file here LDSCRIPT= $(PORTLD)/STM32F107xC.ld @@ -78,13 +78,8 @@ CSRC = $(PORTSRC) \ $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ - $(LWNETIFSRC) \ - $(LWCORESRC) \ - $(LWIPV4SRC) \ - $(LWAPISRC) \ + $(LWSRC) \ $(CHIBIOS)/os/various/evtimer.c \ - $(CHIBIOS)/os/various/lwipthread.c \ - ./lwip/arch/sys_arch.c \ web/web.c main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -116,8 +111,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(LWINC) \ - $(CHIBIOS)/os/various \ - ./lwip + $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/ARMCM3-STM32F107-LWIP/lwip/arch/cc.h b/os/various/lwip_bindings/arch/cc.h similarity index 100% rename from demos/ARMCM3-STM32F107-LWIP/lwip/arch/cc.h rename to os/various/lwip_bindings/arch/cc.h diff --git a/demos/ARMCM3-STM32F107-LWIP/lwip/arch/perf.h b/os/various/lwip_bindings/arch/perf.h similarity index 100% rename from demos/ARMCM3-STM32F107-LWIP/lwip/arch/perf.h rename to os/various/lwip_bindings/arch/perf.h diff --git a/demos/ARMCM3-STM32F107-LWIP/lwip/arch/sys_arch.c b/os/various/lwip_bindings/arch/sys_arch.c similarity index 100% rename from demos/ARMCM3-STM32F107-LWIP/lwip/arch/sys_arch.c rename to os/various/lwip_bindings/arch/sys_arch.c diff --git a/demos/ARMCM3-STM32F107-LWIP/lwip/arch/sys_arch.h b/os/various/lwip_bindings/arch/sys_arch.h similarity index 100% rename from demos/ARMCM3-STM32F107-LWIP/lwip/arch/sys_arch.h rename to os/various/lwip_bindings/arch/sys_arch.h diff --git a/demos/ARMCM3-STM32F107-LWIP/lwip/lwip.mk b/os/various/lwip_bindings/lwip.mk similarity index 81% rename from demos/ARMCM3-STM32F107-LWIP/lwip/lwip.mk rename to os/various/lwip_bindings/lwip.mk index 55a9bf7f4..1f56b698d 100644 --- a/demos/ARMCM3-STM32F107-LWIP/lwip/lwip.mk +++ b/os/various/lwip_bindings/lwip.mk @@ -1,6 +1,10 @@ # List of the required lwIP files. LWIP = ${CHIBIOS}/ext/lwip-1.4.0 +LWBINDSRC = \ + $(CHIBIOS)/os/various/lwip_bindings/lwipthread.c \ + $(CHIBIOS)/os/various/lwip_bindings/arch/sys_arch.c + LWNETIFSRC = \ ${LWIP}/src/netif/etharp.c @@ -42,6 +46,9 @@ LWAPISRC = \ ${LWIP}/src/api/sockets.c \ ${LWIP}/src/api/tcpip.c +LWSRC = $(LWBINDSRC) $(LWNETIFSRC) $(LWCORESRC) $(LWIPV4SRC) $(LWAPISRC) + LWINC = \ + $(CHIBIOS)/os/various/lwip_bindings \ ${LWIP}/src/include \ ${LWIP}/src/include/ipv4 diff --git a/os/various/lwipthread.c b/os/various/lwip_bindings/lwipthread.c similarity index 100% rename from os/various/lwipthread.c rename to os/various/lwip_bindings/lwipthread.c diff --git a/os/various/lwipthread.h b/os/various/lwip_bindings/lwipthread.h similarity index 100% rename from os/various/lwipthread.h rename to os/various/lwip_bindings/lwipthread.h diff --git a/readme.txt b/readme.txt index c22d95b76..4da234769 100644 --- a/readme.txt +++ b/readme.txt @@ -108,7 +108,8 @@ Fabio). - NEW: STM32 Ethernet driver completed, only partially tested on STM32F107. Added an STM32 lwIP demo. - TODO: Extensive testing. +- NEW: lwIP related code is not centralized into a single place, no need to + duplicate the code in each application or demo. - CHANGE: Macros icuGetWidthI() and icuGetPeriodI() renemed to icuGetWidth() and icuGetPeriod(). - CHANGE: Renamed Ethernet driver in AT91 HAL ETHD1.