[ESP32-C5] Add preliminary support for ESP32-C5 with dual band WiFi

This commit is contained in:
TD-er
2025-05-24 02:24:44 +02:00
parent 5dd624e74e
commit 382dad51a1
41 changed files with 637 additions and 88 deletions
+42 -4
View File
@@ -36,7 +36,7 @@ lib_ignore =
[esp32_base_idf5]
extends = common, core_esp32_IDF5_3_2__3_1_0_LittleFS
extends = common, core_esp32_IDF5_4_1__3_2_0_LittleFS
upload_speed = 460800
upload_before_reset = default_reset
upload_after_reset = hard_reset
@@ -55,7 +55,7 @@ extra_scripts = pre:tools/pio/pre_esp32.py
; However LTO cannot optimize builds with text section literals and thus will result in quite a lot larger builds (80k - 140k larger)
build_unflags = -Wall
-fno-lto
build_flags = ${core_esp32_IDF5_3_2__3_1_0_LittleFS.build_flags}
build_flags = ${core_esp32_IDF5_4_1__3_2_0_LittleFS.build_flags}
; ${mqtt_flags.build_flags}
-DMQTT_MAX_PACKET_SIZE=2048
-DCONFIG_FREERTOS_ASSERT_DISABLE
@@ -69,7 +69,45 @@ build_flags = ${core_esp32_IDF5_3_2__3_1_0_LittleFS.build_flags}
-DLWIP_IPV6=1
monitor_filters = esp32_exception_decoder
lib_ignore =
${core_esp32_IDF5_3_2__3_1_0_LittleFS.lib_ignore}
${core_esp32_IDF5_4_1__3_2_0_LittleFS.lib_ignore}
[esp32_base_idf5_5]
extends = common, core_esp32_IDF5_5_0__3_2_0_LittleFS
upload_speed = 460800
upload_before_reset = default_reset
upload_after_reset = hard_reset
extra_scripts = pre:tools/pio/pre_esp32.py
post:tools/pio/post_esp32.py
${extra_scripts_default.extra_scripts}
post:tools/pio/copy_files.py
; you can disable debug linker flag to reduce binary size (comment out line below), but the backtraces will become less readable
; tools/pio/extra_linker_flags.py
; fix the platform package to use gcc-ar and gcc-ranlib to enable lto linker plugin
; more detail: https://embeddedartistry.com/blog/2020/04/13/prefer-gcc-ar-to-ar-in-your-buildsystems/
; pre:tools/pio/apply_patches.py
; When using LTO, make sure NOT to use -mtext-section-literals
; -mtext-section-literals may be required when building large builds
; However LTO cannot optimize builds with text section literals and thus will result in quite a lot larger builds (80k - 140k larger)
build_unflags = -Wall
-fno-lto
build_flags = ${core_esp32_IDF5_5_0__3_2_0_LittleFS.build_flags}
; ${mqtt_flags.build_flags}
-DMQTT_MAX_PACKET_SIZE=2048
-DCONFIG_FREERTOS_ASSERT_DISABLE
-DCONFIG_LWIP_ESP_GRATUITOUS_ARP
-fno-strict-aliasing
-flto=auto
-Wswitch
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
-DLWIP_IPV6=1
-DCONFIG_BT_NIMBLE_NVS_PERSIST=y
monitor_filters = esp32_exception_decoder
lib_ignore =
${core_esp32_IDF5_5_0__3_2_0_LittleFS.lib_ignore}
; -flto cannot be used for ESP32 C3!
@@ -120,7 +158,7 @@ board_build.filesystem = littlefs
lib_ignore = ${esp32_always.lib_ignore}
ESP32_ping
ESP32 BLE Arduino
${core_esp32_IDF5_3_2__3_1_0_LittleFS.lib_ignore}
${core_esp32_IDF5_4_1__3_2_0_LittleFS.lib_ignore}
[esp32_IRExt]