Skip to content

Commit 818fae9

Browse files
committed
Added support for more boards
1 parent 6e3d64a commit 818fae9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

command/ota/generate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func Generate(binFile string, outFile string, fqbn string) error {
3636

3737
// Esp32 boards have a wide range of vid and pid, we don't map all of them
3838
// If the fqbn is the one of an ESP32 board, we force a default magic number that matches the same default expected on the fw side
39-
if strings.HasPrefix(fqbn, "esp32") {
39+
if !strings.HasPrefix(fqbn, "arduino:esp32") && strings.HasPrefix(fqbn, "esp32") {
4040
magicNumberPart1 = inota.Esp32MagicNumberPart1
4141
magicNumberPart2 = inota.Esp32MagicNumberPart2
4242
} else {

internal/ota/boadpids.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ var (
3232
}
3333

3434
ArduinoPidToFQBN = map[string]string{
35+
"1002": "arduino:renesas_uno:unor4wifi",
36+
"0070": "arduino:esp32:nano_nora",
3537
"8057": "arduino:samd:nano_33_iot",
3638
"804E": "arduino:samd:mkr1000",
3739
"8052": "arduino:samd:mkrgsm1400",
@@ -44,8 +46,6 @@ var (
4446
"0266": "arduino:mbed_giga:giga",
4547
}
4648

47-
ArduinoVendorID = "2341"
48-
4949
ArduinoFqbnToPID = map[string]string{
5050
"arduino:samd:nano_33_iot": "8057",
5151
"arduino:samd:mkr1000": "804E",
@@ -57,8 +57,12 @@ var (
5757
"arduino:mbed_nicla:nicla_vision": "025F",
5858
"arduino:mbed_opta:opta": "0064",
5959
"arduino:mbed_giga:giga": "0266",
60+
"arduino:renesas_uno:unor4wifi": "1002",
61+
"arduino:esp32:nano_nora": "0070",
6062
}
6163

64+
ArduinoVendorID = "2341"
65+
6266
Esp32MagicNumberPart1 = "4553"
6367
Esp32MagicNumberPart2 = "5033"
6468
)

0 commit comments

Comments
 (0)