Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
package cc.arduino.packages.uploaders;

import cc.arduino.LoadVIDPIDSpecificPreferences;
import cc.arduino.contributions.VersionComparator;
import cc.arduino.packages.Uploader;
import processing.app.*;
import cc.arduino.packages.BoardPort;
import processing.app.debug.RunnerException;
import processing.app.debug.TargetPlatform;
import processing.app.helpers.OSUtils;
import processing.app.helpers.PreferencesMap;
import processing.app.helpers.PreferencesMapException;
import processing.app.helpers.StringReplacer;
Expand Down Expand Up @@ -135,7 +137,11 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
I18n.format(tr("Forcing reset using 1200bps open/close on port {0}"), userSelectedUploadPort));
Serial.touchForCDCReset(userSelectedUploadPort);
}
Thread.sleep(400);
// It looks like MacOS Catalina (10.15) is too fast enumerating the bootloader port
// Let's skip the initial sleep to get a faster response and eventually an enumeration
if (!(OSUtils.isMacOS() && VersionComparator.greaterThanOrEqual(OSUtils.version(), "10.15"))) {
Thread.sleep(400);
}
if (waitForUploadPort) {
// Scanning for available ports seems to open the port or
// otherwise assert DTR, which would cancel the WDT reset if
Expand Down