mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-23 06:29:10 +00:00
netutils/paho_mqtt: configure embedded runtime mode
Expose the upstream HIGH_PERFORMANCE mode through CONFIG_LIB_MQTT5_HIGH_PERFORMANCE and enable it by default. This keeps normal embedded builds lightweight while allowing developers to restore Paho heap and call-stack diagnostics when investigating library issues. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: OpenAI Codex:gpt-5
This commit is contained in:
parent
53c234880c
commit
a71c329cfb
3 changed files with 19 additions and 0 deletions
|
|
@ -117,6 +117,11 @@ if(CONFIG_LIB_MQTT5)
|
|||
|
||||
target_compile_options(mqtt5 PRIVATE ${MQTT5_FLAGS})
|
||||
|
||||
if(CONFIG_LIB_MQTT5_HIGH_PERFORMANCE)
|
||||
target_compile_definitions(mqtt5 PRIVATE HIGH_PERFORMANCE=1)
|
||||
target_compile_options(mqtt5 PRIVATE -Wno-unused-but-set-variable)
|
||||
endif()
|
||||
|
||||
if(CONFIG_UTILS_MQTT5)
|
||||
|
||||
set(MQTT_PUB_FLAGS
|
||||
|
|
|
|||
|
|
@ -16,6 +16,15 @@ config LIB_MQTT5_THREAD_STACKSIZE
|
|||
---help---
|
||||
Stack size used by threads created by the Paho MQTT library.
|
||||
|
||||
config LIB_MQTT5_HIGH_PERFORMANCE
|
||||
bool "Enable Paho high-performance mode"
|
||||
default y
|
||||
depends on LIB_MQTT5
|
||||
---help---
|
||||
Disable Paho heap-allocation tracking and function call-stack
|
||||
tracing to reduce runtime and memory overhead. Disable this option
|
||||
when debugging the Paho MQTT library.
|
||||
|
||||
config UTILS_MQTT5
|
||||
tristate "Enable mqtt5 tool"
|
||||
depends on LIB_MQTT5
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ CFLAGS += $(INCDIR_PREFIX)$(SRCDIR)
|
|||
|
||||
ifeq ($(CONFIG_LIB_MQTT5), y)
|
||||
|
||||
ifeq ($(CONFIG_LIB_MQTT5_HIGH_PERFORMANCE),y)
|
||||
CFLAGS += -DHIGH_PERFORMANCE=1
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
endif
|
||||
|
||||
# Check if paho_mqtt directory exists, if not download and extract
|
||||
ifeq ($(wildcard $(PAHO_MQTT_UNPACK)/src),)
|
||||
$(PAHO_MQTT_ZIP):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue