diff --git a/boards/adafruit_circuitplayground_m0.json b/boards/adafruit_circuitplayground_m0.json index 274ffc03..989e43d3 100644 --- a/boards/adafruit_circuitplayground_m0.json +++ b/boards/adafruit_circuitplayground_m0.json @@ -27,6 +27,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/adafruit_feather_m0_usb.json b/boards/adafruit_feather_m0_usb.json index f6236d87..dc7378d0 100644 --- a/boards/adafruit_feather_m0_usb.json +++ b/boards/adafruit_feather_m0_usb.json @@ -28,6 +28,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/digix.json b/boards/digix.json index 28bb3ff9..973e49a8 100644 --- a/boards/digix.json +++ b/boards/digix.json @@ -23,6 +23,7 @@ "disable_flushing": true, "maximum_ram_size": 28672, "maximum_size": 524288, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/due.json b/boards/due.json index 3fe38e5f..6abc6c6b 100644 --- a/boards/due.json +++ b/boards/due.json @@ -32,6 +32,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 524288, + "native_usb": false, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/dueUSB.json b/boards/dueUSB.json index b9a2c4f2..7cc1374b 100644 --- a/boards/dueUSB.json +++ b/boards/dueUSB.json @@ -28,6 +28,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 524288, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/mkr1000USB.json b/boards/mkr1000USB.json index d9ad1727..51f270ee 100644 --- a/boards/mkr1000USB.json +++ b/boards/mkr1000USB.json @@ -35,6 +35,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/mkrfox1200.json b/boards/mkrfox1200.json index e93b9569..723b88d0 100644 --- a/boards/mkrfox1200.json +++ b/boards/mkrfox1200.json @@ -27,6 +27,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/mkrzero.json b/boards/mkrzero.json index 1e64e3fe..842f82a9 100644 --- a/boards/mkrzero.json +++ b/boards/mkrzero.json @@ -27,6 +27,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sainSmartDue.json b/boards/sainSmartDue.json index 5b402c50..448c6145 100644 --- a/boards/sainSmartDue.json +++ b/boards/sainSmartDue.json @@ -23,6 +23,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 524288, + "native_usb": false, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sainSmartDueUSB.json b/boards/sainSmartDueUSB.json index 546afd40..19b2f4c6 100644 --- a/boards/sainSmartDueUSB.json +++ b/boards/sainSmartDueUSB.json @@ -24,6 +24,7 @@ "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", + "native_usb": true, "require_upload_port": true, "use_1200bps_touch": true, "wait_for_upload_port": true diff --git a/boards/sodaq_autonomo.json b/boards/sodaq_autonomo.json index e23ee39a..9155bd0d 100644 --- a/boards/sodaq_autonomo.json +++ b/boards/sodaq_autonomo.json @@ -28,6 +28,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sodaq_explorer.json b/boards/sodaq_explorer.json index cd913a48..1e91fe09 100644 --- a/boards/sodaq_explorer.json +++ b/boards/sodaq_explorer.json @@ -28,6 +28,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sodaq_one.json b/boards/sodaq_one.json index bd296b57..285d0223 100644 --- a/boards/sodaq_one.json +++ b/boards/sodaq_one.json @@ -28,6 +28,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sodaq_wdt.json b/boards/sodaq_wdt.json index 2d134f65..6725c8d0 100644 --- a/boards/sodaq_wdt.json +++ b/boards/sodaq_wdt.json @@ -28,6 +28,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sparkfun_samd21_dev_usb.json b/boards/sparkfun_samd21_dev_usb.json index 0e197eb3..0465dbd3 100644 --- a/boards/sparkfun_samd21_dev_usb.json +++ b/boards/sparkfun_samd21_dev_usb.json @@ -27,6 +27,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/sparkfun_samd21_mini_usb.json b/boards/sparkfun_samd21_mini_usb.json index 7164e1a7..a6803081 100644 --- a/boards/sparkfun_samd21_mini_usb.json +++ b/boards/sparkfun_samd21_mini_usb.json @@ -27,6 +27,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/boards/zeroUSB.json b/boards/zeroUSB.json index a15c3722..e938cebd 100644 --- a/boards/zeroUSB.json +++ b/boards/zeroUSB.json @@ -31,6 +31,7 @@ "disable_flushing": true, "maximum_ram_size": 32768, "maximum_size": 262144, + "native_usb": true, "protocol": "sam-ba", "require_upload_port": true, "use_1200bps_touch": true, diff --git a/builder/main.py b/builder/main.py index 09ef6505..a22ac239 100644 --- a/builder/main.py +++ b/builder/main.py @@ -191,8 +191,8 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 "--verify", "--reset", "-U", - "true" if ("usb" in env.subst("$BOARD").lower( - ) or env.subst("$BOARD") == "digix") else "false" + "true" if env.BoardConfig().get( + "upload.native_usb", False) else "false" ], UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES'