aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorDmitri Goutnik <[email protected]>2019-12-14 07:36:47 -0500
committerRon Evans <[email protected]>2019-12-29 10:48:28 +0100
commit71a380ce8c622480eb4df50f9f43f2e63c00bccc (patch)
tree3cff776cdba95757da2296472e9cef419b6d4194 /main.go
parent3b2a4b64c5b70803e50eca12e58d66142c4a6182 (diff)
downloadtinygo-71a380ce8c622480eb4df50f9f43f2e63c00bccc.tar.gz
tinygo-71a380ce8c622480eb4df50f9f43f2e63c00bccc.zip
Add initial FreeBSD support
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index c954e9741..dea040b5d 100644
--- a/main.go
+++ b/main.go
@@ -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")