Skip to content

Commit

Permalink
Merge branch 'libretiny-eu:master' into wifi-improvements-combined
Browse files Browse the repository at this point in the history
  • Loading branch information
Cossid authored Jul 22, 2024
2 parents a04bfc0 + fbaae21 commit 3f815dc
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 30 deletions.
2 changes: 0 additions & 2 deletions builder/frameworks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
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
Expand Down
3 changes: 3 additions & 0 deletions builder/utils/libs-queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ def BuildLibraries(self):
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
Expand Down
9 changes: 9 additions & 0 deletions cores/beken-72xx/base/config/tls_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Copyright (c) Kuba Szczodrzyński 2024-05-18. */

#pragma once

#include_next "tls_config.h"

// allow more entropy sources
#undef MBEDTLS_ENTROPY_MAX_SOURCES
#define MBEDTLS_ENTROPY_MAX_SOURCES 10
7 changes: 7 additions & 0 deletions cores/common/base/config/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 25 additions & 25 deletions cores/common/base/lt_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,31 +100,31 @@ void lt_log_disable();
#endif

// ESP32 compat
#define log_printf(...) LT_I(__VA_ARGS__)
#define log_v(...) LT_V(__VA_ARGS__)
#define log_d(...) LT_D(__VA_ARGS__)
#define log_i(...) LT_I(__VA_ARGS__)
#define log_w(...) LT_W(__VA_ARGS__)
#define log_e(...) LT_E(__VA_ARGS__)
#define log_n(...) LT_E(__VA_ARGS__)
#define isr_log_v(...) LT_V(__VA_ARGS__)
#define isr_log_d(...) LT_D(__VA_ARGS__)
#define isr_log_i(...) LT_I(__VA_ARGS__)
#define isr_log_w(...) LT_W(__VA_ARGS__)
#define isr_log_e(...) LT_E(__VA_ARGS__)
#define isr_log_n(...) LT_E(__VA_ARGS__)
#define ESP_LOGV(...) LT_V(__VA_ARGS__)
#define ESP_LOGD(...) LT_D(__VA_ARGS__)
#define ESP_LOGI(...) LT_I(__VA_ARGS__)
#define ESP_LOGW(...) LT_W(__VA_ARGS__)
#define ESP_LOGE(...) LT_E(__VA_ARGS__)
#define ESP_EARLY_LOGV(...) LT_V(__VA_ARGS__)
#define ESP_EARLY_LOGD(...) LT_D(__VA_ARGS__)
#define ESP_EARLY_LOGI(...) LT_I(__VA_ARGS__)
#define ESP_EARLY_LOGW(...) LT_W(__VA_ARGS__)
#define ESP_EARLY_LOGE(...) LT_E(__VA_ARGS__)
#define ets_printf(...) LT_I(__VA_ARGS__)
#define ETS_PRINTF(...) LT_I(__VA_ARGS__)
#define log_printf(...) LT_I(__VA_ARGS__)
#define log_v(...) LT_V(__VA_ARGS__)
#define log_d(...) LT_D(__VA_ARGS__)
#define log_i(...) LT_I(__VA_ARGS__)
#define log_w(...) LT_W(__VA_ARGS__)
#define log_e(...) LT_E(__VA_ARGS__)
#define log_n(...) LT_E(__VA_ARGS__)
#define isr_log_v(...) LT_V(__VA_ARGS__)
#define isr_log_d(...) LT_D(__VA_ARGS__)
#define isr_log_i(...) LT_I(__VA_ARGS__)
#define isr_log_w(...) LT_W(__VA_ARGS__)
#define isr_log_e(...) LT_E(__VA_ARGS__)
#define isr_log_n(...) LT_E(__VA_ARGS__)
#define ESP_LOGV(tag, ...) LT_V(__VA_ARGS__)
#define ESP_LOGD(tag, ...) LT_D(__VA_ARGS__)
#define ESP_LOGI(tag, ...) LT_I(__VA_ARGS__)
#define ESP_LOGW(tag, ...) LT_W(__VA_ARGS__)
#define ESP_LOGE(tag, ...) LT_E(__VA_ARGS__)
#define ESP_EARLY_LOGV(tag, ...) LT_V(__VA_ARGS__)
#define ESP_EARLY_LOGD(tag, ...) LT_D(__VA_ARGS__)
#define ESP_EARLY_LOGI(tag, ...) LT_I(__VA_ARGS__)
#define ESP_EARLY_LOGW(tag, ...) LT_W(__VA_ARGS__)
#define ESP_EARLY_LOGE(tag, ...) LT_E(__VA_ARGS__)
#define ets_printf(...) LT_I(__VA_ARGS__)
#define ETS_PRINTF(...) LT_I(__VA_ARGS__)

#define LT_RET(ret) \
LT_E("ret=%d", ret); \
Expand Down
3 changes: 3 additions & 0 deletions cores/realtek-amb/arduino/src/wiring_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ void attachInterruptParam(pin_size_t interruptNumber, voidFuncPtrParam callback,
case CHANGE:
#if LT_RTL8720C
event = IRQ_FALL_RISE;
// Prevents Change interrupt errors on RTL8710B chips.
#elif LT_RTL8710B
event = IRQ_RISE;
#else
LT_W("CHANGE interrupts not supported");
#endif
Expand Down
7 changes: 5 additions & 2 deletions docs/dev/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/libretiny-eu/libretiny.git"
},
"version": "1.5.1",
"version": "1.6.0",
"frameworks": {
"base": {
"title": "Base Framework (SDK only)",
Expand Down

0 comments on commit 3f815dc

Please sign in to comment.