Skip to content

Commit

Permalink
Update and move lwIP headers, add options to use different lwIP build…
Browse files Browse the repository at this point in the history
… for generic device

Makefile added to lwip source folder to build and install liblwip_gcc.a
  • Loading branch information
Me No Dev committed Apr 10, 2016
1 parent 2301f29 commit bfe9f7b
Show file tree
Hide file tree
Showing 108 changed files with 34,343 additions and 115 deletions.
46 changes: 46 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ menu.ResetMethod=Reset Method
menu.ESPModule=Module
menu.Debug=Debug port
menu.DebugLevel=Debug Level
menu.LwIPVariant=lwIP Variant

##############################################################
generic.name=Generic ESP8266 Module
Expand All @@ -29,6 +30,21 @@ generic.build.flash_mode=qio
generic.build.spiffs_pagesize=256
generic.build.debug_port=
generic.build.debug_level=
generic.build.lwip_lib=-llwip
generic.build.lwip_flags=

generic.menu.LwIPVariant.Espressif=Espressif (xcc)
generic.menu.LwIPVariant.Espressif.build.lwip_lib=-llwip
generic.menu.LwIPVariant.Espressif.build.lwip_flags=
generic.menu.LwIPVariant.Espressif.build.variant=generic
generic.menu.LwIPVariant.Prebuilt=Prebuilt Source (gcc)
generic.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc
generic.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC
generic.menu.LwIPVariant.Prebuilt.build.variant=generic
generic.menu.LwIPVariant.OpenSource=Open Source (gcc)
generic.menu.LwIPVariant.OpenSource.build.lwip_lib=
generic.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC
generic.menu.LwIPVariant.OpenSource.build.variant=lwip

generic.menu.CpuFrequency.80=80 MHz
generic.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -247,6 +263,8 @@ espduino.build.flash_size=4M
espduino.build.flash_freq=40
espduino.build.debug_port=
espduino.build.debug_level=
espduino.build.lwip_lib=-llwip
espduino.build.lwip_flags=

espduino.menu.CpuFrequency.80=80 MHz
espduino.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -310,6 +328,8 @@ huzzah.build.flash_size=4M
huzzah.build.flash_freq=40
huzzah.build.debug_port=
huzzah.build.debug_level=
huzzah.build.lwip_lib=-llwip
huzzah.build.lwip_flags=

huzzah.menu.CpuFrequency.80=80 MHz
huzzah.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -359,6 +379,8 @@ espresso_lite_v1.build.variant=espresso_lite_v1
espresso_lite_v1.build.flash_mode=dio
espresso_lite_v1.build.flash_size=4M
espresso_lite_v1.build.flash_freq=40
espresso_lite_v1.build.lwip_lib=-llwip
espresso_lite_v1.build.lwip_flags=

espresso_lite_v1.menu.CpuFrequency.80=80 MHz
espresso_lite_v1.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -464,6 +486,8 @@ espresso_lite_v2.build.variant=espresso_lite_v2
espresso_lite_v2.build.flash_mode=dio
espresso_lite_v2.build.flash_size=4M
espresso_lite_v2.build.flash_freq=40
espresso_lite_v2.build.lwip_lib=-llwip
espresso_lite_v2.build.lwip_flags=

espresso_lite_v2.menu.CpuFrequency.80=80 MHz
espresso_lite_v2.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -575,6 +599,8 @@ nodemcu.build.flash_size=4M
nodemcu.build.flash_freq=40
nodemcu.build.debug_port=
nodemcu.build.debug_level=
nodemcu.build.lwip_lib=-llwip
nodemcu.build.lwip_flags=

nodemcu.menu.CpuFrequency.80=80 MHz
nodemcu.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -639,6 +665,8 @@ nodemcuv2.build.flash_size=4M
nodemcuv2.build.flash_freq=40
nodemcuv2.build.debug_port=
nodemcuv2.build.debug_level=
nodemcuv2.build.lwip_lib=-llwip
nodemcuv2.build.lwip_flags=

nodemcuv2.menu.CpuFrequency.80=80 MHz
nodemcuv2.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -710,6 +738,8 @@ modwifi.build.spiffs_pagesize=256
modwifi.build.spiffs_blocksize=8192
modwifi.build.debug_port=
modwifi.build.debug_level=
modwifi.build.lwip_lib=-llwip
modwifi.build.lwip_flags=

modwifi.menu.CpuFrequency.80=80 MHz
modwifi.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -764,6 +794,8 @@ thing.build.spiffs_blocksize=4096
thing.build.spiffs_pagesize=256
thing.build.debug_port=
thing.build.debug_level=
thing.build.lwip_lib=-llwip
thing.build.lwip_flags=

thing.menu.CpuFrequency.80=80 MHz
thing.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -813,6 +845,8 @@ thingdev.build.flash_ld=eagle.flash.512k64.ld
thingdev.build.flash_freq=40
thingdev.build.debug_port=
thingdev.build.debug_level=
thingdev.build.lwip_lib=-llwip
thingdev.build.lwip_flags=

thingdev.menu.CpuFrequency.80=80 MHz
thingdev.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -860,6 +894,8 @@ esp210.build.flash_size=4M
esp210.build.flash_freq=40
esp210.build.debug_port=
esp210.build.debug_level=
esp210.build.lwip_lib=-llwip
esp210.build.lwip_flags=

esp210.menu.CpuFrequency.80=80 MHz
esp210.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -951,6 +987,8 @@ d1_mini.build.flash_size=4M
d1_mini.build.flash_freq=40
d1_mini.build.debug_port=
d1_mini.build.debug_level=
d1_mini.build.lwip_lib=-llwip
d1_mini.build.lwip_flags=

d1_mini.menu.CpuFrequency.80=80 MHz
d1_mini.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -1017,6 +1055,8 @@ d1.build.flash_size=4M
d1.build.flash_freq=40
d1.build.debug_port=
d1.build.debug_level=
d1.build.lwip_lib=-llwip
d1.build.lwip_flags=

d1.menu.CpuFrequency.80=80 MHz
d1.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -1085,6 +1125,8 @@ espino.build.flash_freq=40
espino.build.spiffs_pagesize=256
espino.build.debug_port=
espino.build.debug_level=
espino.build.lwip_lib=-llwip
espino.build.lwip_flags=

espino.menu.CpuFrequency.80=80 MHz
espino.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -1159,6 +1201,8 @@ espinotee.build.flash_size=4M
espinotee.build.flash_freq=40
espinotee.build.debug_port=
espinotee.build.debug_level=
espinotee.build.lwip_lib=-llwip
espinotee.build.lwip_flags=

espinotee.menu.CpuFrequency.80=80 MHz
espinotee.menu.CpuFrequency.80.build.f_cpu=80000000L
Expand Down Expand Up @@ -1222,6 +1266,8 @@ wifinfo.build.board=ESP8266_ESP12
wifinfo.build.spiffs_pagesize=256
wifinfo.build.debug_port=Serial1
wifinfo.build.debug_level=Wifinfo
wifinfo.build.lwip_lib=-llwip
wifinfo.build.lwip_flags=

wifinfo.menu.Debug.Disabled=Disabled
wifinfo.menu.Debug.Disabled.build.debug_port=
Expand Down
2 changes: 2 additions & 0 deletions libraries/ArduinoOTA/ArduinoOTA.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#ifndef LWIP_OPEN_SRC
#define LWIP_OPEN_SRC
#endif
#include <functional>
#include <WiFiUdp.h>
#include "ArduinoOTA.h"
Expand Down
81 changes: 0 additions & 81 deletions libraries/ESP8266WiFi/src/lwip/mem_manager.h

This file was deleted.

2 changes: 2 additions & 0 deletions libraries/ESP8266mDNS/ESP8266mDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ License (MIT license):
// - Multicast DNS: http://www.ietf.org/rfc/rfc6762.txt
// - MDNS-SD: https://tools.ietf.org/html/rfc6763

#ifndef LWIP_OPEN_SRC
#define LWIP_OPEN_SRC
#endif

#include "ESP8266mDNS.h"
#include <functional>
Expand Down
10 changes: 5 additions & 5 deletions 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"
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/lwip"

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 All @@ -30,7 +30,7 @@ compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy

compiler.c.elf.cmd=xtensa-lx106-elf-gcc
compiler.c.elf.libs=-lm -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh -lwpa2
compiler.c.elf.libs=-lm -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh -lwpa2 {build.lwip_lib}

compiler.cpp.cmd=xtensa-lx106-elf-g++
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections
Expand Down Expand Up @@ -61,13 +61,13 @@ compiler.objcopy.eep.extra_flags=
compiler.elf2hex.extra_flags=

## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/arduino.ar" "{object_file}"
Expand Down
1 change: 1 addition & 0 deletions tools/sdk/include/ets_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "c_types.h"
#include "eagle_soc.h"
#include <stddef.h>

typedef uint32_t ETSSignal;
typedef uint32_t ETSParam;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bfe9f7b

Please sign in to comment.