Skip to content

Commit d3f7a0a

Browse files
valerosfpistm
authored andcommitted
Sync PlatformIO build script
Compile USBDevice library by default if USB is enabled Signed-off-by: Valerii Koval <valeros@users.noreply.github.com>
1 parent 2a7fc9f commit d3f7a0a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/platformio/platformio-build.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ def process_usb_configuration(cpp_defines):
109109
]
110110
)
111111

112+
if any(
113+
d in env.Flatten(env.get("CPPDEFINES", []))
114+
for d in (
115+
"USBD_USE_CDC",
116+
"USBD_USE_HID_COMPOSITE",
117+
)
118+
):
119+
env.BuildSources(
120+
join("$BUILD_DIR", "USBDevice"),
121+
join(FRAMEWORK_DIR, "libraries", "USBDevice")
122+
)
123+
112124
if any(f in env["CPPDEFINES"] for f in ("USBD_USE_CDC", "USBD_USE_HID_COMPOSITE")):
113125
env.Append(CPPDEFINES=["HAL_PCD_MODULE_ENABLED"])
114126

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy