2022-06-26 12:00:03 +00:00
|
|
|
Import("env")
|
|
|
|
|
|
|
|
env.Append(
|
|
|
|
CPPPATH=[
|
|
|
|
"#/lib/STM32CubeWB/Drivers/CMSIS/Device/ST/STM32WBxx/Include",
|
|
|
|
"#/lib/STM32CubeWB/Drivers/CMSIS/Include",
|
|
|
|
"#/lib/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc",
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN",
|
|
|
|
],
|
|
|
|
CPPDEFINES=[
|
|
|
|
"STM32WB",
|
|
|
|
"STM32WB55xx",
|
|
|
|
"USE_FULL_ASSERT",
|
|
|
|
"USE_FULL_LL_DRIVER",
|
|
|
|
],
|
2022-09-14 22:14:55 +00:00
|
|
|
SDK_HEADERS=[
|
|
|
|
*env.GlobRecursive("*_ll_*.h", "#/lib/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/", exclude="*usb.h"),
|
2022-11-02 19:54:44 +00:00
|
|
|
File("STM32CubeWB/Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h"),
|
|
|
|
File("STM32CubeWB/Middlewares/Third_Party/FreeRTOS/Source/include/stream_buffer.h"),
|
2022-09-14 22:14:55 +00:00
|
|
|
],
|
2022-06-26 12:00:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if env["RAM_EXEC"]:
|
|
|
|
env.Append(
|
|
|
|
CPPDEFINES=[
|
|
|
|
"VECT_TAB_SRAM",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
libenv = env.Clone(FW_LIB_NAME="stm32cubewb")
|
2022-08-22 17:06:17 +00:00
|
|
|
libenv.Append(
|
|
|
|
CPPPATH=[
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN/ble",
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core",
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread",
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci",
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl",
|
|
|
|
"#/lib/STM32CubeWB/Middlewares/ST/STM32_WPAN/utilities",
|
|
|
|
]
|
|
|
|
)
|
2022-06-26 12:00:03 +00:00
|
|
|
libenv.ApplyLibFlags()
|
|
|
|
|
|
|
|
sources = libenv.GlobRecursive(
|
|
|
|
"*_ll_*.c", "STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Src/", exclude="*usb.c"
|
|
|
|
)
|
|
|
|
sources += Glob(
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/*.c",
|
|
|
|
source=True,
|
|
|
|
)
|
|
|
|
sources += Glob(
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/*_tl*.c",
|
|
|
|
source=True,
|
|
|
|
)
|
|
|
|
sources += [
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/ble/core/template/osal.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/utilities/otp.c",
|
|
|
|
"STM32CubeWB/Middlewares/ST/STM32_WPAN/utilities/stm_list.c",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
|
|
Return("lib")
|