[platformio]
src_dir = ./
; include_dir = User
build_dir = Build

[env:genericSTM32F407IGT6]
platform = ststm32
board = genericSTM32F407IGT6
board_build.cmsis.custom_config_header = yes
; 表示使用项目目录下的链接文件
board_build.ldscript = Project/GCC/STM32F417IG_FLASH.ld
extra_scripts = Project/GCC/scripts.py
monitor_speed = 9600

build_flags = 
  -IUser
  ; -IUser/bsp
  -IUser/bsp/ad7606
  -IUser/bsp/am2303
  -IUser/bsp/can
  -IUser/bsp/dm9k
  -IUser/bsp/eth
  -IUser/bsp/ext_sram
  -IUser/bsp/dwt
  -IUser/bsp/esp8266
  -IUser/bsp/interface
  -IUser/bsp/iwdg
  -IUser/bsp/lcd
  -IUser/bsp/nand_flash
  -IUser/bsp/nor_flash
  -IUser/bsp/sdio
  -IUser/bsp/spi
  -IUser/bsp/timer
  -IUser/bsp/uart 
  -IUser/bsp/usb
  -IUser/app
  -IUser/app/esp8266
  -IUser/app/iec104
  -IUser/app/key
  -IUser/app/queue
  -IUser/app/led
  -IUser/app/memory
  -IUser/app/modbus
  -IUser/app/net
  -IUser/conf/fatfs
  -IUser/conf/lwip
  -IUser/conf/lwip/port
  -IUser/conf/lwip/port/arch
  -IUser/conf/ucos
  -ILibraries/CMSIS/Include
  -ILibraries/CMSIS/Device/ST/STM32F4xx/Include
  -ILibraries/STM32F4xx_StdPeriph_Driver/inc
  -ILibraries/STM32F4x7_ETH_Driver/inc
  -ILibraries/STM32_USB_Device_Library/Core/inc
  -ILibraries/STM32_USB_HOST_Library/Core/inc
  -ILibraries/STM32_USB_HOST_Library/Class/MSC/inc
  -ILibraries/STM32_USB_OTG_Driver/inc
  -IMiddleWare/uCOS_II/uC-CPU
  -IMiddleWare/uCOS_II/uC-CPU/ARM-Cortex-M4/GNU
  -IMiddleWare/uCOS_II/uC-LIB
  -IMiddleWare/uCOS_II/uCOS-BSP
  -IMiddleWare/uCOS_II/uCOS-II/Source
  -IMiddleWare/uCOS_II/uCOS-II/Ports/ARM-Cortex-M4/Generic/GNU
  -IMiddleWare/lwip-2.0.2/src/include
  -IMiddleWare/lwip-2.0.2/src/include/lwip
  -IMiddleWare/lwip-2.0.2/src/include/netif
  -IMiddleWare/lwip-2.0.2/src/include/posix
  -IMiddleWare/lwip-2.0.2/src/include/posix/sys
  -IMiddleWare/FATFS
  ; 定义全局宏
  -D STM32F40_41xxx
  -D USE_STDPERIPH_DRIVER
  # 去除编译警告
  -Wno-unused-variable
  -Wno-pointer-sign
  -Wno-unused-but-set-variable
  -O0

build_unflags = 
  -DSTM32F407xx
  -DSTM32F4
  -Os

build_src_filter = +<User/> 
            +<Project/GCC/> 
            +<Libraries/STM32F4xx_StdPeriph_Driver/src/>
            -<Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_qspi.c>
            -<Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fmpi2c.c>
            -<Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fmc.c>
            -<Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cec.c>
            -<Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spdifrx.c>
            +<Libraries/STM32F4x7_ETH_Driver/src/>
            ; +<ILibraries/STM32_USB_Device_Library/Core/src/>
            ; +<ILibraries/STM32_USB_HOST_Library/Core/src/>
            ; +<Libraries/STM32_USB_OTG_Driver/src/>
            +<MiddleWare/lwip-2.0.2/src/api>
            +<MiddleWare/lwip-2.0.2/src/core>
            +<MiddleWare/lwip-2.0.2/src/core/ipv4>
            +<MiddleWare/lwip-2.0.2/src/core/snmp>
            +<MiddleWare/lwip-2.0.2/src/netif>
            +<MiddleWare/lwip-2.0.2/src/netif/ppp>
            +<MiddleWare/uCOS_II>
            -<MiddleWare/uCOS_II/uC-CPU/ARM-Cortex-M0>
            -<MiddleWare/uCOS_II/uC-CPU/ARM-Cortex-M3>
            -<MiddleWare/uCOS_II/uC-CPU/ARM-Cortex-M4/RealView>
            -<MiddleWare/uCOS_II/uC-CPU/ARM-Cortex-M4/IAR>
            -<MiddleWare/uCOS_II/uC-LIB/Ports/ARM-Cortex-M0>
            -<MiddleWare/uCOS_II/uC-LIB/Ports/ARM-Cortex-M3>
            -<MiddleWare/uCOS_II/uC-LIB/Ports/ARM-Cortex-M4/IAR>
            -<MiddleWare/uCOS_II/uC-LIB/Ports/ARM-Cortex-M4/RealView>
            -<MiddleWare/uCOS_II/uC-LIB/Ports/ARM-Cortex-M4/RealView>
            -<MiddleWare/uCOS_II/uCOS-II/Ports/ARM-Cortex-M0>
            -<MiddleWare/uCOS_II/uCOS-II/Ports/ARM-Cortex-M3>
            -<MiddleWare/uCOS_II/uCOS-II/Ports/ARM-Cortex-M4/Generic/IAR>
            -<MiddleWare/uCOS_II/uCOS-II/Ports/ARM-Cortex-M4/Generic/RealView>
            +<MiddleWare/FATFS>
            -<MiddleWare/FATFS/diskio.c>
            -<MiddleWare/FATFS/option/cc932.c>
            -<MiddleWare/FATFS/option/cc949.c>
            -<MiddleWare/FATFS/option/cc950.c>
            -<MiddleWare/FATFS/option/ccsbcs.c>
            ; -<MiddleWare/FATFS/option/syscall.c>
            -<MiddleWare/FATFS/option/unicode.c>
; debug_tool = cmsis-dap
; upload_protocol = cmsis-dap
; debug_tool = jlink
; upload_protocol = jlink
debug_tool = stlink
upload_protocol = stlink
; upload_protocol = custom
; upload_command = st-flash --reset write $SOURCE 0x8000000



; NIP8Q~P0pfFvRwwm75~1WqZtTr0G6xSWDNTRhboQ

; 7e499644-d264-450e-91f0-d3f3d93de4ac



; apa8Q~3j9UrBCY~d1krYkcNFYhpFG5kHHCtJJajy

; fef2d30a-a2b7-4cee-97fe-7f883af411a0