You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Support for upload "without a port" (`no-port` dummy protocol)
573
+
574
+
Some upload tools already have the port detection builtin so there is no need to specify an upload port (for example the `openocd` tool is often able to autodetect the devices to upload by itself).
575
+
576
+
To support this particular use case a dummy `no-port` protocol has been reserved:
577
+
578
+
```
579
+
myboard.upload.tool.no-port=openocd_without_port
580
+
```
581
+
582
+
The `no-port` upload recipe will be selected when:
583
+
584
+
- The upload port is not specified
585
+
586
+
or
587
+
588
+
- The upload port is specified but the protocol of the selected port doesn't match any of the available upload protocols for a board
589
+
590
+
Let's see some examples to clarify:
591
+
592
+
```
593
+
board1.upload.tool.no-port=openocd_without_port
594
+
595
+
board2.upload.tool.serial=bossac
596
+
board2.upload.tool.no-port=openocd_without_port
597
+
598
+
board3.upload.tool.serial=bossac
599
+
```
600
+
601
+
In the `board1` case: the `openocd_without_port` recipe will be always used, even if a port has been selected by the user.
602
+
603
+
In the `board2` case: the `bossac` recipe will be used if the port selected is a `serial` port, otherwise the `openocd_without_port` will be used in all other cases (even if a port has been selected by the user).
604
+
605
+
In the `board3` case: the `bossac` recipe will be used if the port selected is a `serial` port, otherwise the upload will fail.
606
+
607
+
A lot of existing platforms already have recipes without an explicit port address, in this case the upload tool specified in the old (non-pluggable) way will be considered as a `no-port` upload, for example let's consider the Arduino Zero board:
608
+
609
+
```
610
+
# Arduino Zero (Prorgamming Port)
611
+
# ---------------------------------------
612
+
arduino_zero_edbg.name=Arduino Zero (Programming Port)
613
+
arduino_zero_edbg.vid.0=0x03eb
614
+
arduino_zero_edbg.pid.0=0x2157
615
+
616
+
arduino_zero_edbg.upload.tool=openocd <--- CONSIDERED AS no-port PROT.
0 commit comments