mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
Add initial FreeBSD support
This commit is contained in:
committed by
Ron Evans
parent
3b2a4b64c5
commit
71a380ce8c
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user