summaryrefslogtreecommitdiff
path: root/bsp/stm32/stm32f429-atk-apollo/board/ports/SConscript
blob: 778549622536387efa548dd8970817280fc7f588 (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
36
37
import os
from building import *

objs = []
cwd  = GetCurrentDir()

# add general drivers
src = []
path =  [cwd]

if GetDepend(['BSP_USING_ETH']):
    src += Glob('phy_reset.c')

if GetDepend(['BSP_USING_SPI_FLASH']):
    src += Glob('spi_flash_init.c')

if GetDepend(['BSP_USING_SDCARD']):
    src += Glob('sdcard_port.c')

if GetDepend(['BSP_USING_AUDIO']):
    src += Glob('audio/drv_wm8978.c')
    src += Glob('audio/drv_sound.c')
    path += [cwd + '/audio']

if GetDepend(['BSP_USING_AUDIO_RECORD']):
    src += Glob('audio/drv_mic.c')
    path += [cwd + '/audio']
    
CPPDEFINES = ['STM32F429xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

list = os.listdir(cwd)
for item in list:
    if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
        group = group + SConscript(os.path.join(item, 'SConscript'))

Return('group')