unleashed-firmware/lib/STM32CubeWB.scons
hedger ebc2b66372
fbt fixes for mfbt pt2 (#1951)
* fbt: split sdk management code
* scripts: fixed import handling
* fbt: sdk: reformatted paths
* scrips: dist: bundling libs as a build artifact
* fbt: sdk: better path management
* typo fix
* fbt: sdk: minor path handling fixes
* toolchain: fixed windows toolchain download
* fbt: minor refactorin
* fbt: moved sdk management code to extapps.scons
* fbt: fixed sdk symbols header path; disabled -fstack-usage
* fbt: changed pathing for .py scripts
* fbt: changed SDK_HEADERS pathing; added libusb to SDK; added icon_i.h to SDK; added hw target to SDK meta
* fbt: added libusb headers to SDK
* picopass: include cleanup; api: added subghz/registry.h; api: added mbedtls to exported headers
* picopass: fixed formatting
* fbt: fixed COPRO_ASSETS_SCRIPT
* sdk: added basic infrared apis
* toolchain: added ufbt to list of legal fbtenv callers; updated error messages
* fbt: changed manifest collection & icon processing code
* fbt: simpler srcdir lookup
* toolchain: path management fixes; fbt: fixes for fap private libs paths
* scripts: toolchain: reworked download on Windows
* toolchain: v17
* scripts: added colorlog for logging
* Github: fix unit tests

Co-authored-by: あく <alleteam@gmail.com>
2022-11-03 00:15:40 +09:00

72 lines
2.4 KiB
Text

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",
],
SDK_HEADERS=env.GlobRecursive(
"*_ll_*.h",
Dir("STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/"),
exclude="*usb.h",
),
)
if env["RAM_EXEC"]:
env.Append(
CPPDEFINES=[
"VECT_TAB_SRAM",
],
)
libenv = env.Clone(FW_LIB_NAME="stm32cubewb")
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",
]
)
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")