summaryrefslogtreecommitdiff
path: root/bsp/acm32/acm32f4xx-nucleo/libraries/SConscript
blob: 812c529fde87b4324338c96d11cabaabecada536 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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']

if rtconfig.PLATFORM in ['gcc']:
    src += ['Device/startup_ACM32F4_gcc.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
    src += ['Device/Startup_ACM32F4.s']
elif rtconfig.PLATFORM in ['iccarm']:
    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')