rt-thread/bsp/allwinner/libraries/sunxi-hal/hal/SConscript

316 lines
8.3 KiB
Python
Raw Normal View History

from building import *
cwd = GetCurrentDir()
src = Split('''
source/ccmu/hal_clk.c
source/ccmu/sunxi-ng/clk-fixed-rate.c
source/ccmu/sunxi-ng/ccu_common.c
source/ccmu/sunxi-ng/ccu_sdm.c
source/ccmu/sunxi-ng/ccu_mp.c
source/ccmu/sunxi-ng/ccu_mult.c
source/ccmu/sunxi-ng/clk-fixed-factor.c
source/ccmu/sunxi-ng/ccu_reset.c
source/ccmu/sunxi-ng/ccu_gate.c
source/ccmu/sunxi-ng/ccu-sun8iw20-rtc.c
source/ccmu/sunxi-ng/ccu-sun8iw20-r.c
source/ccmu/sunxi-ng/ccu_frac.c
source/ccmu/sunxi-ng/ccu_mux.c
source/ccmu/sunxi-ng/ccu_nm.c
source/ccmu/sunxi-ng/ccu.c
source/ccmu/sunxi-ng/ccu_nk.c
source/ccmu/sunxi-ng/clk.c
source/ccmu/sunxi-ng/ccu_nkm.c
source/ccmu/sunxi-ng/clk-divider.c
source/ccmu/sunxi-ng/ccu_div.c
source/ccmu/sunxi-ng/ccu_nkmp.c
source/ccmu/sunxi-ng/ccu-sun8iw20.c
source/ccmu/hal_reset.c
source/gpio/hal_gpio.c
source/gpio/sun8iw20/gpio-sun8iw20.c
source/uart/hal_uart.c
source/pwm/hal_pwm.c
source/watchdog/hal_watchdog.c
source/timer/hal_timer.c
source/timer/sunxi_timer.c
source/timer/hal_avs.c
''')
#./source/disp2/disp/lcd/VVX07H005A10.c
#./source/disp2/disp/lcd/st7701s.c
#./source/disp2/disp/lcd/to20t20000.c
#./source/disp2/disp/lcd/lq101r1sx03.c
#./source/disp2/disp/lcd/s2003t46g.c
#./source/disp2/disp/lcd/tm_dsi_panel.c
#./source/disp2/disp/lcd/st7789v_cpu.c
#./source/disp2/disp/lcd/default_eink.c
#./source/disp2/disp/lcd/h245qbn02.c
#./source/disp2/disp/lcd/dx0960be40a1.c
#./source/disp2/disp/lcd/WilliamLcd.c
#./source/disp2/disp/lcd/ili9881c.c
#./source/disp2/disp/lcd/S6D7AA0X01.c
#./source/disp2/disp/lcd/inet_dsi_panel.c
#./source/disp2/disp/lcd/t30p106.c
#./source/disp2/disp/lcd/fd055hd003s.c
#./source/disp2/disp/lcd/wtl096601g03.c
#./source/disp2/disp/lcd/lt070me05000.c
#./source/disp2/disp/lcd/tft720x1280.c
#./source/disp2/disp/lcd/st7796s.c
#./source/disp2/disp/lcd/frd450h40014.c
#./source/disp2/disp/lcd/lh219wq1.c
#./source/disp2/disp/lcd/wtq05027d01.c
#./source/disp2/disp/lcd/ls029b3sx02.c
#./source/disp2/disp/lcd/st7789v.c
#./source/disp2/disp/lcd/cpu_gg1p4062utsw.c
#./source/disp2/disp/lcd/ili9341.c
#./source/disp2/disp/lcd/t27p06.c
#./source/disp2/disp/lcd/rt13qv005d.c
# ./source/disp2/disp/lcd/he0801a068.c
# ./source/disp2/disp/de/lowlevel_v2x/disp_waveform.c
# ./source/disp2/disp/de/lowlevel_v2x/de_eink.c
# ./source/disp2/disp/de/lowlevel_v2x/disp_eink_data.c
# ./source/disp2/disp/de/lowlevel_v2x/rtmx_eink.c
# ./source/disp2/disp/de/lowlevel_v2x/de_dsi_28.c
# ./source/disp2/soc/sun8iw19.c
# ./source/disp2/soc/VVX07H005A10_mipi_config.c
# ./source/disp2/soc/f133_fpga.c
# ./source/disp2/soc/v459_perf1.c
# ./source/disp2/soc/f133_lvds.c
# ./source/disp2/disp/de/disp_smart_backlight.c
# ./source/disp2/disp/de/lowlevel_v2x/de_lcd.c
# ./source/disp2/disp/de/disp_hdmi.c
# ./source/disp2/disp/de/disp_tv.c
# ./source/disp2/disp/de/disp_vdevice.c
# ./source/disp2/disp/lcd/tft08006.c
# ./source/disp2/soc/tft08006_mipi_config.c
disp2_src = Split('''
./source/disp2/disp/de/disp_manager.c
./source/disp2/disp/de/disp_lcd.c
./source/disp2/disp/de/disp_display.c
./source/disp2/disp/de/disp_device.c
./source/disp2/disp/de/disp_features.c
./source/disp2/disp/de/disp_capture.c
./source/disp2/disp/de/lowlevel_v2x/de_wb.c
./source/disp2/disp/de/lowlevel_v2x/de_dsi.c
./source/disp2/disp/de/lowlevel_v2x/de_peak.c
./source/disp2/disp/de/lowlevel_v2x/de_gsu.c
./source/disp2/disp/de/lowlevel_v2x/de_vep_table.c
./source/disp2/disp/de/lowlevel_v2x/de_hal.c
./source/disp2/disp/de/lowlevel_v2x/de_vsu.c
./source/disp2/disp/de/lowlevel_v2x/de_scaler_table.c
./source/disp2/disp/de/lowlevel_v2x/de_ccsc.c
./source/disp2/disp/de/lowlevel_v2x/de_bws.c
./source/disp2/disp/de/lowlevel_v2x/de_lti.c
./source/disp2/disp/de/lowlevel_v2x/de_lcd_sun50iw10.c
./source/disp2/disp/de/lowlevel_v2x/disp_al.c
./source/disp2/disp/de/lowlevel_v2x/de_clock.c
./source/disp2/disp/de/lowlevel_v2x/de_smbl.c
./source/disp2/disp/de/lowlevel_v2x/de_enhance.c
./source/disp2/disp/de/lowlevel_v2x/de_rtmx.c
./source/disp2/disp/de/lowlevel_v2x/de_ase.c
./source/disp2/disp/de/lowlevel_v2x/de_feat.c
./source/disp2/disp/de/lowlevel_v2x/de_fce.c
./source/disp2/disp/de/lowlevel_v2x/de_dcsc.c
./source/disp2/disp/de/lowlevel_v2x/de_fcc.c
./source/disp2/disp/de/disp_private.c
./source/disp2/disp/de/disp_enhance.c
./source/disp2/disp/lcd/default_panel.c
./source/disp2/disp/lcd/lcd_source.c
./source/disp2/disp/lcd/panels.c
./source/disp2/disp/disp_sys_intf.c
./source/disp2/disp/dev_disp.c
./source/disp2/disp/disp_debug.c
./source/disp2/soc/disp_board_config.c
./source/disp2/soc/platform_resource.c
./source/disp2/soc/sun20iw1.c
''')
if GetDepend('LCD_SUPPORT_TFTRGB'):
if not GetDepend('LCD_USING_XML_CONFIG'):
disp2_src += ['./source/disp2/soc/rgb_config.c']
if GetDepend('LCD_SUPPORT_TFT08006'):
# disp2_src += ['./source/disp2/soc/tft08006_mipi_config.c']
disp2_src += ['./source/disp2/disp/lcd/tft08006.c']
sdmmc_src = Split('''
source/sdmmc/core.c
source/sdmmc/hal_sdpin.c
source/sdmmc/hal_sdhost.c
source/sdmmc/mmc.c
source/sdmmc/quirks.c
source/sdmmc/sd.c
source/sdmmc/sdio.c
source/sdmmc/test.c
source/sdmmc/sdio_irq.c
source/sdmmc/cmd/cmd_sd.c
source/sdmmc/osal/os/RT-Thread/os_debug.c
source/sdmmc/osal/os/RT-Thread/os_mutex.c
source/sdmmc/osal/os/RT-Thread/os_queue.c
source/sdmmc/osal/os/RT-Thread/os_timer.c
source/sdmmc/osal/os/RT-Thread/os_semaphore.c
source/sdmmc/osal/os/RT-Thread/os_thread.c
source/sdmmc/blkpart.c
''')
dma_src = Split('''
source/dma/hal_dma.c
source/common/dma_alloc.c
''')
spi_src = Split('''
source/spi/hal_spi.c
''')
disp2_test_src = Split('''
./test/disp2/disp_layer_rgb_test.c
./test/disp2/disp_layer_cfg.c
./test/disp2/disp_mem.c
''')
test_src = Split('''
test/gpio/test_gpio.c
test/ccmu/test_ng_ccmu.c
test/dma/test_dma.c
test/spi/test_spi.c
''')
gmac = Split('''
source/gmac/hal_geth_utils.c
source/gmac/hal_geth.c
''')
phy = Split('''
source/phy/hal_miiphyutil.c
source/phy/hal_phy.c
''')
rtc = Split('''
source/rtc/hal_rtc.c
source/rtc/rtc-lib.c
''')
g2d_src = Split('''
source/g2d_rcq/g2d_bld.c
source/g2d_rcq/g2d_mixer.c
source/g2d_rcq/g2d_ovl_v.c
source/g2d_rcq/g2d_rotate.c
source/g2d_rcq/g2d_top.c
source/g2d_rcq/simple_idr.c
source/g2d_rcq/g2d.c
source/g2d_rcq/g2d_ovl_u.c
source/g2d_rcq/g2d_rcq.c
source/g2d_rcq/g2d_scal.c
source/g2d_rcq/g2d_wb.c
''')
g2d_path = [cwd + '/source/g2d_rcq/']
disp2_path = [
cwd + '/test/disp2', cwd + '/source/disp2/disp',
cwd + '/source/disp2/disp/lcd',
cwd + '/source/disp2/disp/de',
cwd + '/source/disp2/disp/de/lowlevel_v2x',
cwd + '/source/disp2/soc']
rtc_path = [cwd + '/../include/hal/rtc']
twi_src = []
twi_path = []
if GetDepend('DRIVERS_TWI'):
twi_src += [cwd + '/source/twi/hal_twi.c']
twi_path += [cwd + '/source/twi']
udc_src = Split('''
source/usb/platform/sun20iw1/usb_sun20iw1.c
''')
# source/usb/udc/hal_udc.c
udc_path = [cwd + '/source/usb/udc', cwd + '/source/usb/include']
ce_src = Split('''
source/ce/ce_common.c
source/ce/hal_ce.c
''')
ce_path = [cwd + '/source/ce']
efuse_src = Split('''
source/efuse/efuse.c
source/efuse/hal_efuse.c
''')
efuse_path = [cwd + '/source/efuse']
CPPPATH = [
cwd,
cwd + '/../include/hal',
cwd + '/../include/hal/sdmmc',
cwd + '/../include/hal/phy',
cwd + '/../include/hal/usb',
cwd + '/../include/osal',
cwd + '/source',
cwd + '/source/uart',
cwd + '/source/ccmu',
cwd + '/source/gpio',
cwd + '/source/gpio/sun8iw20',
cwd + '/source/pwm',
cwd + '/../include/hal/sdmmc/osal',
cwd + '/../include/hal/sdmmc/hal',
cwd + '/source/timer',
]
uart_src = Split('''
source/uart/hal_uart.c
''')
uart_path = [cwd + '/source/uart']
if GetDepend('DRVIERS_UART'):
CPPPATH += uart_path
src += uart_src
if GetDepend('DISP2_SUNXI'):
CPPPATH += disp2_path
src += disp2_src #+ disp2_test_src
CPPPATH += rtc_path
if GetDepend('DRIVERS_SDMMC'):
src += sdmmc_src
if GetDepend('DRIVERS_SPI'):
src += spi_src
src += dma_src
# src += test_src
src += rtc
if GetDepend('DRIVERS_GMAC'):
src += gmac
src += phy
if GetDepend('DRIVERS_TWI'):
CPPPATH += twi_path
src += twi_src
if GetDepend('DRIVERS_G2D'):
src += g2d_src
CPPPATH += g2d_path
if GetDepend('DRIVERS_USB'):
if GetDepend('USB_DEVICE'):
src += udc_src
CPPPATH += udc_path
if GetDepend('DRIVERS_CE'):
src += ce_src
CPPPATH += ce_path
if GetDepend('DRIVERS_EFUSE'):
src += efuse_src
CPPPATH += efuse_path
group = DefineGroup('hal', src, depend = [''], CPPPATH = CPPPATH)
Return('group')