Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Sync PlatformIO build script
Compile USBDevice library by default if USB is enabled

Signed-off-by: Valerii Koval <valeros@users.noreply.github.com>
  • Loading branch information
valeros authored Aug 14, 2024
commit 5c99c01cd2ac02000fd9628f7a25f54df8b97208
12 changes: 12 additions & 0 deletions tools/platformio/platformio-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ def process_usb_configuration(cpp_defines):
]
)

if any(
d in env.Flatten(env.get("CPPDEFINES", []))
for d in (
"USBD_USE_CDC",
"USBD_USE_HID_COMPOSITE",
)
):
env.BuildSources(
join("$BUILD_DIR", "USBDevice"),
join(FRAMEWORK_DIR, "libraries", "USBDevice")
)

if any(f in env["CPPDEFINES"] for f in ("USBD_USE_CDC", "USBD_USE_HID_COMPOSITE")):
env.Append(CPPDEFINES=["HAL_PCD_MODULE_ENABLED"])

Expand Down