From 5229b0c501f2b637a3f791f2b5acaf7752d698ba Mon Sep 17 00:00:00 2001 From: Msq001 <760675063@qq.com> Date: Fri, 16 Apr 2021 14:43:52 +0800 Subject: [PATCH] cleanup platformio.ini (#1843) Co-authored-by: Msq001 --- platformio.ini | 133 ++++++++++--------------------------------------- 1 file changed, 27 insertions(+), 106 deletions(-) diff --git a/platformio.ini b/platformio.ini index 12ea65c923..a27372e843 100644 --- a/platformio.ini +++ b/platformio.ini @@ -68,7 +68,6 @@ extra_scripts = pre:buildroot/scripts/custom_filename.py [stm32f10x] default_src_filter = ${common.default_src_filter} + + + build_flags = ${common.build_flags} - -D__STATIC_INLINE= -ITFT/src/Libraries/cmsis/Core-CM3 -ITFT/src/Libraries/cmsis/stm32f10x -ITFT/src/Libraries/fwlib/stm32f10x @@ -78,7 +77,6 @@ build_flags = ${common.build_flags} [stm32f2xx] default_src_filter = ${common.default_src_filter} + + + build_flags = ${common.build_flags} - -D__STATIC_INLINE= -ITFT/src/Libraries/cmsis/Core-CM3 -ITFT/src/Libraries/cmsis/stm32f2xx -ITFT/src/Libraries/fwlib/stm32f2xx @@ -94,14 +92,20 @@ build_flags = ${common.build_flags} -ITFT/src/Libraries/fwlib/stm32f4xx/inc -ITFT/src/User/Hal/stm32f2_f4xx +# +# stm32 +# +[common_stm32] +platform = ststm32 +framework = cmsis +upload_protocol = cmsis-dap + # # BIGTREE TFT35 V1.0 # [env:BIGTREE_TFT35_V1_0] -platform = ststm32@9.0.0 -framework = cmsis +extends = common_stm32 board = STM32F103VC_0x6000 -upload_protocol = cmsis-dap src_filter = ${stm32f10x.default_src_filter} + extra_scripts = ${common.extra_scripts} buildroot/scripts/stm32f103xC_0x6000_iap.py @@ -112,19 +116,13 @@ build_flags = ${stm32f10x.build_flags} -DRAM_SIZE=48 ; Available RAM size in kbytes -DHARDWARE="BIQU_TFT35_V1.0" -DHARDWARE_SHORT="B35V10" - -DTFT35_V1_0="B35V10" + -DTFT35_V1_0= # # BIGTREE TFT35 V1.1 # [env:BIGTREE_TFT35_V1_1] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F103VC_0x6000 -upload_protocol = cmsis-dap -src_filter = ${stm32f10x.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f103xC_0x6000_iap.py +extends = env:BIGTREE_TFT35_V1_0 build_flags = ${stm32f10x.build_flags} -DSTM32F10X_HD= -DHSE_VALUE=16000000ul @@ -138,13 +136,7 @@ build_flags = ${stm32f10x.build_flags} # BIGTREE TFT35 V1.2 # [env:BIGTREE_TFT35_V1_2] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F103VC_0x6000 -upload_protocol = cmsis-dap -src_filter = ${stm32f10x.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f103xC_0x6000_iap.py +extends = env:BIGTREE_TFT35_V1_0 build_flags = ${stm32f10x.build_flags} -DSTM32F10X_HD= -DHSE_VALUE=16000000ul @@ -158,11 +150,8 @@ build_flags = ${stm32f10x.build_flags} # BIGTREE TFT35 V2.0 # [env:BIGTREE_TFT35_V2_0] -platform = ststm32@9.0.0 -framework = cmsis +extends = env:BIGTREE_TFT35_V1_0 board = STM32F103VC_0x3000 -upload_protocol = cmsis-dap -src_filter = ${stm32f10x.default_src_filter} + extra_scripts = ${common.extra_scripts} buildroot/scripts/stm32f103xC_0x3000_iap.py build_flags = ${stm32f10x.build_flags} @@ -179,10 +168,8 @@ monitor_speed = 250000 # BIGTREE TFT35 V3.0 # [env:BIGTREE_TFT35_V3_0] -platform = ststm32@9.0.0 -framework = cmsis +extends = common_stm32 board = STM32F207VC_0x8000 -upload_protocol = cmsis-dap src_filter = ${stm32f2xx.default_src_filter} + extra_scripts = ${common.extra_scripts} buildroot/scripts/stm32f2xxxC_0x8000_iap.py @@ -199,13 +186,7 @@ build_flags = ${stm32f2xx.build_flags} # BIGTREE TFT35 E3 V3.0 # [env:BIGTREE_TFT35_E3_V3_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F207VC_0x8000 -upload_protocol = cmsis-dap -src_filter = ${stm32f2xx.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f2xxxC_0x8000_iap.py +extends = env:BIGTREE_TFT35_V3_0 build_flags = ${stm32f2xx.build_flags} -DSTM32F2XX= -DHSE_VALUE=8000000ul @@ -219,13 +200,7 @@ build_flags = ${stm32f2xx.build_flags} # BIGTREE TFT35 B1 V3.0 # [env:BIGTREE_TFT35_B1_V3_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F207VC_0x8000 -upload_protocol = cmsis-dap -src_filter = ${stm32f2xx.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f2xxxC_0x8000_iap.py +extends = env:BIGTREE_TFT35_V3_0 build_flags = ${stm32f2xx.build_flags} -DSTM32F2XX= -DHSE_VALUE=8000000ul @@ -239,13 +214,7 @@ build_flags = ${stm32f2xx.build_flags} # BIGTREE TFT43 V3.0 # [env:BIGTREE_TFT43_V3_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F207VC_0x8000 -upload_protocol = cmsis-dap -src_filter = ${stm32f2xx.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f2xxxC_0x8000_iap.py +extends = env:BIGTREE_TFT35_V3_0 build_flags = ${stm32f2xx.build_flags} -DSTM32F2XX= -DHSE_VALUE=8000000ul @@ -259,13 +228,7 @@ build_flags = ${stm32f2xx.build_flags} # BIGTREE TFT50 V3.0 # [env:BIGTREE_TFT50_V3_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F207VC_0x8000 -upload_protocol = cmsis-dap -src_filter = ${stm32f2xx.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f2xxxC_0x8000_iap.py +extends = env:BIGTREE_TFT35_V3_0 build_flags = ${stm32f2xx.build_flags} -DSTM32F2XX= -DHSE_VALUE=8000000ul @@ -279,10 +242,8 @@ build_flags = ${stm32f2xx.build_flags} # BIGTREE TFT70 V3.0 # [env:BIGTREE_TFT70_V3_0] -platform = ststm32@9.0.0 -framework = cmsis +extends = common_stm32 board = STM32F407VG_0x8000 -upload_protocol = cmsis-dap src_filter = ${stm32f4xx.default_src_filter} + extra_scripts = ${common.extra_scripts} buildroot/scripts/stm32f4xxxG_0x8000_iap.py @@ -299,13 +260,7 @@ build_flags = ${stm32f4xx.build_flags} # BIGTREE TFT28 V1.0 # [env:BIGTREE_TFT28_V1_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F103VC_0x6000 -upload_protocol = cmsis-dap -src_filter = ${stm32f10x.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f103xC_0x6000_iap.py +extends = env:BIGTREE_TFT35_V1_0 build_flags = ${stm32f10x.build_flags} -DSTM32F10X_HD= -DHSE_VALUE=16000000ul @@ -319,13 +274,7 @@ build_flags = ${stm32f10x.build_flags} # BIGTREE TFT28 V3.0 # [env:BIGTREE_TFT28_V3_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F207VC_0x8000 -upload_protocol = cmsis-dap -src_filter = ${stm32f2xx.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f2xxxC_0x8000_iap.py +extends = env:BIGTREE_TFT35_V3_0 build_flags = ${stm32f2xx.build_flags} -DSTM32F2XX= -DHSE_VALUE=8000000ul @@ -339,10 +288,8 @@ build_flags = ${stm32f2xx.build_flags} # BIGTREE TFT24 V1.1 # [env:BIGTREE_TFT24_V1_1] -platform = ststm32@9.0.0 -framework = cmsis +extends = common_stm32 board = STM32F105RC_0x6000 -upload_protocol = cmsis-dap src_filter = ${stm32f10x.default_src_filter} + extra_scripts = ${common.extra_scripts} buildroot/scripts/stm32f105xC_0x6000_iap.py @@ -359,8 +306,7 @@ build_flags = ${stm32f10x.build_flags} # MKS TFT32 V1.3 # [env:MKS_TFT32_V1_3] -platform = ststm32@9.0.0 -framework = cmsis +extends = common_stm32 board = STM32F107VC_0x7000 upload_protocol = stlink debug_tool = stlink @@ -380,14 +326,7 @@ build_flags = ${stm32f10x.build_flags} # MKS TFT32 V1.4 # [env:MKS_TFT32_V1_4] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F107VC_0x7000 -upload_protocol = stlink -debug_tool = stlink -src_filter = ${stm32f10x.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f107xC_0x7000_iap.py +extends = env:MKS_TFT32_V1_3 build_flags = ${stm32f10x.build_flags} -DSTM32F10X_CL= -DHSE_VALUE=25000000ul @@ -401,12 +340,8 @@ build_flags = ${stm32f10x.build_flags} # MKS TFT32 V1.4 No Bootloader # [env:MKS_TFT32_V1_4_NOBL] -platform = ststm32@9.0.0 -framework = cmsis +extends = env:MKS_TFT32_V1_3 board = STM32F107VC_0x0000 -upload_protocol = stlink -debug_tool = stlink -src_filter = ${stm32f10x.default_src_filter} + extra_scripts = ${common.extra_scripts} buildroot/scripts/stm32f107xC_0x0000_iap.py build_flags = ${stm32f10x.build_flags} @@ -423,14 +358,7 @@ build_flags = ${stm32f10x.build_flags} # MKS TFT28 V3.0 # [env:MKS_TFT28_V3_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F107VC_0x7000 -upload_protocol = stlink -debug_tool = stlink -src_filter = ${stm32f10x.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f107xC_0x7000_iap.py +extends = env:MKS_TFT32_V1_3 build_flags = ${stm32f10x.build_flags} -DSTM32F10X_CL= -DHSE_VALUE=25000000ul @@ -444,14 +372,7 @@ build_flags = ${stm32f10x.build_flags} # MKS TFT28 V4.0 # [env:MKS_TFT28_V4_0] -platform = ststm32@9.0.0 -framework = cmsis -board = STM32F107VC_0x7000 -upload_protocol = stlink -debug_tool = stlink -src_filter = ${stm32f10x.default_src_filter} + -extra_scripts = ${common.extra_scripts} - buildroot/scripts/stm32f107xC_0x7000_iap.py +extends = env:MKS_TFT32_V1_3 build_flags = ${stm32f10x.build_flags} -DSTM32F10X_CL= -DHSE_VALUE=25000000ul