; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32s3cam]
platform = espressif32
board = esp32-s3-wroom-1-n16r8
framework = arduino
 ;esp32-s3-wroom-1-n16r8 ;4d_systems_esp32s3_gen4_r8n16
; === 关键修正：PSRAM 配置 ===
board_build.psram_type = octal    ; ✅ 官方标准标识符（非 opi）
board_build.memory_type = qio_octal  ; ✅ Flash=QIO, PSRAM=Octal
board_build.partitions = default_16MB.csv  ; ← 显式指定分区表

; === 附加必要配置 ===
board_build.flash_mode = qio      ; ✅ Flash 模式必须为 qio（Quad SPI）
board_build.flash_freq = 80m      ; ✅ 与 PSRAM 速度匹配
board_build.flash_size = 16MB


; === 编译选项 ===
build_flags = 
  -DBOARD_HAS_PSRAM
  -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO

; upload_port = /dev/ttyCH340
; monitor_port = /dev/ttyCH340
monitor_speed = 1000000
monitor_rts = 0
monitor_dtr = 0
monitor_filters = default, send_on_enter, time