Import('RTT_ROOT') Import('rtconfig') from building import * import os cwd = GetCurrentDir() # add the app files. src = [] if GetDepend(['RT_USING_SERIAL']): if GetDepend(['RT_USING_SERIAL_V2']): src += ['test_uart_v2.c'] else: src += ['test_uart_v1.c'] if GetDepend(['BSP_USING_SPI']): # don't add test file when use RT_USB_DEVICE_MSTORAGE if not (GetDepend(['BSP_USING_USBD']) and GetDepend(['RT_USB_DEVICE_MSTORAGE'])): src += ['test_spi.c'] if GetDepend(['BSP_USING_QSPI']): src += ['test_qspi.c'] if GetDepend(['BSP_USING_I2C']): src += ['test_i2c.c'] if GetDepend(['RT_USING_SOFT_I2C1']): src += ['test_soft_i2c.c'] if GetDepend(['BSP_USING_ETH', 'RT_USING_LWIP']): src += ['test_eth.c'] #lwIP: HTTP server lwiphttp_path = os.path.join(RTT_ROOT, 'components', 'net', 'lwip', 'lwip-2.1.2', 'src', 'apps', 'http') VariantDir('lwip_http', lwiphttp_path, duplicate=0) lwiphttp_src = Split(""" lwip_http/altcp_proxyconnect.c lwip_http/fs.c lwip_http/http_client.c lwip_http/httpd.c """) src += lwiphttp_src if GetDepend(['BSP_USING_ADC']): src += ['test_adc.c'] if GetDepend(['BSP_USING_DAC']): src += ['test_dac.c'] if GetDepend(['BSP_USING_CAN']) or GetDepend(['BSP_USING_MCAN']): src += ['test_can.c'] if GetDepend(['BSP_USING_RTC']): src += ['test_rtc.c'] if GetDepend(['BSP_USING_WDT']) or GetDepend(['BSP_USING_SWDT']): src += ['test_wdt.c'] if GetDepend(['BSP_USING_CLOCK_TIMER']): src += ['test_clock_timer.c'] if GetDepend(['BSP_USING_PULSE_ENCODER']): src += ['test_pulse_encoder.c'] if GetDepend(['BSP_USING_PWM']): src += ['test_pwm.c'] if GetDepend(['BSP_USING_INPUT_CAPTURE']): src += ['test_tmr_capture.c'] if GetDepend(['BSP_USING_PM']): src += ['test_pm.c'] src += ['test_wktm.c'] if GetDepend('BSP_USING_HWCRYPTO'): src += ['test_crypto.c'] if GetDepend(['BSP_USING_SDIO']): src += ['test_sdmmc.c'] if GetDepend(['BSP_USING_EXMC', 'BSP_USING_SDRAM']): src += ['test_sdram.c'] if GetDepend(['BSP_USING_EXMC', 'BSP_USING_NAND']): src += ['test_nand.c'] if GetDepend(['BSP_USING_USBD']): src += ['test_usbd.c'] if GetDepend(['BSP_USING_USBH']): src += ['test_usbh.c'] if GetDepend(['BSP_USING_ON_CHIP_FLASH']): src += ['test_fal.c'] if GetDepend(['BSP_USING_GPIO']): src += ['test_gpio.c'] if GetDepend(['RT_USING_CHERRYUSB']): src += ['test_cherryusb.c'] path = [cwd] group = DefineGroup('Tests', src, depend = [''], CPPPATH = path) Return('group')