main: remove ocd-daemon property
This fixes a crash crash with the -ocd-output flag.
Этот коммит содержится в:
родитель
66ed03faa2
коммит
96d4987345
2 изменённых файлов: 1 добавлений и 5 удалений
2
main.go
2
main.go
|
@ -543,7 +543,7 @@ func FlashGDB(pkgName, target, port string, ocdOutput bool, config *BuildConfig)
|
||||||
// Make it clear which output is from the daemon.
|
// Make it clear which output is from the daemon.
|
||||||
w := &ColorWriter{
|
w := &ColorWriter{
|
||||||
Out: os.Stderr,
|
Out: os.Stderr,
|
||||||
Prefix: spec.OCDDaemon[0] + ": ",
|
Prefix: "openocd: ",
|
||||||
Color: TermColorYellow,
|
Color: TermColorYellow,
|
||||||
}
|
}
|
||||||
daemon.Stdout = w
|
daemon.Stdout = w
|
||||||
|
|
|
@ -39,7 +39,6 @@ type TargetSpec struct {
|
||||||
ExtraFiles []string `json:"extra-files"`
|
ExtraFiles []string `json:"extra-files"`
|
||||||
Emulator []string `json:"emulator"`
|
Emulator []string `json:"emulator"`
|
||||||
FlashCommand string `json:"flash-command"`
|
FlashCommand string `json:"flash-command"`
|
||||||
OCDDaemon []string `json:"ocd-daemon"`
|
|
||||||
GDB string `json:"gdb"`
|
GDB string `json:"gdb"`
|
||||||
PortReset string `json:"flash-1200-bps-reset"`
|
PortReset string `json:"flash-1200-bps-reset"`
|
||||||
FlashMethod string `json:"flash-method"`
|
FlashMethod string `json:"flash-method"`
|
||||||
|
@ -93,9 +92,6 @@ func (spec *TargetSpec) copyProperties(spec2 *TargetSpec) {
|
||||||
if spec2.FlashCommand != "" {
|
if spec2.FlashCommand != "" {
|
||||||
spec.FlashCommand = spec2.FlashCommand
|
spec.FlashCommand = spec2.FlashCommand
|
||||||
}
|
}
|
||||||
if len(spec2.OCDDaemon) != 0 {
|
|
||||||
spec.OCDDaemon = spec2.OCDDaemon
|
|
||||||
}
|
|
||||||
if spec2.GDB != "" {
|
if spec2.GDB != "" {
|
||||||
spec.GDB = spec2.GDB
|
spec.GDB = spec2.GDB
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче