velxio/backend/app/services/esp-idf-template/sdkconfig.defaults.in

83 lines
4.8 KiB
Plaintext

# QEMU-optimized sdkconfig for ESP32 emulation. Templated from
# sdkconfig.defaults.in by ESPIDFCompiler._render_sdkconfig() at compile
# time. ${TOKEN} placeholders are substituted with the user's Board Options
# selections (or per-target defaults when missing).
# ── Flash ────────────────────────────────────────────────────────────────
# QEMU's esp32-picsimlab machine historically only boots DIO @ 40 MHz with
# the 4 MB image. Larger images and other flash modes are allowed but the
# UI surfaces a "QEMU may fail to boot" warning for non-DIO.
${FLASH_MODE_LINES}
${FLASH_FREQ_LINES}
${FLASH_SIZE_LINES}
# ── Partition table ──────────────────────────────────────────────────────
# Custom CSV written next to this file by _render_partition_csv.
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
# ── Bootloader ───────────────────────────────────────────────────────────
# Minimal logging to speed up QEMU boot.
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
# ── Logging ──────────────────────────────────────────────────────────────
# Default log level — WARN so users see only their Serial.print + real warnings.
# Internal ESP-IDF info-level chatter (gpio:, wifi:, phy:) is suppressed.
# Override per-tag with esp_log_level_set() at runtime if needed.
CONFIG_LOG_DEFAULT_LEVEL_WARN=y
CONFIG_LOG_DEFAULT_LEVEL=2
# Arduino core debug level (ARDUHAL_LOG_*). Driven by the user's
# Core Debug Level dropdown.
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=${ARDUHAL_LOG_LEVEL}
# ── Watchdogs ────────────────────────────────────────────────────────────
# Disabled for QEMU (timing is not real-time).
CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_INT_WDT=n
# ── Compiler ─────────────────────────────────────────────────────────────
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
# ── CPU frequency ────────────────────────────────────────────────────────
${CPU_FREQ_LINES}
# ── PSRAM ────────────────────────────────────────────────────────────────
${PSRAM_LINES}
# ── WiFi ─────────────────────────────────────────────────────────────────
CONFIG_ESP_WIFI_ENABLED=y
# ── LWIP — reassembly needed for slirp networking ────────────────────────
CONFIG_LWIP_IP4_REASSEMBLY=y
CONFIG_LWIP_IP6_REASSEMBLY=y
# ── FreeRTOS ─────────────────────────────────────────────────────────────
CONFIG_FREERTOS_HZ=1000
# ── Console ──────────────────────────────────────────────────────────────
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
# ── Arduino-as-component: we provide our own app_main (main.cpp) ─────────
CONFIG_AUTOSTART_ARDUINO=n
# Which core Arduino's setup/loop and event task run on. Both default to
# core 1 (matches Arduino IDE) but the user can pin them independently.
CONFIG_ARDUINO_RUNNING_CORE=${ARDUINO_RUNNING_CORE}
CONFIG_ARDUINO_EVENT_RUNNING_CORE=${ARDUINO_EVENT_RUNNING_CORE}
# Increase main task stack for Arduino sketches.
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
# Enable C++ exceptions (some Arduino libraries require it).
CONFIG_COMPILER_CXX_EXCEPTIONS=y
# ── Bluetooth ────────────────────────────────────────────────────────────
# Bluedroid stack — the default arduino-esp32 BLEDevice.h library targets
# Bluedroid, not NimBLE. NimBLE-based sketches (NimBLEDevice.h) will not
# compile under this config; flip stacks if needed.
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_BLE=y
CONFIG_BT_BLE_ENABLED=y