-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make copy of `lwip/contrib/ports/unix/lib/` in `Linux` ($UNAME) directory, rather than attempting to patch it lwipopts.h * Put simplified lwipopts.h into root directory, but don't #include directly - it's added via lwip/opts.h * Add default DNS server * Add debug flags Testing with `SystemClock_NTP` sample with DNS/UDP debugging enabled shows UDP requests are being sent out but no responses received. Further investigation required.
- Loading branch information
Showing
9 changed files
with
224 additions
and
2,785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
|
||
project(lwip C) | ||
|
||
set (BUILD_SHARED_LIBS OFF) | ||
|
||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU") | ||
message(FATAL_ERROR "Lwip shared library is only working on Linux or the Hurd") | ||
endif() | ||
|
||
set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lwip) | ||
include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) | ||
|
||
set (LWIP_DEFINITIONS -DLWIP_DEBUG) | ||
set (LWIP_INCLUDE_DIRS | ||
"${LWIP_DIR}/.." | ||
"${LWIP_DIR}/src/include" | ||
"${LWIP_CONTRIB_DIR}/" | ||
"${LWIP_CONTRIB_DIR}/ports/unix/port/include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/" | ||
) | ||
|
||
include(${LWIP_CONTRIB_DIR}/ports/unix/Filelists.cmake) | ||
include(${LWIP_DIR}/src/Filelists.cmake) | ||
|
||
add_library(lwip ${lwipnoapps_SRCS} ${lwipcontribportunix_SRCS} ${lwipcontribportunixnetifs_SRCS}) | ||
target_compile_options(lwip PRIVATE ${LWIP_COMPILER_FLAGS} -m32) | ||
target_compile_definitions(lwip PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) | ||
target_include_directories(lwip PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) | ||
target_link_libraries(lwip ${LWIP_SANITIZER_LIBS}) | ||
|
||
find_library(LIBPTHREAD pthread) | ||
target_link_libraries(lwip ${LIBPTHREAD}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
all: | ||
cd $(BUILD_DIR); cmake $(CURDIR) | ||
make -C $(BUILD_DIR) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.