; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter, extra scripting
;   Upload options: custom port, speed and extra flags
;   Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html

[env:generic_f403a]
platform = at32
framework = cmsis
board = generic_f403a
monitor_speed = 115200 ;serial monitor baudrate

;Use the following for jlink upload
;upload_protocol = jlink

;Use the following for serial upload via bootloader (PA9, PA10)
;upload_protocol = serial
;upload_speed = 115200 ;default: 115200

;Use the following for DFU upload via USB port
upload_protocol = dfu
build_flags = 
    -DDFU_MODE
    -UVECT_TAB_OFFSET
    -DUSER_VECT_TAB_ADDRESS
    -DVECT_TAB_OFFSET=0x2000   ; override default vector tale to support ISR table for DFU mode

;Use the following for custom uploader
;upload_protocol = custom
;upload_port = COM16
;upload_speed = 115200
;upload_command = ${platformio.packages_dir}/framework-cmsis-at32f40/tools/stm32flash/stm32flash -b $UPLOAD_SPEED -w $SOURCE -g 0x8000000 $UPLOAD_PORT