Unverified Commit 13f68fbc authored by Maximilian Gerhardt's avatar Maximilian Gerhardt Committed by GitHub

Make TinyUSB linking work automatically with PIO (#658)

parent 3071b3f2
......@@ -159,6 +159,9 @@ def configure_usb_flags(cpp_defines):
if "USE_TINYUSB" in cpp_defines:
env.Append(CPPPATH=[os.path.join(
FRAMEWORK_DIR, "libraries", "Adafruit_TinyUSB_Arduino", "src", "arduino")])
# automatically build with lib_archive = no to make weak linking work, needed for TinyUSB
env_section = "env:" + env["PIOENV"]
platform.config.set(env_section, "lib_archive", False)
elif "PIO_FRAMEWORK_ARDUINO_NO_USB" in cpp_defines:
env.Append(
CPPPATH=[os.path.join(FRAMEWORK_DIR, "tools", "libpico")],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment