4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-01 01:30:26 +08:00
Chen Wang 2322f0154e bsp: cvitek: remove support for spinor/spinand
Confirmed with milkv, only the sd card version is sold
by default for duo in the market. The spi pins are
provided through stamp holes, so that users can solder
the corresponding components on their baseboard during
secondary development.

In order to simplify maintenance work, the mainline
will only support the sd-card version and no longer
support spinor/spinand.

Updated config files the same in this patch.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-01-08 17:54:14 -05:00

70 lines
1.6 KiB
Python
Executable File

from building import *
cwd = GetCurrentDir()
src = Split('''
drv_uart.c
drv_por.c
drv_gpio.c
drv_pinmux.c
''')
CPPDEFINES = []
CPPPATH = [cwd]
CHIP_TYPE = 'cv180x'
if GetDepend('BOARD_TYPE_MILKV_DUO256M') or GetDepend('BOARD_TYPE_MILKV_DUOS'):
CHIP_TYPE = 'cv181x'
elif GetDepend('BOARD_TYPE_MILKV_DUO'):
CHIP_TYPE = 'cv180x'
CPPPATH += [cwd + r'/libraries']
CPPPATH += [cwd + r'/libraries/' + CHIP_TYPE]
if GetDepend('BSP_USING_I2C'):
src += ['drv_hw_i2c.c']
if GetDepend('BSP_USING_ADC'):
src += ['drv_adc.c']
if GetDepend('BSP_USING_WDT'):
src += ['drv_wdt.c']
if GetDepend(['BSP_USING_SPI']):
src += ['drv_spi.c']
src += ['libraries/spi/dw_spi.c']
CPPPATH += [cwd + r'/libraries/spi']
if GetDepend('BSP_USING_PWM'):
src += ['drv_pwm.c']
CPPPATH += [cwd + r'/libraries/cv180x/pwm']
if GetDepend('BSP_ROOTFS_TYPE_CROMFS'):
src += ['port/mnt_cromfs.c']
elif GetDepend('BSP_ROOTFS_TYPE_DISKFS'):
src += ['port/mnt_diskfs.c']
if GetDepend('BSP_USING_SDH'):
src += ['drv_sdhci.c']
CPPPATH += [cwd + r'/libraries/sdif']
if GetDepend('BSP_USING_ETH'):
src += Split('''
drv_eth.c
libraries/eth/dw_eth_mac.c
libraries/eth/cvi_eth_phy.c
libraries/eth/eth_phy_cvitek.c
''')
CPPPATH += [cwd + r'/libraries/eth']
CPPDEFINES += ['-DCONFIG_64BIT']
if GetDepend('BSP_USING_RTC'):
src += ['drv_rtc.c']
if GetDepend('BSP_USING_TIMER'):
src += ['drv_timer.c']
group = DefineGroup('drivers', src, depend = [''], CPPDEFINES = CPPDEFINES, CPPPATH = CPPPATH)
Return('group')