[core] Fix lwIP debugging support
This commit is contained in:
@@ -20,8 +20,6 @@ env.ParseCustomOptions(platform)
|
||||
env.ParseCustomFlashLayout(platform, board)
|
||||
# Add flash layout C defines
|
||||
env.AddFlashLayout(board)
|
||||
# Write custom header options
|
||||
env.ApplyCustomOptions(platform)
|
||||
# Export board manifest for ltchiptool
|
||||
env.ExportBoardData(board)
|
||||
# Print information about versions and custom options
|
||||
|
||||
@@ -184,6 +184,9 @@ class LibraryQueue:
|
||||
else:
|
||||
self.env.Append(CPPPATH=self.includes)
|
||||
|
||||
# prepend headers with custom options
|
||||
self.env.ApplyCustomOptions(self.env.PioPlatform())
|
||||
|
||||
# clone the environment for the whole library queue
|
||||
queue_env = self.env.Clone()
|
||||
# add private options to the cloned environment
|
||||
|
||||
@@ -15,8 +15,15 @@
|
||||
|
||||
// set lwIP debugging options according to LT config
|
||||
#if LT_DEBUG_LWIP
|
||||
// enable main debugging switch
|
||||
#undef LWIP_DEBUG
|
||||
#define LWIP_DEBUG 1
|
||||
// enable all messages
|
||||
#undef LWIP_DBG_MIN_LEVEL
|
||||
#define LWIP_DBG_MIN_LEVEL 0
|
||||
// enable all debugging types
|
||||
#undef LWIP_DBG_TYPES_ON
|
||||
#define LWIP_DBG_TYPES_ON 0xF8
|
||||
// make lwIP use printf() library
|
||||
#include <stdio.h>
|
||||
#undef LWIP_PLATFORM_DIAG
|
||||
|
||||
@@ -13,7 +13,10 @@ custom_fw_version = 1.2.0
|
||||
|
||||
# custom build options (#defines, NOT compiler flags)
|
||||
custom_options.lwip =
|
||||
LWIP_IPV4 = 1
|
||||
# make sure to enable LT_DEBUG_LWIP as well
|
||||
NETIF_DEBUG = 0x80
|
||||
IP_DEBUG = 0x80
|
||||
TCP_DEBUG = 0x80
|
||||
custom_options.freertos =
|
||||
configUSE_TICK_HOOK = 1
|
||||
|
||||
@@ -82,7 +85,7 @@ To see debug messages from i.e. OTA, loglevel must also be changed.
|
||||
- `LT_DEBUG_OTA` (1) - OTA updates (`Update` library)
|
||||
- `LT_DEBUG_FDB` (0) - FlashDB debugging (macros within the library)
|
||||
- `LT_DEBUG_MDNS` (0) - mDNS client library
|
||||
- `LT_DEBUG_LWIP` (0) - enables `LWIP_DEBUG`, provides `LWIP_PLATFORM_DIAG`; per-module options (i.e. `TCP_DEBUG`) are off by default and need to be enabled separately
|
||||
- `LT_DEBUG_LWIP` (0) - enables `LWIP_DEBUG`, provides `LWIP_PLATFORM_DIAG`; per-module options (i.e. `TCP_DEBUG`) are off by default and need to be enabled separately - see example in `Project options` above
|
||||
- `LT_DEBUG_LWIP_ASSERT` (0) - enables assertions within lwIP (doesn't need `LT_DEBUG_LWIP`)
|
||||
|
||||
!!! tip
|
||||
|
||||
Reference in New Issue
Block a user