Skip to content

Commit 0addae0

Browse files
author
Me No Dev
committed
move lwIP source to sdk and add a build hook instead of variant
1 parent 589b86b commit 0addae0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+19
-125
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ tools/esptool/
55
tools/mkspiffs/
66
package/versions/
77
exclude.txt
8+
tools/sdk/lib/liblwip_src.a
9+
tools/sdk/lwip/src/build
10+
tools/sdk/lwip/src/liblwip_src.a

boards.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ wifinfo.menu.UploadSpeed.921600.upload.speed=921600
13681368

13691369

13701370
##############################################################
1371-
coredev.name=Generic ESP8266 Module
1371+
coredev.name=Core Development Module
13721372

13731373
coredev.upload.tool=esptool
13741374
coredev.upload.speed=115200
@@ -1391,18 +1391,17 @@ coredev.build.debug_level=
13911391
coredev.build.lwip_lib=-llwip
13921392
coredev.build.lwip_flags=
13931393

1394+
13941395
coredev.menu.LwIPVariant.Espressif=Espressif (xcc)
13951396
coredev.menu.LwIPVariant.Espressif.build.lwip_lib=-llwip
13961397
coredev.menu.LwIPVariant.Espressif.build.lwip_flags=
1397-
coredev.menu.LwIPVariant.Espressif.build.variant=generic
13981398
coredev.menu.LwIPVariant.Prebuilt=Prebuilt Source (gcc)
13991399
coredev.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc
14001400
coredev.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC
1401-
coredev.menu.LwIPVariant.Prebuilt.build.variant=generic
14021401
coredev.menu.LwIPVariant.OpenSource=Open Source (gcc)
1403-
coredev.menu.LwIPVariant.OpenSource.build.lwip_lib=
1402+
coredev.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src
14041403
coredev.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC
1405-
coredev.menu.LwIPVariant.OpenSource.build.variant=lwip
1404+
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-"
14061405

14071406
coredev.menu.CpuFrequency.80=80 MHz
14081407
coredev.menu.CpuFrequency.80.build.f_cpu=80000000L

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ compiler.warning_flags.all=-Wall -Wextra
1919

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

2424
compiler.c.cmd=xtensa-lx106-elf-gcc
2525
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
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.
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
1-
TOOLS_PATH = $(abspath ../../../tools)
2-
BUILD_PATH = $(abspath build)
3-
LWIP_INCLUDE = -Ibuild -I$(TOOLS_PATH)/sdk/include -I$(TOOLS_PATH)/sdk/lwip
1+
TOOLS_PATH ?= ../../../xtensa-lx106-elf/bin/xtensa-lx106-elf-
2+
LWIP_LIB ?= liblwip_src.a
3+
SDK_PATH ?= $(abspath ../../)
4+
5+
BUILD_PATH = build
46
LWIP_SRCS = $(patsubst %.c,$(BUILD_PATH)/%.o,$(wildcard */*.c)) $(patsubst %.c,$(BUILD_PATH)/%.o,$(wildcard */*/*.c))
5-
LWIP_LIB = $(abspath liblwip_gcc.a)
67

8+
LWIP_INCLUDE = -Ibuild -I$(SDK_PATH)/include -I$(SDK_PATH)/lwip/include
79
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
810
BUILD_DEFINES = -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -DLWIP_OPEN_SRC
911

10-
CC=$(TOOLS_PATH)/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
11-
AR=$(TOOLS_PATH)/xtensa-lx106-elf/bin/xtensa-lx106-elf-ar
12+
CC=$(TOOLS_PATH)gcc
13+
AR=$(TOOLS_PATH)ar
1214

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

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

2323
$(LWIP_LIB): $(BUILD_PATH)/user_config.h $(LWIP_SRCS)
24-
@echo "[AR]" $(notdir $(LWIP_LIB))
25-
@$(AR) cru $(LWIP_LIB) $(LWIP_SRCS)
24+
$(AR) cru $(LWIP_LIB) $(LWIP_SRCS)
2625

2726
all: $(LWIP_LIB)
2827

2928
install: all
30-
@echo Installing $(notdir $(LWIP_LIB)) to $(TOOLS_PATH)/sdk/lib
31-
@cp -f $(LWIP_LIB) $(TOOLS_PATH)/sdk/lib/$(notdir $(LWIP_LIB))
32-
33-
deploy: install clean
29+
cp -f $(LWIP_LIB) $(SDK_PATH)/lib/$(LWIP_LIB)
3430

3531
clean:
3632
@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.

variants/lwip/common.h

Lines changed: 0 additions & 67 deletions
This file was deleted.

variants/lwip/pins_arduino.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)