diff options
author | Dmitri Goutnik <[email protected]> | 2019-12-14 07:36:47 -0500 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-12-29 10:48:28 +0100 |
commit | 71a380ce8c622480eb4df50f9f43f2e63c00bccc (patch) | |
tree | 3cff776cdba95757da2296472e9cef419b6d4194 /main.go | |
parent | 3b2a4b64c5b70803e50eca12e58d66142c4a6182 (diff) | |
download | tinygo-71a380ce8c622480eb4df50f9f43f2e63c00bccc.tar.gz tinygo-71a380ce8c622480eb4df50f9f43f2e63c00bccc.zip |
Add initial FreeBSD support
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -452,7 +452,7 @@ func flashUF2UsingMSD(volume, tmppath string) error { // find standard UF2 info path var infoPath string switch runtime.GOOS { - case "linux": + case "linux", "freebsd": infoPath = "/media/*/" + volume + "/INFO_UF2.TXT" case "darwin": infoPath = "/Volumes/" + volume + "/INFO_UF2.TXT" @@ -479,7 +479,7 @@ func flashHexUsingMSD(volume, tmppath string) error { // find expected volume path var destPath string switch runtime.GOOS { - case "linux": + case "linux", "freebsd": destPath = "/media/*/" + volume case "darwin": destPath = "/Volumes/" + volume @@ -558,6 +558,8 @@ func getDefaultPort() (port string, err error) { portPath = "/dev/cu.usb*" case "linux": portPath = "/dev/ttyACM*" + case "freebsd": + portPath = "/dev/cuaU*" case "windows": cmd := exec.Command("wmic", "PATH", "Win32_SerialPort", "WHERE", "Caption LIKE 'USB Serial%'", "GET", "DeviceID") |