; 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/en/latest/platforms/espressif32.html


[common]
monitor_speed = 115200  ; 921600, 512000, 460800, 256000, 115200

build_flags =
    -D CORE_DEBUG_LEVEL=3                    ; 0 None, 1 Error, 2 Warn, 3 Info, 4 Debug, 5 Verbose
    -D CONFIG_ARDUHAL_LOG_COLORS=1
    -D ARDUINO_RUNNING_CORE=1                ; Arduino Runs On Core (setup, loop)
    -D ARDUINO_EVENT_RUNNING_CORE=1          ; Events Run On Core
    -D BOARD_HAS_PSRAM=1
    -D MONITOR_SPEED=${this.monitor_speed}
    -Wall
    -Wextra
;—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[esp32]
    board_build.partitions = boards/partition_4MB.csv    ; 4MB Flash
    ;board_build.partitions = boards/partition_8MB.csv    ; 8MB Flash
    ;board_build.partitions = boards/partition_16MB.csv   ; 16MB Flash

    board = ESP32-Dev-4MB            ; 4MB Flash
    ;board = ESP32-Dev-8MB            ; 8MB Flash
    ;board = ESP32-Dev-16MB           ;16MB Flash
;—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[esp32s3]
    ;board_build.partitions = boards/partitio_4MB.csv    ;  4MB Flash
    ;board_build.partitions = boards/partitio_8MB.csv    ;  8MB Flash
    board_build.partitions = boards/partition_16MB.csv   ; 16MB Flash

    ;board = ESP32-S3-DevKitC-1-N8R2  ;  8 MB Flash, 2MB quad PSRAM  *1)
    ;board = ESP32-S3-DevKitC-1-N8R8  ;  8 MB Flash, 8MB octo PSRAM  *2)
    board = ESP32-S3-DevKitC-1-N16R8 ; 16 MB Flash, 8MB octo PSRAM  *2)
;—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[env]
platform = https://github.com/platformio/platform-espressif32.git#v6.6.0
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.17

framework = arduino, espidf

build_flags     = ${common.build_flags}
monitor_speed   = ${common.monitor_speed}
monitor_filters = esp32_exception_decoder, send_on_enter, log2file
upload_speed    = 460800  ; 921600, 512000, 460800, 256000, 115200

lib_deps =
    https://github.com/schreibfaul1/ESP32-audioI2S.git
;—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[env:esp32]
    board = ${esp32.board}
    board_build.partitions = ${esp32.board_build.partitions}
;—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
[env:esp32s3]
    board = ${esp32s3.board}
    board_build.partitions = ${esp32s3.board_build.partitions}
;—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

