Skip to content

Commit

Permalink
move lwIP source to sdk and add a build hook instead of variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Me No Dev committed Apr 10, 2016
1 parent 589b86b commit 0addae0
Show file tree
Hide file tree
Showing 105 changed files with 19 additions and 125 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ tools/esptool/
tools/mkspiffs/
package/versions/
exclude.txt
tools/sdk/lib/liblwip_src.a
tools/sdk/lwip/src/build
tools/sdk/lwip/src/liblwip_src.a
9 changes: 4 additions & 5 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ wifinfo.menu.UploadSpeed.921600.upload.speed=921600


##############################################################
coredev.name=Generic ESP8266 Module
coredev.name=Core Development Module

coredev.upload.tool=esptool
coredev.upload.speed=115200
Expand All @@ -1391,18 +1391,17 @@ coredev.build.debug_level=
coredev.build.lwip_lib=-llwip
coredev.build.lwip_flags=


coredev.menu.LwIPVariant.Espressif=Espressif (xcc)
coredev.menu.LwIPVariant.Espressif.build.lwip_lib=-llwip
coredev.menu.LwIPVariant.Espressif.build.lwip_flags=
coredev.menu.LwIPVariant.Espressif.build.variant=generic
coredev.menu.LwIPVariant.Prebuilt=Prebuilt Source (gcc)
coredev.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc
coredev.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC
coredev.menu.LwIPVariant.Prebuilt.build.variant=generic
coredev.menu.LwIPVariant.OpenSource=Open Source (gcc)
coredev.menu.LwIPVariant.OpenSource.build.lwip_lib=
coredev.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src
coredev.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC
coredev.menu.LwIPVariant.OpenSource.build.variant=lwip
coredev.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-"

coredev.menu.CpuFrequency.80=80 MHz
coredev.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down
2 changes: 1 addition & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ compiler.warning_flags.all=-Wall -Wextra

compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/lwip"
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/lwip/include"

compiler.c.cmd=xtensa-lx106-elf-gcc
compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 11 additions & 15 deletions variants/lwip/lwip/Makefile → tools/sdk/lwip/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
TOOLS_PATH = $(abspath ../../../tools)
BUILD_PATH = $(abspath build)
LWIP_INCLUDE = -Ibuild -I$(TOOLS_PATH)/sdk/include -I$(TOOLS_PATH)/sdk/lwip
TOOLS_PATH ?= ../../../xtensa-lx106-elf/bin/xtensa-lx106-elf-
LWIP_LIB ?= liblwip_src.a
SDK_PATH ?= $(abspath ../../)

BUILD_PATH = build
LWIP_SRCS = $(patsubst %.c,$(BUILD_PATH)/%.o,$(wildcard */*.c)) $(patsubst %.c,$(BUILD_PATH)/%.o,$(wildcard */*/*.c))
LWIP_LIB = $(abspath liblwip_gcc.a)

LWIP_INCLUDE = -Ibuild -I$(SDK_PATH)/include -I$(SDK_PATH)/lwip/include
BUILD_FLAGS = -c -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections
BUILD_DEFINES = -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -DLWIP_OPEN_SRC

CC=$(TOOLS_PATH)/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
AR=$(TOOLS_PATH)/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar
CC=$(TOOLS_PATH)gcc
AR=$(TOOLS_PATH)ar

$(BUILD_PATH)/%.h:
@echo "[CR]" $(notdir $@)
@mkdir -p $(dir $@)
@touch $@

$(BUILD_PATH)/%.o: %.c
@echo "[CC]" $(notdir $@)
@mkdir -p $(dir $@)
@$(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(LWIP_INCLUDE) $< -o $@
$(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(LWIP_INCLUDE) $< -o $@

$(LWIP_LIB): $(BUILD_PATH)/user_config.h $(LWIP_SRCS)
@echo "[AR]" $(notdir $(LWIP_LIB))
@$(AR) cru $(LWIP_LIB) $(LWIP_SRCS)
$(AR) cru $(LWIP_LIB) $(LWIP_SRCS)

all: $(LWIP_LIB)

install: all
@echo Installing $(notdir $(LWIP_LIB)) to $(TOOLS_PATH)/sdk/lib
@cp -f $(LWIP_LIB) $(TOOLS_PATH)/sdk/lib/$(notdir $(LWIP_LIB))

deploy: install clean
cp -f $(LWIP_LIB) $(SDK_PATH)/lib/$(LWIP_LIB)

clean:
@rm -rf $(BUILD_PATH) $(LWIP_LIB)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
67 changes: 0 additions & 67 deletions variants/lwip/common.h

This file was deleted.

37 changes: 0 additions & 37 deletions variants/lwip/pins_arduino.h

This file was deleted.

0 comments on commit 0addae0

Please sign in to comment.