;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]
data_dir = data
default_envs = esp32


[env:esp32]
platform = espressif32
#platform_packages = 
#    framework-arduinoespressif32@https://github.com/espressif/arduino-esp32
board = esp-wrover-kit
board_upload.flash_size = "16MB"
#platform = espressif8266
#board = esp_wroom_02
#build_flags = -Wl,-Teagle.flash.2m1m.ld
build_flags = -DPLATFORM_ESP32 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
framework = arduino
monitor_port = /dev/ttyUSB0
upload_port = /dev/ttyUSB0
monitor_speed = 115200
lib_deps =
    NTPClient
    HX711@0.7.4
    ArduinoJson
    https://github.com/gilmaimon/ArduinoWebsockets.git
src_filter = +<*> -<native_main.cpp>
board_build.partitions = partitions_custom.csv
board_build.embed_txtfiles =
    certificate.pem

[env:native]
platform = native
test_ignore = test_embedded
build_flags = -g -DPLATFORM_NATIVE
src_filter = +<*> -<firmware_main.cpp>