; 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

[platformio]
default_envs = updater_esp32dev
boards_dir = ../boards

[env]
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.11/platform-espressif32.zip
platform_packages =
framework = arduino, espidf
build_type = release
custom_build = release
board_build.partitions = partitions.csv
build_unflags = 
    -Werror=all
    -Wall
build_flags =
	-fexceptions
	-DESP_PLATFORM
	-DESP32
	-DARDUINO_ARCH_ESP32
    -DNUKI_HUB_UPDATER
    -Wno-ignored-qualifiers
    -Wno-missing-field-initializers
    -Wno-type-limits
    -Wno-maybe-uninitialized
    -Wno-implicit-fallthrough
    -Wno-unused-result
lib_deps =
    AsyncTCP=symlink://../lib/AsyncTCP
    Ethernet=symlink://../lib/Ethernet
    HTTPClient=symlink://../lib/HTTPClient
    NetworkClientSecure=symlink://../lib/NetworkClientSecure
    WebServer=symlink://../lib/WebServer
    WiFiManager=symlink://../lib/WiFiManager

monitor_speed = 115200
monitor_filters =
	esp32_exception_decoder
	time

[env:updater_esp32dev]
board = esp32dev
extra_scripts = 
     pre:pio_package_pre.py
     post:pio_package.py

[env:updater_esp32-c3]
extends = env:updater_esp32dev
board = esp32-c3-devkitc-02

[env:updater_esp32-s3]
extends = env:updater_esp32dev
board = nuki-esp32-s3

[env:updater_esp32-c6]
extends = env:updater_esp32dev
board = esp32-c6-devkitm-1

[env:updater_esp32solo1]
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32-2023.10.03.zip
framework = arduino
board = esp32-solo1
extra_scripts = 
    pre:pio_package_pre_solo1.py
    post:pio_package.py
build_flags =
	${env.build_flags}
	-DFRAMEWORK_ARDUINO_SOLO1
lib_deps =
    AsyncTCP=symlink://../lib/AsyncTCP
    Ethernet=symlink://../lib/Ethernet
    HTTPClient=symlink://../lib/HTTPClient
    WebServer=symlink://../lib/WebServer
    WiFiManager=symlink://../lib/WiFiManager
lib_ignore =
    NetworkClientSecure