Skip to content

Commit 560025a

Browse files
authored
Better error message for boards without bootloader (#1170)
1 parent fb30f2d commit 560025a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

commands/upload/upload.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ func runProgramAction(pm *packagemanager.PackageManager,
228228
}
229229
}
230230

231+
if !uploadProperties.ContainsKey("upload.protocol") && programmer == nil {
232+
return fmt.Errorf("a programmer is required to upload for this board")
233+
}
234+
231235
// Set properties for verbose upload
232236
if verbose {
233237
if v, ok := uploadProperties.GetOk("upload.params.verbose"); ok {

0 commit comments

Comments
 (0)