Experiment: C++17 support (#9874)
* Add C++17 support * Add C++17 runtime probes and update build configurations for STM32 and Portduino * Remove unflags * Update C++ standard flags across the platforms * Convert a couple of instances to structured bindings * NRF52 platform.txt to add C++17 support * Still need the unflags apparently * Remove C++17 runtime probe tests from test_main.cpp * Reconfigured doesnt need a nodiscard * Remove nodiscard attribute from init() method in RadioInterface * Remove mbedtls/error.h from build flags Removed include directive for mbedtls/error.h from build flags. * Fix IRAM overflow * Fix IRAM overflow * Add build flag to exclude MQTT from rak11200 * Update C++ standard from gnu17 to gnu++17
This commit is contained in:
@@ -27,7 +27,12 @@ board_build.filesystem = littlefs
|
||||
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
|
||||
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
|
||||
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
|
||||
build_unflags = -fno-lto
|
||||
build_unflags =
|
||||
-fno-lto
|
||||
# Keep explicit std unflags on ESP32; base-level unflags are not sufficient
|
||||
# to prevent framework-injected C++11 fallback on this platform.
|
||||
-std=c++11
|
||||
-std=gnu++11
|
||||
build_flags =
|
||||
${arduino_base.build_flags}
|
||||
-flto
|
||||
@@ -35,7 +40,7 @@ build_flags =
|
||||
-Wextra
|
||||
-Isrc/platform/esp32
|
||||
-include mbedtls/error.h
|
||||
-std=c++11
|
||||
-std=gnu++17
|
||||
-DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
-DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL
|
||||
|
||||
@@ -16,4 +16,8 @@ build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D RAK_11200
|
||||
-I variants/esp32/rak11200
|
||||
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||
-DMESHTASTIC_EXCLUDE_RANGETEST=1
|
||||
-DMESHTASTIC_EXCLUDE_MQTT=1
|
||||
upload_speed = 115200
|
||||
|
||||
@@ -8,7 +8,6 @@ build_flags =
|
||||
-Wall
|
||||
-Wextra
|
||||
-Isrc/platform/esp32
|
||||
-std=c++11
|
||||
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
|
||||
-DSERIAL_BUFFER_SIZE=4096
|
||||
-DLIBPAX_ARDUINO
|
||||
|
||||
@@ -55,8 +55,7 @@ build_flags =
|
||||
-li2c
|
||||
-luv
|
||||
-std=gnu17
|
||||
-std=c++17
|
||||
|
||||
-std=gnu++17
|
||||
lib_ignore =
|
||||
Adafruit NeoPixel
|
||||
Adafruit ST7735 and ST7789 Library
|
||||
|
||||
@@ -5,9 +5,9 @@ platform =
|
||||
platformio/nordicnrf52@10.11.0
|
||||
extends = arduino_base
|
||||
platform_packages =
|
||||
; our custom Git version until they merge our PR
|
||||
; our custom Git version with C++17 support in platform.txt
|
||||
# TODO renovate
|
||||
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#74096746e5f167a2ff22e483d8e79bb1aef00591
|
||||
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#cpp17-platform
|
||||
; Don't renovate toolchain-gccarmnoneeabi
|
||||
platformio/toolchain-gccarmnoneeabi@~1.90301.0
|
||||
|
||||
@@ -35,6 +35,8 @@ build_unflags =
|
||||
-g
|
||||
-g1
|
||||
-g0
|
||||
-std=c++11
|
||||
-std=gnu++11
|
||||
|
||||
build_src_filter =
|
||||
${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>
|
||||
|
||||
Reference in New Issue
Block a user