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
will match on both `pears=20, apples=30` and `pears=30, apples=40` but not `pears=20, apples=40`, in that sense each
379
379
"set" of identification properties is independent from each other and cannot be mixed for port matching.
380
+
381
+
#### Identification of board options
382
+
383
+
The board identification can also identify [custom board options](platform-specification.md#custom-board-options) if the corresponding `upload_port` properties are defined:
a discovery tools capable of detecting which menu options where used could report properties to match those lines.
391
+
Let's see an example to clarify it, in the following `boards.txt`:
392
+
393
+
```
394
+
myboard.upload_port.pid=0x0010
395
+
myboard.upload_port.vid=0x2341
396
+
myboard.menu.cpu.atmega1280=ATmega1280
397
+
myboard.menu.cpu.atmega1280.upload_port.c=atmega1280 <--- identification property for cpu=atmega1280
398
+
myboard.menu.cpu.atmega1280.build_cpu=atmega1280
399
+
myboard.menu.cpu.atmega2560=ATmega2560
400
+
myboard.menu.cpu.atmega2560.upload_port.c=atmega2560 <--- identification property for cpu=atmega2560
401
+
myboard.menu.cpu.atmega2560.build_cpu=atmega2560
402
+
myboard.menu.mem.1k=1KB
403
+
myboard.menu.mem.1k.upload_port.mem=1 <--- identification property for mem=1k
404
+
myboard.menu.mem.1k.build_mem=1024
405
+
myboard.menu.mem.2k=2KB
406
+
myboard.menu.mem.2k.upload_port.1.mem=2 <------ identification property for mem=2k (case 1)
407
+
myboard.menu.mem.2k.upload_port.2.ab=ef <---\
408
+
myboard.menu.mem.2k.upload_port.2.cd=gh <---+-- identification property for mem=2k (case 2)
409
+
myboard.menu.mem.2k.build_mem=2048
410
+
```
411
+
412
+
we have a board called `myboard` with two custom menu options `cpu` and `mem`. The discovery may provide extra identification properties to determine the custom menu options of the connected board, for example the following properties:
413
+
414
+
```
415
+
vid=0x0010
416
+
pid=0x2341
417
+
c=atmega2560
418
+
```
419
+
420
+
will match the FQBN `mypackage:avr:myboard:cpu=atmega2560` becuase of the property `c=atmega2560`.
421
+
The identification properties:
422
+
423
+
```
424
+
vid=0x0010
425
+
pid=0x2341
426
+
c=atmega2560
427
+
mem=2
428
+
```
429
+
430
+
will match the FQBN `mypackage:avr:myboard:cpu=atmega2560,mem=2k`.
431
+
The identification properties:
432
+
433
+
```
434
+
vid=0x0010
435
+
pid=0x2341
436
+
c=atmega2560
437
+
ab=ef
438
+
cd=gh
439
+
```
440
+
441
+
will match the FQBN `mypackage:avr:myboard:cpu=atmega2560,mem=2k` too (they will match the second set for `mem=2k`).
0 commit comments