import rtconfig Import('RTT_ROOT') from building import * # get current directory cwd = GetCurrentDir() # The set of source files associated with this SConscript file. src = Split(""" CMSIS/Device/MM32/MM32F3277/Source/Templates/system_mm32f3277g.c MM32F3270_HAL_Driver/Src/hal_rcc.c MM32F3270_HAL_Driver/Src/hal_dma.c MM32F3270_HAL_Driver/Src/hal_gpio.c """) if GetDepend(['RT_USING_PIN']): src += ['MM32F3270_HAL_Driver/Src/hal_exti.c'] src += ['MM32F3270_HAL_Driver/Src/hal_syscfg.c'] if GetDepend(['RT_USING_SERIAL']): src += ['MM32F3270_HAL_Driver/Src/hal_uart.c'] if GetDepend(['RT_USING_I2C']): src += ['MM32F3270_HAL_Driver/Src/hal_i2c.c'] if GetDepend(['RT_USING_SPI']): src += ['MM32F3270_HAL_Driver/Src/hal_spi.c'] if GetDepend(['RT_USING_USB']): src += ['MM32F3270_HAL_Driver/Src/hal_usb.c'] if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']): src += ['MM32F3270_HAL_Driver/Src/hal_tim_16b.c'] src += ['MM32F3270_HAL_Driver/Src/hal_tim_32b.c'] src += ['MM32F3270_HAL_Driver/Src/hal_tim_adv.c'] src += ['MM32F3270_HAL_Driver/Src/hal_tim_basic.c'] if GetDepend(['RT_USING_ADC']): src += ['MM32F3270_HAL_Driver/Src/hal_adc.c'] src += ['MM32F3270_HAL_Driver/Src/hal_comp.c'] if GetDepend(['RT_USING_DAC']): src += ['MM32F3270_HAL_Driver/Src/hal_dac.c'] if GetDepend(['RT_USING_RTC']): src += ['MM32F3270_HAL_Driver/Src/hal_rtc.c'] if GetDepend(['RT_USING_EXRAM']): src += ['MM32F3270_HAL_Driver/Src/hal_fsmc.c'] if GetDepend(['RT_USING_SDIO']): src += ['MM32F3270_HAL_Driver/Src/hal_sdio.c'] if GetDepend(['RT_USING_WDT']): src += ['MM32F3270_HAL_Driver/Src/hal_iwdg.c'] src += ['MM32F3270_HAL_Driver/Src/hal_wwdg.c'] path = [cwd + '/CMSIS/Device/MM32/MM32F3277/Include', cwd + '/MM32F3270_HAL_Driver/Inc'] if not GetDepend('PKG_CMSIS_CORE'): path += [cwd + '/CMSIS/Include'] CPPDEFINES = ['USE_HAL_DRIVER'] group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group')