8000 Add warning not to edit boards.txt (#383) · nerkulec/arduino-pico@5cc9835 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cc9835

Browse files
Add warning not to edit boards.txt (earlephilhower#383)
1 parent 4887798 commit 5cc9835

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

boards.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# WARNING - DO NOT EDIT THIS FILE, IT IS MACHINE GENERATED
2+
# To change something here, edit tools/makeboards.py and
3+
# run 'python3 makeboards.py > ../boards.txt' to regenerate
4+
15
menu.BoardModel=Model
26
menu.flash=Flash Size
37
menu.freq=CPU Speed

tools/makeboards.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ def BuildHeader(name, vendor_name, product_name, vidtouse, pidtouse, vid, pid, p
9898
print('%s.build.usb_manufacturer="%s"' % (name, vendor_name))
9999
print('%s.build.usb_product="%s"' % (name, product_name))
100100

101+
def WriteWarning():
102+
print("# WARNING - DO NOT EDIT THIS FILE, IT IS MACHINE GENERATED")
103+
print("# To change something here, edit tools/makeboards.py and")
104+
print("# run 'python3 makeboards.py > ../boards.txt' to regenerate")
105+
print()
106+
101107
def BuildGlobalMenuList():
102108
print("menu.BoardModel=Model")
103109
print("menu.flash=Flash Size")
@@ -147,7 +153,7 @@ def MakeBoard(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flash
147153
if name == "generic":
148154
BuildBoot(n)
149155

150-
156+
WriteWarning()
151157
BuildGlobalMenuList()
152158
MakeBoard("rpipico", "Raspberry Pi", "Pico", "0x2e8a", "0x000a", 250, "RASPBERRY_PI_PICO", 2, "boot2_w25q080_2_padded_checksum")
153159
MakeBoard("adafruit_feather", "Adafruit", "Feather RP2040", "0x239a", "0x80f1", 250, "ADAFRUIT_FEATHER_RP2040", 8, "boot2_w25x10cl_4_padded_checksum")

0 commit comments

Comments
 (0)
0