diff --git a/components/math/example/CMakeLists.txt b/components/math/example/CMakeLists.txt index 10dc595650..c7e3523039 100644 --- a/components/math/example/CMakeLists.txt +++ b/components/math/example/CMakeLists.txt @@ -5,7 +5,11 @@ cmake_minimum_required(VERSION 3.20) set(ENV{IDF_COMPONENT_MANAGER} "0") include($ENV{IDF_PATH}/tools/cmake/project.cmake) -add_compile_options(-Wdouble-promotion) +# NOTE: -Wdouble-promotion (to keep this float-only example honest on targets +# without hardware double support) is applied to the example's own code in +# main/CMakeLists.txt, NOT globally: applying it project-wide also compiled it +# into ESP-IDF's own components, whose code trips it under IDF v6's newer GCC +# (e.g. esp_hw_support/port/esp32/rtc_clk.c) and fails their -Werror build. # add the component directories that we want to use set(EXTRA_COMPONENT_DIRS diff --git a/components/math/example/main/CMakeLists.txt b/components/math/example/main/CMakeLists.txt index a941e22ba7..ca13e99c4b 100644 --- a/components/math/example/main/CMakeLists.txt +++ b/components/math/example/main/CMakeLists.txt @@ -1,2 +1,6 @@ idf_component_register(SRC_DIRS "." INCLUDE_DIRS ".") + +# Keep this example float-only (esp32 has no hardware double). Scoped to the +# example's own translation units so it does not reach ESP-IDF's components. +target_compile_options(${COMPONENT_LIB} PRIVATE -Wdouble-promotion) diff --git a/components/meshtastic/include/meshtastic.hpp b/components/meshtastic/include/meshtastic.hpp index 689e2ded39..2121acd8d6 100644 --- a/components/meshtastic/include/meshtastic.hpp +++ b/components/meshtastic/include/meshtastic.hpp @@ -88,7 +88,7 @@ class MeshtasticNode : public BaseComponent { std::vector psk{1}; ///< The channel PSK. Default {1} = the public ///< default key. See meshtastic::expand_psk. - transmit_fn transmit; ///< Function used to transmit frames + transmit_fn transmit{nullptr}; ///< Function used to transmit frames uint8_t hop_limit{3}; ///< Hop limit for originated broadcasts (0-7) bool rebroadcast{false}; ///< Whether to rebroadcast (relay) others' packets diff --git a/components/meshtastic/src/meshtastic_crypto.cpp b/components/meshtastic/src/meshtastic_crypto.cpp index e3d0ef116e..df968c2a15 100755 --- a/components/meshtastic/src/meshtastic_crypto.cpp +++ b/components/meshtastic/src/meshtastic_crypto.cpp @@ -3,7 +3,15 @@ #include #include +#include // for MBEDTLS_VERSION_MAJOR +#if MBEDTLS_VERSION_MAJOR >= 4 +// mbedtls 4.x (ESP-IDF v6+) moved the low-level AES API to a private header; the +// mbedtls_aes_* functions used below are unchanged and still available there. +// (PSA Crypto is the recommended long-term API.) +#include +#else #include +#endif namespace espp::meshtastic { diff --git a/components/st7123touch/include/st7123touch.hpp b/components/st7123touch/include/st7123touch.hpp index 9cb233689e..6320987872 100644 --- a/components/st7123touch/include/st7123touch.hpp +++ b/components/st7123touch/include/st7123touch.hpp @@ -48,11 +48,12 @@ class St7123Touch : public BasePeripheral { /// happier with the separate form (e.g. when reads run from an interrupt handler and the /// longer combined transaction is more prone to I/O errors). struct Config { - BasePeripheral::write_fn - write; ///< Write function (paired with read for separate reads) - BasePeripheral::read_fn read; ///< Read function (paired with write for separate reads) - BasePeripheral::write_then_read_fn - write_then_read; ///< Combined (repeated-START) write-then-read; takes precedence if set + BasePeripheral::write_fn write{ + nullptr}; ///< Write function (paired with read for separate reads) + BasePeripheral::read_fn read{ + nullptr}; ///< Read function (paired with write for separate reads) + BasePeripheral::write_then_read_fn write_then_read{ + nullptr}; ///< Combined (repeated-START) write-then-read; takes precedence if set uint8_t address = DEFAULT_ADDRESS; ///< I2C address of the chip espp::Logger::Verbosity log_level{ espp::Logger::Verbosity::WARN}; ///< Log verbosity for the driver