diff --git a/builder/frameworks/beken-72xx-sdk.py b/builder/frameworks/beken-72xx-sdk.py index 7140ca6..7372ccc 100644 --- a/builder/frameworks/beken-72xx-sdk.py +++ b/builder/frameworks/beken-72xx-sdk.py @@ -249,6 +249,7 @@ env.AddLibrary( "+", "+<../ip/**>", ], + options=dict(CCFLAGS=["-Wno-unused-variable"]), ) # Sources - functional components @@ -263,6 +264,7 @@ env.AddLibrary( "+", "+", "+", + "+", "+", "+", "+", @@ -288,6 +290,7 @@ env.AddLibrary( "+", "+", "+", + "+", # for config/lwipopts.h "+", "+", "+", @@ -343,27 +346,7 @@ env.AddLibrary( ) # Sources - lwIP 2.0.2 -env.AddLibrary( - name="bdk_lwip", - base_dir=join(FUNC_DIR, "lwip_intf"), - srcs=[ - "+", - "+", - "+", - "+", - "+", - "+", - "+", - "+", - "+", - ], - includes=[ - "+", - "+", - "+", - ], - options=dict(CCFLAGS=["-Wno-missing-braces"]), -) +env.AddLibraryLwIP(version="2.0.2", port="bdk") # Sources - mbedTLS 2.6.0 env.AddLibrary( diff --git a/builder/libs/lwip.py b/builder/libs/lwip.py index a113731..57a6dfe 100644 --- a/builder/libs/lwip.py +++ b/builder/libs/lwip.py @@ -25,6 +25,13 @@ def env_add_lwip( "+", "+", ] + elif port in ["bdk"]: + port_srcs = [ + "+", + ] + port_includes = [ + "+", + ] env.AddLibrary( name=f"lwip{version}_{port}", diff --git a/platform.json b/platform.json index 8d19a52..6f14e84 100644 --- a/platform.json +++ b/platform.json @@ -69,7 +69,12 @@ "manifest": { "description": "Beken Development Kit for FreeRTOS" }, - "toolchain": "gccarmnoneeabi@~1.40804.0" + "toolchain": "gccarmnoneeabi@~1.40804.0", + "libraries": { + "lwip": [ + "v2.0.2-bdk" + ] + } }, "framework-arduino-api": { "type": "framework", diff --git a/platform/beken-72xx/config/lwipopts.h b/platform/beken-72xx/config/lwipopts.h index da67791..9504ba1 100644 --- a/platform/beken-72xx/config/lwipopts.h +++ b/platform/beken-72xx/config/lwipopts.h @@ -2,7 +2,9 @@ #pragma once -#include_next "lwipopts.h" +#include "lwip-2.0.2/port/lwipopts.h" + +#include #define LWIP_MDNS_RESPONDER 1 #define LWIP_NUM_NETIF_CLIENT_DATA 1