rt-thread-official/bsp/nrf52832/nRF5_SDK_13.0.0_04a0bfd/Sconscript

35 lines
1.3 KiB
Plaintext

Import('RTT_ROOT')
Import('rtconfig')
from building import *
# get current directory
cwd = GetCurrentDir()
BLE_COMMON = Glob('./components/ble/common/*.c')
SrcRemove(BLE_COMMON, 'ble_conn_state.c')
BLE_GATT = Glob('./components/ble/nrf_ble_gatt/*.c')
BLE_ADVERTISING = Glob('./components/ble/ble_advertising/*.c')
BLE_SERVICE = Glob('./components/ble/ble_services/ble_nus/*.c')
BLE_SRC = BLE_COMMON + BLE_GATT + BLE_SERVICE + BLE_ADVERTISING
SOFTDEVICE = Glob('./components/softdevice/common/softdevice_handler/*.c')
SrcRemove(SOFTDEVICE, './components/softdevice/common/softdevice_handler/softdevice_handler_appsh.c')
BLE_STACK_SRC = BLE_SRC + SOFTDEVICE
path = [cwd + '/components']
path += [cwd + '/components/softdevice/common/softdevice_handler']
path += [cwd + '/components/softdevice/s132/headers']
path += [cwd + '/components/softdevice/s132/headers/nrf52']
path += [cwd + '/components/ble/common']
path += [cwd + '/components/ble/nrf_ble_gatt']
path += [cwd + '/components/ble/ble_advertising']
path += [cwd + '/components/ble/ble_services/ble_nus']
CPPDEFINES = ['BLE_STACK_SUPPORT_REQD', 'NRF_SD_BLE_API_VERSION=4', 'S132', 'SOFTDEVICE_PRESENT']
group = DefineGroup('BLE_STACK', BLE_STACK_SRC, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')