main: helpful error message for flash cmd without -target
Этот коммит содержится в:
родитель
b6db84e916
коммит
802350f8da
1 изменённых файлов: 4 добавлений и 0 удалений
4
main.go
4
main.go
|
@ -181,6 +181,10 @@ func Flash(pkgName, target, port string, printIR, dumpSSA, debug bool, printSize
|
||||||
}
|
}
|
||||||
|
|
||||||
return Compile(pkgName, ".hex", spec, printIR, dumpSSA, debug, printSizes, func(tmppath string) error {
|
return Compile(pkgName, ".hex", spec, printIR, dumpSSA, debug, printSizes, func(tmppath string) error {
|
||||||
|
if spec.Flasher == "" {
|
||||||
|
return errors.New("no flash command specified - did you miss a -target flag?")
|
||||||
|
}
|
||||||
|
|
||||||
// Create the command.
|
// Create the command.
|
||||||
flashCmd := spec.Flasher
|
flashCmd := spec.Flasher
|
||||||
flashCmd = strings.Replace(flashCmd, "{hex}", tmppath, -1)
|
flashCmd = strings.Replace(flashCmd, "{hex}", tmppath, -1)
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче