Skip to content

Commit a42bcfe

Browse files
authored
Merge pull request #2454 from fpistm/default_vid_pid
fix(platform.txt): add default vid/pid definition
2 parents 8554e3e + 115d040 commit a42bcfe

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

boards.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Nucleo_144.upload.maximum_size=0
2525
Nucleo_144.upload.maximum_data_size=0
2626
Nucleo_144.vid.0=0x0483
2727
Nucleo_144.pid.0=0x5740
28-
Nucleo_144.vid.1=0x0483
2928
# STlink V1/V2.1/V3
29+
Nucleo_144.vid.1=0x0483
3030
Nucleo_144.pid.1=0x3744
3131
Nucleo_144.vid.2=0x0483
3232
Nucleo_144.pid.2=0x3748
@@ -397,6 +397,7 @@ Nucleo_64.upload.maximum_data_size=0
397397
Nucleo_64.vid.0=0x0483
398398
Nucleo_64.pid.0=0x5740
399399
# STlink V1/V2.1/V3
400+
Nucleo_64.vid.1=0x0483
400401
Nucleo_64.pid.1=0x3744
401402
Nucleo_64.vid.2=0x0483
402403
Nucleo_64.pid.2=0x3748
@@ -876,6 +877,7 @@ Nucleo_32.upload.maximum_data_size=0
876877
Nucleo_32.vid.0=0x0483
877878
Nucleo_32.pid.0=0x5740
878879
# STlink V1/V2.1/V3
880+
Nucleo_32.vid.1=0x0483
879881
Nucleo_32.pid.1=0x3744
880882
Nucleo_32.vid.2=0x0483
881883
Nucleo_32.pid.2=0x3748
@@ -1038,6 +1040,7 @@ Disco.upload.maximum_data_size=0
10381040
Disco.vid.0=0x0483
10391041
Disco.pid.0=0x5740
10401042
# STlink V1/V2.1/V3
1043+
Disco.vid.1=0x0483
10411044
Disco.pid.1=0x3744
10421045
Disco.vid.2=0x0483
10431046
Disco.pid.2=0x3748
@@ -1358,6 +1361,7 @@ Eval.upload.maximum_data_size=0
13581361
Eval.vid.0=0x0483
13591362
Eval.pid.0=0x5740
13601363
# STlink V1/V2.1/V3
1364+
Eval.vid.1=0x0483
13611365
Eval.pid.1=0x3744
13621366
Eval.vid.2=0x0483
13631367
Eval.pid.2=0x3748
@@ -1420,8 +1424,6 @@ STM32MP1.name=STM32MP1 series coprocessor
14201424
STM32MP1.build.flash_offset=0x0
14211425
STM32MP1.upload.maximum_size=0
14221426
STM32MP1.upload.maximum_data_size=0
1423-
STM32MP1.vid.0=0x0483
1424-
STM32MP1.pid.0=0x5740
14251427

14261428
STM32MP1.build.core=arduino
14271429
STM32MP1.build.board=STM32MP1
@@ -1469,8 +1471,6 @@ GenC0.build.flash_offset=0x0
14691471
GenC0.upload.maximum_size=0
14701472
GenC0.upload.maximum_data_size=0
14711473
GenC0.debug.server.openocd.scripts.2=target/stm32c0x.cfg
1472-
GenC0.vid.0=0x0483
1473-
GenC0.pid.0=0x5740
14741474

14751475
# Generic C011D6Yx
14761476
GenC0.menu.pnum.GENERIC_C011D6YX=Generic C011D6Yx
@@ -11855,8 +11855,6 @@ GenWBA.build.flash_offset=0x0
1185511855
GenWBA.upload.maximum_size=0
1185611856
GenWBA.upload.maximum_data_size=0
1185711857
GenWBA.debug.server.openocd.scripts.2=target/stm32wbax.cfg
11858-
GenWBA.vid.0=0x0483
11859-
GenWBA.pid.0=0x5740
1186011858

1186111859
# Generic WBA55CEUx
1186211860
GenWBA.menu.pnum.GENERIC_WBA55CEUX=Generic WBA55CEUx
@@ -11902,8 +11900,6 @@ GenWL.build.flash_offset=0x0
1190211900
GenWL.upload.maximum_size=0
1190311901
GenWL.upload.maximum_data_size=0
1190411902
GenWL.debug.server.openocd.scripts.2=target/stm32wlx.cfg
11905-
GenWL.vid.0=0x0483
11906-
GenWL.pid.0=0x5740
1190711903

1190811904
# Generic WL54CCUx
1190911905
GenWL.menu.pnum.GENERIC_WL54CCUX=Generic WL54CCUx
@@ -12646,8 +12642,6 @@ IotContinuum.build.st_extra_flags=-D{build.product_line} {build.xSerial}
1264612642
IotContinuum.build.flash_offset=0x0
1264712643
IotContinuum.upload.maximum_size=0
1264812644
IotContinuum.upload.maximum_data_size=0
12649-
IotContinuum.vid.0=0x0483
12650-
IotContinuum.pid.0=0x5740
1265112645

1265212646
# IoT continuum Dev Kit Board
1265312647
IotContinuum.menu.pnum.DEVKIT_IOT_CONTINUUM=IoT continuum Dev Kit
@@ -12972,8 +12966,6 @@ ELV_Modular_System.build.board=ELV_Modular_System
1297212966
ELV_Modular_System.build.variant_h=variant_{build.board}.h
1297312967
ELV_Modular_System.upload.maximum_size=0
1297412968
ELV_Modular_System.upload.maximum_data_size=0
12975-
ELV_Modular_System.vid.0=0x0483
12976-
ELV_Modular_System.pid.0=0x5740
1297712969

1297812970
# ELV-BM-TRX1 board
1297912971
ELV_Modular_System.menu.pnum.ELV_BM_TRX1=ELV-LW-Base ELV_BM_TRX1

cmake/scripts/update_boarddb.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def platformtxt_filter(key):
5555

5656
if key[0] == "build" and key[1] != "info":
5757
return False
58+
if key[0] == "vid" or key[0] == "pid":
59+
return False
5860
return True
5961

6062

@@ -104,7 +106,12 @@ def regenerate_template(config, infile, outfile):
104106
shargs = parser.parse_args()
105107

106108
platformtxt_cfg = parse_file(shargs.platform, reject=platformtxt_filter)
107-
platformtxt_cfg = {"build": platformtxt_cfg["build"]} # whitelist what we need
109+
# whitelist what we need
110+
platformtxt_cfg = {
111+
"build": platformtxt_cfg["build"],
112+
"vid": platformtxt_cfg["vid"],
113+
"pid": platformtxt_cfg["pid"],
114+
}
108115

109116
boardstxt_cfg = parse_file(shargs.boards, reject=boardstxt_filter)
110117
del boardstxt_cfg["menu"] # blacklist what we don't need

platform.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ build.usb_flags=-DUSBCON {build.usb_speed} -DUSBD_VID={build.vid} -DUSBD_PID={bu
109109

110110
# Specify defaults for vid/pid
111111
# Boards should specify either both, or neither of these.
112+
vid.0=0x0483
113+
pid.0=0x5740
112114
build.vid={vid.0}
113115
build.pid={pid.0}
114116
upload.vid.0=0x0483

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy