@@ -18,11 +18,11 @@ package arguments
18
18
import (
19
19
"context"
20
20
21
- "github.com/arduino/arduino-cli/arduino/cores"
22
21
"github.com/arduino/arduino-cli/commands"
23
22
"github.com/arduino/arduino-cli/commands/board"
24
23
"github.com/arduino/arduino-cli/commands/core"
25
24
"github.com/arduino/arduino-cli/commands/lib"
25
+ "github.com/arduino/arduino-cli/commands/upload"
26
26
"github.com/arduino/arduino-cli/internal/cli/instance"
27
27
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
28
28
)
@@ -103,10 +103,12 @@ func GetInstalledProgrammers() []string {
103
103
104
104
installedProgrammers := make (map [string ]string )
105
105
for _ , board := range list .Boards {
106
- fqbn , _ := cores .ParseFQBN (board .Fqbn )
107
- _ , boardPlatform , _ , _ , _ , _ := pme .ResolveFQBN (fqbn )
108
- for programmerID , programmer := range boardPlatform .Programmers {
109
- installedProgrammers [programmerID ] = programmer .Name
106
+ programmers , _ := upload .ListProgrammersAvailableForUpload (context .Background (), & rpc.ListProgrammersAvailableForUploadRequest {
107
+ Instance : inst ,
108
+ Fqbn : board .Fqbn ,
109
+ })
110
+ for _ , programmer := range programmers .GetProgrammers () {
111
+ installedProgrammers [programmer .GetId ()] = programmer .GetName ()
110
112
}
111
113
}
112
114
0 commit comments