; 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:blacksasi_f411]
platform = ststm32
board = blacksasi_f411m
board.variants_dir = /home/pm/project/stm32/BlackSASI/sw/variant/blacksasi_f411m
framework = arduino
board_build.core = maple
;lib_deps =
;    greiman/SdFat@^2.2.0
 ;   bblanchon/ArduinoJson@^6.19.3
upload_protocol = stlink
debug_tool = stlink
; Different gcc versions produce much different binaries in terms of speed.
; 1.40804.0 ; 985kb/sec
; 1.60301.0 ; 1012kb/sec ***
; 1.70201.0 ; 926kb/sec
; 1.80301.0 ; 935kb/sec
; 1.80201.181220 ; 921kb/sec
; 1.90201.191206 ; 912kb/sec
; 1.90301.200702 ; default - 955kb/sec
platform_packages = toolchain-gccarmnoneeabi@1.60301.0

build_unflags = 
    -Os
    -DARDUINO_ARCH_STM32F4
build_flags = 
    -w
    -DARDUINO_BLACKSASI_F411M
    -DARDUINO_LIB_DISCOVERY_PHASE
    -DARDUINO=10813
    -DARDUINO_ARCH_STM32
    -O2
    -DSERIAL_USB
    -DCRYSTAL_FREQ=25
    -DLED_BUILTIN=PA5
    -DUSBCON
    -DPIO_FRAMEWORK_ARDUINO_ENABLE_CDC
    -DUSBD_VID=0x0483
    -DUSBD_PID=0x0100
    -DUSB_MANUFACTURER="SweProj"
    -DUSB_PRODUCT="\"BLACKSASI_F411\""
    -DHAL_PCD_MODULE_ENABLED
    -D USBD_USE_CDC

; [env:debug]
; build_type = debug
; debug_tool = stlink
