gdb: support -ocd-output on windows

This commit is contained in:
sago35
2021-03-05 09:02:34 +09:00
committed by Ayke
parent 3fdd1a9249
commit c4191da2a5
3 changed files with 10 additions and 2 deletions
+3 -2
View File
@@ -19,6 +19,7 @@ import (
"syscall"
"time"
"github.com/mattn/go-colorable"
"github.com/tinygo-org/tinygo/builder"
"github.com/tinygo-org/tinygo/compileopts"
"github.com/tinygo-org/tinygo/goenv"
@@ -393,7 +394,7 @@ func FlashGDB(pkgName string, ocdOutput bool, options *compileopts.Options) erro
if ocdOutput {
// Make it clear which output is from the daemon.
w := &ColorWriter{
Out: os.Stderr,
Out: colorable.NewColorableStderr(),
Prefix: "openocd: ",
Color: TermColorYellow,
}
@@ -408,7 +409,7 @@ func FlashGDB(pkgName string, ocdOutput bool, options *compileopts.Options) erro
if ocdOutput {
// Make it clear which output is from the daemon.
w := &ColorWriter{
Out: os.Stderr,
Out: colorable.NewColorableStderr(),
Prefix: "jlink: ",
Color: TermColorYellow,
}