2021-08-23 10:13:53 +08:00
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Split("""
|
|
|
|
Device/System_ACM32F0x0.c
|
|
|
|
HAL_Driver/Src/HAL_DMA.c
|
|
|
|
HAL_Driver/Src/HAL_ADC.c
|
|
|
|
HAL_Driver/Src/HAL_GPIO.c
|
|
|
|
HAL_Driver/Src/HAL_WDT.c
|
|
|
|
HAL_Driver/Src/HAL_IWDT.c
|
2021-09-08 16:48:45 +08:00
|
|
|
HAL_Driver/Src/HAL_UART.c
|
2021-08-23 10:13:53 +08:00
|
|
|
HAL_Driver/Src/HAL_TIMER.c
|
|
|
|
HAL_Driver/Src/HAL_EXTI.c
|
2022-03-26 15:40:33 +08:00
|
|
|
HAL_Driver/Src/HAL_RTC.c
|
|
|
|
HAL_Driver/Src/HAL_SPI.c
|
|
|
|
HAL_Driver/Src/HAL_I2C.c
|
|
|
|
HAL_Driver/Src/HAL_CRC.c
|
2021-08-23 10:13:53 +08:00
|
|
|
""")
|
|
|
|
|
|
|
|
|
2022-03-26 15:40:33 +08:00
|
|
|
libpath = ['.', cwd + '/Device', cwd + '/HAL_Driver/Src']
|
|
|
|
libs = []
|
|
|
|
|
2022-05-31 06:04:05 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2021-08-23 10:13:53 +08:00
|
|
|
src = src + ['Device/Startup_ACM32F0x0_gcc.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-08-23 10:13:53 +08:00
|
|
|
src = src + ['Device/Startup_ACM32F0x0.s']
|
2022-05-31 06:11:15 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2021-08-23 10:13:53 +08:00
|
|
|
src = src + ['Device/Startup_ACM32F0x0_iar.s']
|
|
|
|
|
|
|
|
path = [cwd + '/HAL_Driver/Inc',
|
|
|
|
cwd + '/Device',
|
|
|
|
cwd + '/CMSIS']
|
|
|
|
|
2022-03-26 15:40:33 +08:00
|
|
|
group = DefineGroup('ACM32_HAL', src, depend = [''], CPPPATH = path, LIBS = libs, LIBPATH = libpath)
|
2021-08-23 10:13:53 +08:00
|
|
|
|
|
|
|
Return('group')
|