2021-09-22 17:14:47 +08:00
|
|
|
import rtconfig
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
|
|
|
src = Split("""
|
|
|
|
Device/System_ACM32F4.c
|
|
|
|
HAL_Driver/Src/HAL_EFlash.c
|
|
|
|
HAL_Driver/Src/HAL_DMA.c
|
|
|
|
HAL_Driver/Src/HAL_GPIO.c
|
|
|
|
HAL_Driver/Src/HAL_UART.c
|
|
|
|
HAL_Driver/Src/HAL_EXTI.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
|
|
|
|
libpath = ['.', cwd + '/Device', cwd + '/HAL_Driver/Src']
|
|
|
|
libs = ['System_Accelerate', 'HAL_EFlash_EX']
|
|
|
|
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2021-09-22 17:14:47 +08:00
|
|
|
src += ['Device/Startup_ACM32F4_gcc.s']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2021-09-22 17:14:47 +08:00
|
|
|
src += ['Device/Startup_ACM32F4.s']
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
src += ['Device/Startup_ACM32F4_iar.s']
|
|
|
|
|
|
|
|
path = [cwd + '/HAL_Driver/Inc',
|
|
|
|
cwd + '/Device',
|
|
|
|
cwd + '/CMSIS']
|
|
|
|
|
|
|
|
group = DefineGroup('ACM32_HAL', src, depend = [''], CPPPATH = path, LIBS = libs, LIBPATH = libpath)
|
|
|
|
|
|
|
|
Return('group')
|
|
|
|
|