Make serial port on wio-sdk-wm1110 board work

By disabling the (inaccessible) adafruit USB
This commit is contained in:
geeksville
2024-06-20 09:47:07 -07:00
parent 9a80951d6f
commit 9266a53f4e
5 changed files with 32 additions and 8 deletions

3
extra_scripts/README.md Normal file
View File

@@ -0,0 +1,3 @@
# extra_scripts
This directory contains special [scripts](https://docs.platformio.org/en/latest/scripting/index.html) that are used to modify the platformio environment in rare cases.

View File

@@ -0,0 +1,17 @@
Import("env")
# NOTE: This is not currently used, but can serve as an example on how to write extra_scripts
print("Current CLI targets", COMMAND_LINE_TARGETS)
print("Current Build targets", BUILD_TARGETS)
print("CPP defs", env.get("CPPDEFINES"))
# Adafruit.py in the platformio build tree is a bit naive and always enables their USB stack for building. We don't want this.
# So come in after that python script has run and disable it. This hack avoids us having to fork that big project and send in a PR
# which might not be accepted. -@geeksville
env["CPPDEFINES"].remove("USBCON")
env["CPPDEFINES"].remove("USE_TINYUSB")
# Custom actions when building program/firmware
# env.AddPreAction("buildprog", callback...)