浏览代码

[bsp/stm32] 修复linux下编译的可执行文件无法启动问题 (#10169)

hydevcode 4 月之前
父节点
当前提交
f422b6a991
共有 100 个文件被更改,包括 281 次插入176 次删除
  1. 9 0
      bsp/stm32/stm32f072-st-nucleo/SConscript
  2. 1 8
      bsp/stm32/stm32f072-st-nucleo/board/SConscript
  3. 9 0
      bsp/stm32/stm32f091-st-nucleo/SConscript
  4. 1 8
      bsp/stm32/stm32f091-st-nucleo/board/SConscript
  5. 9 0
      bsp/stm32/stm32f103-100ask-mini/SConscript
  6. 1 0
      bsp/stm32/stm32f103-100ask-mini/SConstruct
  7. 1 8
      bsp/stm32/stm32f103-100ask-mini/board/SConscript
  8. 9 0
      bsp/stm32/stm32f103-100ask-pro/SConscript
  9. 1 0
      bsp/stm32/stm32f103-100ask-pro/SConstruct
  10. 1 8
      bsp/stm32/stm32f103-100ask-pro/board/SConscript
  11. 3 0
      bsp/stm32/stm32f103-atk-nano/SConscript
  12. 1 0
      bsp/stm32/stm32f103-atk-nano/SConstruct
  13. 1 2
      bsp/stm32/stm32f103-atk-nano/board/SConscript
  14. 9 0
      bsp/stm32/stm32f103-atk-warshipv3/SConscript
  15. 1 0
      bsp/stm32/stm32f103-atk-warshipv3/SConstruct
  16. 1 8
      bsp/stm32/stm32f103-atk-warshipv3/board/SConscript
  17. 9 0
      bsp/stm32/stm32f103-blue-pill/SConscript
  18. 1 0
      bsp/stm32/stm32f103-blue-pill/SConstruct
  19. 1 8
      bsp/stm32/stm32f103-blue-pill/board/SConscript
  20. 9 0
      bsp/stm32/stm32f103-dofly-M3S/SConscript
  21. 1 0
      bsp/stm32/stm32f103-dofly-M3S/SConstruct
  22. 1 8
      bsp/stm32/stm32f103-dofly-M3S/board/SConscript
  23. 9 0
      bsp/stm32/stm32f103-dofly-lyc8/SConscript
  24. 1 0
      bsp/stm32/stm32f103-dofly-lyc8/SConstruct
  25. 1 8
      bsp/stm32/stm32f103-dofly-lyc8/board/SConscript
  26. 3 0
      bsp/stm32/stm32f103-fire-arbitrary/SConscript
  27. 1 0
      bsp/stm32/stm32f103-fire-arbitrary/SConstruct
  28. 1 2
      bsp/stm32/stm32f103-fire-arbitrary/board/SConscript
  29. 9 0
      bsp/stm32/stm32f103-gizwits-gokitv21/SConscript
  30. 1 0
      bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct
  31. 2 8
      bsp/stm32/stm32f103-gizwits-gokitv21/board/SConscript
  32. 9 0
      bsp/stm32/stm32f103-hw100k-ibox/SConscript
  33. 1 0
      bsp/stm32/stm32f103-hw100k-ibox/SConstruct
  34. 2 8
      bsp/stm32/stm32f103-hw100k-ibox/board/SConscript
  35. 3 0
      bsp/stm32/stm32f103-onenet-nbiot/SConscript
  36. 1 0
      bsp/stm32/stm32f103-onenet-nbiot/SConstruct
  37. 1 2
      bsp/stm32/stm32f103-onenet-nbiot/board/SConscript
  38. 9 0
      bsp/stm32/stm32f103-yf-ufun/SConscript
  39. 1 0
      bsp/stm32/stm32f103-yf-ufun/SConstruct
  40. 1 8
      bsp/stm32/stm32f103-yf-ufun/board/SConscript
  41. 9 0
      bsp/stm32/stm32f103-ys-f1pro/SConscript
  42. 1 0
      bsp/stm32/stm32f103-ys-f1pro/SConstruct
  43. 1 8
      bsp/stm32/stm32f103-ys-f1pro/board/SConscript
  44. 9 0
      bsp/stm32/stm32f107-uc-eval/SConscript
  45. 1 0
      bsp/stm32/stm32f107-uc-eval/SConstruct
  46. 1 8
      bsp/stm32/stm32f107-uc-eval/board/SConscript
  47. 6 0
      bsp/stm32/stm32f207-st-nucleo/SConscript
  48. 1 0
      bsp/stm32/stm32f207-st-nucleo/SConstruct
  49. 1 5
      bsp/stm32/stm32f207-st-nucleo/board/SConscript
  50. 9 0
      bsp/stm32/stm32f302-st-nucleo/SConscript
  51. 1 0
      bsp/stm32/stm32f302-st-nucleo/SConstruct
  52. 1 8
      bsp/stm32/stm32f302-st-nucleo/board/SConscript
  53. 9 0
      bsp/stm32/stm32f334-st-nucleo/SConscript
  54. 1 0
      bsp/stm32/stm32f334-st-nucleo/SConstruct
  55. 1 8
      bsp/stm32/stm32f334-st-nucleo/board/SConscript
  56. 3 0
      bsp/stm32/stm32f401-st-nucleo/SConscript
  57. 1 2
      bsp/stm32/stm32f401-st-nucleo/board/SConscript
  58. 3 0
      bsp/stm32/stm32f401-weact-blackpill/SConscript
  59. 1 2
      bsp/stm32/stm32f401-weact-blackpill/board/SConscript
  60. 3 0
      bsp/stm32/stm32f405-smdz-breadfruit/SConscript
  61. 1 2
      bsp/stm32/stm32f405-smdz-breadfruit/board/SConscript
  62. 3 0
      bsp/stm32/stm32f405zg-mini-template/SConscript
  63. 2 2
      bsp/stm32/stm32f405zg-mini-template/board/SConscript
  64. 3 0
      bsp/stm32/stm32f407-armfly-v5/SConscript
  65. 1 2
      bsp/stm32/stm32f407-armfly-v5/board/SConscript
  66. 3 0
      bsp/stm32/stm32f407-atk-explorer/SConscript
  67. 1 2
      bsp/stm32/stm32f407-atk-explorer/board/SConscript
  68. 3 0
      bsp/stm32/stm32f407-fk407m2-zgt6/SConscript
  69. 1 2
      bsp/stm32/stm32f407-fk407m2-zgt6/board/SConscript
  70. 3 0
      bsp/stm32/stm32f407-lckfb-skystar/SConscript
  71. 1 2
      bsp/stm32/stm32f407-lckfb-skystar/board/SConscript
  72. 3 0
      bsp/stm32/stm32f407-robomaster-c/SConscript
  73. 1 2
      bsp/stm32/stm32f407-robomaster-c/board/SConscript
  74. 3 0
      bsp/stm32/stm32f407-rt-spark/SConscript
  75. 3 0
      bsp/stm32/stm32f407-st-discovery/SConscript
  76. 1 2
      bsp/stm32/stm32f407-st-discovery/board/SConscript
  77. 3 0
      bsp/stm32/stm32f410-st-nucleo/SConscript
  78. 1 2
      bsp/stm32/stm32f410-st-nucleo/board/SConscript
  79. 3 0
      bsp/stm32/stm32f411-atk-nano/SConscript
  80. 1 2
      bsp/stm32/stm32f411-atk-nano/board/SConscript
  81. 3 0
      bsp/stm32/stm32f411-st-nucleo/SConscript
  82. 1 2
      bsp/stm32/stm32f411-st-nucleo/board/SConscript
  83. 3 0
      bsp/stm32/stm32f411-weact-blackpill/SConscript
  84. 1 3
      bsp/stm32/stm32f411-weact-blackpill/board/SConscript
  85. 3 0
      bsp/stm32/stm32f412-st-nucleo/SConscript
  86. 2 2
      bsp/stm32/stm32f412-st-nucleo/board/SConscript
  87. 3 0
      bsp/stm32/stm32f413-st-nucleo/SConscript
  88. 1 2
      bsp/stm32/stm32f413-st-nucleo/board/SConscript
  89. 3 0
      bsp/stm32/stm32f427-robomaster-a/SConscript
  90. 1 2
      bsp/stm32/stm32f427-robomaster-a/board/SConscript
  91. 3 0
      bsp/stm32/stm32f429-armfly-v6/SConscript
  92. 1 2
      bsp/stm32/stm32f429-armfly-v6/board/SConscript
  93. 3 0
      bsp/stm32/stm32f429-atk-apollo/SConscript
  94. 1 2
      bsp/stm32/stm32f429-atk-apollo/board/SConscript
  95. 3 0
      bsp/stm32/stm32f429-fire-challenger/SConscript
  96. 1 2
      bsp/stm32/stm32f429-fire-challenger/board/SConscript
  97. 3 0
      bsp/stm32/stm32f429-st-disco/SConscript
  98. 1 2
      bsp/stm32/stm32f429-st-disco/board/SConscript
  99. 3 0
      bsp/stm32/stm32f446-st-nucleo/SConscript
  100. 1 2
      bsp/stm32/stm32f446-st-nucleo/board/SConscript

+ 9 - 0
bsp/stm32/stm32f072-st-nucleo/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F030x6 || STM32F030x8 || STM32F031x6
+# STM32F038xx || STM32F042x6 || STM32F048xx
+# STM32F070x6 || STM32F051x8 || STM32F058xx
+# STM32F071xB || STM32F072xB || STM32F078xx
+# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F072xB'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 8
bsp/stm32/stm32f072-st-nucleo/board/SConscript

@@ -13,14 +13,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-# STM32F030x6 || STM32F030x8 || STM32F031x6
-# STM32F038xx || STM32F042x6 || STM32F048xx
-# STM32F070x6 || STM32F051x8 || STM32F058xx
-# STM32F071xB || STM32F072xB || STM32F078xx
-# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
-# You can select chips from the list above
-CPPDEFINES = ['STM32F072xB']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
 #     group = group + SConscript(os.path.join("ports", 'SConscript'))

+ 9 - 0
bsp/stm32/stm32f091-st-nucleo/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F030x6 || STM32F030x8 || STM32F031x6
+# STM32F038xx || STM32F042x6 || STM32F048xx
+# STM32F070x6 || STM32F051x8 || STM32F058xx
+# STM32F071xB || STM32F072xB || STM32F078xx
+# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
+# You can select chips from the list above
+env.Append(CPPDEFINES=['STM32F091xC'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 8
bsp/stm32/stm32f091-st-nucleo/board/SConscript

@@ -13,14 +13,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-# STM32F030x6 || STM32F030x8 || STM32F031x6
-# STM32F038xx || STM32F042x6 || STM32F048xx
-# STM32F070x6 || STM32F051x8 || STM32F058xx
-# STM32F071xB || STM32F072xB || STM32F078xx
-# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
-# You can select chips from the list above
-CPPDEFINES = ['STM32F091xC']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
 #     group = group + SConscript(os.path.join("ports", 'SConscript'))

+ 9 - 0
bsp/stm32/stm32f103-100ask-mini/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xB'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-100ask-mini/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-100ask-mini/board/SConscript

@@ -28,12 +28,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xB']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-100ask-pro/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-100ask-pro/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-100ask-pro/board/SConscript

@@ -31,12 +31,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 3 - 0
bsp/stm32/stm32f103-atk-nano/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F103xB'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-atk-nano/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 2
bsp/stm32/stm32f103-atk-nano/board/SConscript

@@ -28,6 +28,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
 
-CPPDEFINES = ['STM32F103xB']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-atk-warshipv3/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-atk-warshipv3/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-atk-warshipv3/board/SConscript

@@ -31,12 +31,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-blue-pill/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xB'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-blue-pill/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-blue-pill/board/SConscript

@@ -24,12 +24,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xB']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-dofly-M3S/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-dofly-M3S/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-dofly-M3S/board/SConscript

@@ -34,12 +34,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-dofly-lyc8/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xB'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-dofly-lyc8/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map'])
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-dofly-lyc8/board/SConscript

@@ -24,12 +24,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xB']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 3 - 0
bsp/stm32/stm32f103-fire-arbitrary/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-fire-arbitrary/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 2
bsp/stm32/stm32f103-fire-arbitrary/board/SConscript

@@ -34,6 +34,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-gizwits-gokitv21/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xB'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-gizwits-gokitv21/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 2 - 8
bsp/stm32/stm32f103-gizwits-gokitv21/board/SConscript

@@ -24,12 +24,6 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xB']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-hw100k-ibox/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-hw100k-ibox/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 2 - 8
bsp/stm32/stm32f103-hw100k-ibox/board/SConscript

@@ -32,12 +32,6 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 3 - 0
bsp/stm32/stm32f103-onenet-nbiot/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-onenet-nbiot/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 2
bsp/stm32/stm32f103-onenet-nbiot/board/SConscript

@@ -27,6 +27,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-yf-ufun/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-yf-ufun/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-yf-ufun/board/SConscript

@@ -24,12 +24,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f103-ys-f1pro/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F103xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f103-ys-f1pro/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f103-ys-f1pro/board/SConscript

@@ -24,12 +24,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F103xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f107-uc-eval/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F107xC'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f107-uc-eval/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f107-uc-eval/board/SConscript

@@ -24,12 +24,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f107xc.s']
 
-# STM32F100xB || STM32F100xE || STM32F101x6
-# STM32F101xB || STM32F101xE || STM32F101xG
-# STM32F102x6 || STM32F102xB || STM32F103x6
-# STM32F103xB || STM32F103xE || STM32F103xG
-# STM32F105xC || STM32F107xC)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F107xC']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 6 - 0
bsp/stm32/stm32f207-st-nucleo/SConscript

@@ -1,12 +1,18 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# STM32F205xx || STM32F207xx || STM32F215xx
+# STM32F217xx
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F207xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f207-st-nucleo/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 5
bsp/stm32/stm32f207-st-nucleo/board/SConscript

@@ -24,9 +24,5 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F2xx_HAL/CMSIS/Device/ST/STM32F2xx/Source/Templates/iar/startup_stm32f207xx.s']
 
-# STM32F205xx || STM32F207xx || STM32F215xx
-# STM32F217xx
-# You can select chips from the list above
-CPPDEFINES = ['STM32F207xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 Return('group')

+ 9 - 0
bsp/stm32/stm32f302-st-nucleo/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# (STM32F301x8) || (STM32F302x8) || (STM32F318xx)
+# (STM32F302xC) || (STM32F303xC) || (STM32F358xx)
+# (STM32F303x8) || (STM32F334x8) || (STM32F328xx)
+# (STM32F302xE) || (STM32F303xE) || (STM32F398xx)
+# (STM32F373xC) || (STM32F378xx)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F302x8'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f302-st-nucleo/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f302-st-nucleo/board/SConscript

@@ -24,13 +24,6 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/iar/startup_stm32f302x8.s']
 
-# (STM32F301x8) || (STM32F302x8) || (STM32F318xx)
-# (STM32F302xC) || (STM32F303xC) || (STM32F358xx)
-# (STM32F303x8) || (STM32F334x8) || (STM32F328xx)
-# (STM32F302xE) || (STM32F303xE) || (STM32F398xx)
-# (STM32F373xC) || (STM32F378xx)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F302x8']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 Return('group')

+ 9 - 0
bsp/stm32/stm32f334-st-nucleo/SConscript

@@ -1,12 +1,21 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+# (STM32F301x8) || (STM32F302x8) || (STM32F318xx)
+# (STM32F302xC) || (STM32F303xC) || (STM32F358xx)
+# (STM32F303x8) || (STM32F334x8) || (STM32F328xx)
+# (STM32F302xE) || (STM32F303xE) || (STM32F398xx)
+# (STM32F373xC) || (STM32F378xx)
+# You can select chips from the list above
+env.Append(CPPDEFINES = ['STM32F334x8'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 0
bsp/stm32/stm32f334-st-nucleo/SConstruct

@@ -31,6 +31,7 @@ if rtconfig.PLATFORM in ['iccarm']:
     env.Replace(ARFLAGS = [''])
     env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
 
+Export('env')
 Export('RTT_ROOT')
 Export('rtconfig')
 

+ 1 - 8
bsp/stm32/stm32f334-st-nucleo/board/SConscript

@@ -24,13 +24,6 @@ elif rtconfig.PLATFORM in ['armcc', 'armclang']:
 elif rtconfig.PLATFORM in ['iccarm']:
     src += [startup_path_prefix + '/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/iar/startup_stm32f334x8.s']
 
-# (STM32F301x8) || (STM32F302x8) || (STM32F318xx)
-# (STM32F302xC) || (STM32F303xC) || (STM32F358xx)
-# (STM32F303x8) || (STM32F334x8) || (STM32F328xx)
-# (STM32F302xE) || (STM32F303xE) || (STM32F398xx)
-# (STM32F373xC) || (STM32F378xx)
-# You can select chips from the list above
-CPPDEFINES = ['STM32F334x8']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 Return('group')

+ 3 - 0
bsp/stm32/stm32f401-st-nucleo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F401xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f401-st-nucleo/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F401xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f401-weact-blackpill/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F401xC'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f401-weact-blackpill/board/SConscript

@@ -12,8 +12,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F401xC']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f405-smdz-breadfruit/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F405xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f405-smdz-breadfruit/board/SConscript

@@ -13,8 +13,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F405xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f405zg-mini-template/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F405xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 2 - 2
bsp/stm32/stm32f405zg-mini-template/board/SConscript

@@ -11,8 +11,8 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F405xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-armfly-v5/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f407-armfly-v5/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F407xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-atk-explorer/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f407-atk-explorer/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F407xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-fk407m2-zgt6/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f407-fk407m2-zgt6/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F407xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-lckfb-skystar/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f407-lckfb-skystar/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F407xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-robomaster-c/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f407-robomaster-c/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F407xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-rt-spark/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES=['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f407-st-discovery/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F407xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f407-st-discovery/board/SConscript

@@ -12,8 +12,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F407xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f410-st-nucleo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F410Rx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f410-st-nucleo/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F410Rx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f411-atk-nano/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F411xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f411-atk-nano/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F411xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f411-st-nucleo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F411xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f411-st-nucleo/board/SConscript

@@ -12,8 +12,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F411xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f411-weact-blackpill/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F411xE'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 3
bsp/stm32/stm32f411-weact-blackpill/board/SConscript

@@ -11,9 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-
-CPPDEFINES = ['STM32F411xE']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f412-st-nucleo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F412Zx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 2 - 2
bsp/stm32/stm32f412-st-nucleo/board/SConscript

@@ -12,8 +12,8 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F412Zx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f413-st-nucleo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F413xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f413-st-nucleo/board/SConscript

@@ -12,8 +12,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F413xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f427-robomaster-a/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F427xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f427-robomaster-a/board/SConscript

@@ -12,8 +12,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F427xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):

+ 3 - 0
bsp/stm32/stm32f429-armfly-v6/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F429xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f429-armfly-v6/board/SConscript

@@ -11,7 +11,6 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F429xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 Return('group')

+ 3 - 0
bsp/stm32/stm32f429-atk-apollo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F429xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f429-atk-apollo/board/SConscript

@@ -11,8 +11,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F429xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
 #     group = group + SConscript(os.path.join("ports", 'SConscript'))

+ 3 - 0
bsp/stm32/stm32f429-fire-challenger/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F429xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f429-fire-challenger/board/SConscript

@@ -12,8 +12,7 @@ CubeMX_Config/Src/stm32f4xx_hal_msp.c
 path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
-CPPDEFINES = ['STM32F429xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
 #     group = group + SConscript(os.path.join("ports", 'SConscript'))

+ 3 - 0
bsp/stm32/stm32f429-st-disco/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F429xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f429-st-disco/board/SConscript

@@ -12,8 +12,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F429xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
 #     group = group + SConscript(os.path.join("ports", 'SConscript'))

+ 3 - 0
bsp/stm32/stm32f446-st-nucleo/SConscript

@@ -1,12 +1,15 @@
 # for module compiling
 import os
 Import('RTT_ROOT')
+Import('env')
 from building import *
 
 cwd = GetCurrentDir()
 objs = []
 list = os.listdir(cwd)
 
+env.Append(CPPDEFINES = ['STM32F446xx'])
+
 for d in list:
     path = os.path.join(cwd, d)
     if os.path.isfile(os.path.join(path, 'SConscript')):

+ 1 - 2
bsp/stm32/stm32f446-st-nucleo/board/SConscript

@@ -12,8 +12,7 @@ path =  [cwd]
 path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')]
 
 
-CPPDEFINES = ['STM32F446xx']
-group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
 
 # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
 #     group = group + SConscript(os.path.join("ports", 'SConscript'))

部分文件因为文件数量过多而无法显示