mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-13 22:32:27 +00:00
Make serial port on wio-sdk-wm1110 board work
By disabling the (inaccessible) adafruit USB
This commit is contained in:
3
extra_scripts/README.md
Normal file
3
extra_scripts/README.md
Normal 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.
|
||||
17
extra_scripts/disable_adafruit_usb.py
Normal file
17
extra_scripts/disable_adafruit_usb.py
Normal 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...)
|
||||
Reference in New Issue
Block a user