summaryrefslogtreecommitdiff
path: root/bsp/stm32/stm32h750-artpi/board/SConscript
diff options
context:
space:
mode:
author沐攸 <[email protected]>2025-04-21 17:48:18 +0800
committerGitHub <[email protected]>2025-04-21 17:48:18 +0800
commit53a4bfa70833df136889cfcfc88a91853b349ff3 (patch)
tree3c0b88138d836903154434cb1530dde64e13c812 /bsp/stm32/stm32h750-artpi/board/SConscript
parent7125e7bebd512a24427a7971ac1aff9acbae8668 (diff)
bsp/stm32:Separate STM32H7 HAL drivers (#10204)
Diffstat (limited to 'bsp/stm32/stm32h750-artpi/board/SConscript')
-rw-r--r--bsp/stm32/stm32h750-artpi/board/SConscript52
1 files changed, 7 insertions, 45 deletions
diff --git a/bsp/stm32/stm32h750-artpi/board/SConscript b/bsp/stm32/stm32h750-artpi/board/SConscript
index f9ed2c3100..6cc40d875c 100644
--- a/bsp/stm32/stm32h750-artpi/board/SConscript
+++ b/bsp/stm32/stm32h750-artpi/board/SConscript
@@ -1,61 +1,23 @@
import os
-import rtconfig
from building import *
-Import('SDK_LIB')
-
-objs = []
cwd = GetCurrentDir()
-list = os.listdir(cwd)
# add the general drivers.
src = Glob('board.c')
src += Glob('CubeMX_Config/Core/Src/stm32h7xx_hal_msp.c')
-if GetDepend(['BSP_SCB_ENABLE_I_CACHE']) or GetDepend(['BSP_SCB_ENABLE_D_CACHE']):
- src += Glob('port/drv_mpu.c')
-
-if GetDepend(['BSP_USING_QSPI_FLASH']):
- src += Glob('port/drv_qspi_flash.c')
-
-if GetDepend(['BSP_USING_SPI_LCD_ILI9488']):
- src += Glob('port/drv_spi_ili9488.c')
-
-if GetDepend(['BSP_USING_SPI_FLASH']):
- src += Glob('port/spi_flash_init.c')
-
-if GetDepend(['BSP_USING_FS']):
- src += Glob('port/filesystem.c')
-
-if GetDepend(['BSP_USING_SDIO_ARTPI']):
- src += Glob('port/drv_sdio.c')
-
-if GetDepend(['BSP_USING_WIFI']):
- src += Glob('port/wifi_config.c')
- src += Glob('port/drv_wlan.c')
-
-if GetDepend(['BSP_USING_ETH_H750']):
- src += Glob('port/drv_eth.c')
-
-if GetDepend(['PKG_USING_EASYFLASH']):
- src += Glob('port/ef_fal_port.c')
-
-for item in list:
- if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
- objs = objs + SConscript(os.path.join(item, 'SConscript'))
path = [cwd]
path += [cwd + '/CubeMX_Config/Core/Inc']
-path += [cwd + '/port']
-startup_path_prefix = SDK_LIB
-
-if rtconfig.PLATFORM in ['gcc']:
- src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s']
-elif rtconfig.PLATFORM in ['armcc', 'armclang']:
- src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h750xx.s']
-elif rtconfig.PLATFORM in ['iccarm']:
- src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h750xx.s']
+# STM32H743xx || STM32H750xx || STM32F753xx
+# You can select chips from the list above
+CPPDEFINES = ['STM32H750xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
+list = os.listdir(cwd)
+for item in list:
+ if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
+ group = group + SConscript(os.path.join(item, 'SConscript'))
Return('group')