; 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:esp32-s3-devkitc1-n16r8]
board = esp32-s3-devkitc1-n16r8
board_build.partitions = partitions/no_ota_10mb_littlefs.csv
board_build.filesystem = littlefs
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
framework = arduino
lib_deps = 
	hideakitai/DebugLog@^0.8.4
	bblanchon/ArduinoJson@^7.4.2
	hideakitai/PCA95x5@^0.1.3
	me-no-dev/AsyncTCP@^3.3.2
	me-no-dev/ESPAsyncWebServer@^3.6.0
upload_protocol = esptool
upload_port = COM8
upload_speed = 921600
monitor_port = COM4
monitor_speed = 921600
build_type = release
build_flags = 
	-DCORE_DEBUG_LEVEL=1
	-DARDUINO_USB_CDC_ON_BOOT=0
	-DARDUINO_USB_MODE=0
	-DCONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=1
	-DCONFIG_FREERTOS_USE_TRACE_FACILITY=1
	-DCONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
	-DCONFIG_ASYNC_TCP_PRIORITY=20
	-DCONFIG_ASYNC_TCP_QUEUE_SIZE=128
	-DCONFIG_ASYNC_TCP_RUNNING_CORE=1
	-DCONFIG_ASYNC_TCP_STACK_SIZE=8192
	-fstack-protector-all

[env:esp32-s3-devkitc1-n16r8-debug]
board = ${env:esp32-s3-devkitc1-n16r8.board}
board_build.partitions = ${env:esp32-s3-devkitc1-n16r8.board_build.partitions}
board_build.filesystem = ${env:esp32-s3-devkitc1-n16r8.board_build.filesystem}
platform = ${env:esp32-s3-devkitc1-n16r8.platform}
framework = ${env:esp32-s3-devkitc1-n16r8.framework}
lib_deps = 
	${env:esp32-s3-devkitc1-n16r8.lib_deps}
upload_protocol = esptool
upload_port = COM8
upload_speed = 921600
monitor_port = COM4
monitor_speed = 921600
debug_tool = esp-builtin
debug_speed = 15000
build_type = debug
build_flags = 
	-O0
	-g3
	-ggdb3
	-DCORE_DEBUG_LEVEL=3
	-DARDUINO_USB_CDC_ON_BOOT=0
	-DARDUINO_USB_MODE=0
	-DCONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=1
	-DCONFIG_FREERTOS_USE_TRACE_FACILITY=1
	-DCONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
	-DCONFIG_ASYNC_TCP_PRIORITY=20
	-DCONFIG_ASYNC_TCP_QUEUE_SIZE=128
	-DCONFIG_ASYNC_TCP_RUNNING_CORE=1
	-DCONFIG_ASYNC_TCP_STACK_SIZE=8192
	-fstack-protector-all
