Unverified Commit af0c1c87 authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Automatically update the JSON file in makeboards (#664)

Keep the Arduino Board Manager list up-to-date from makeboards.py
parent cfaae848
...@@ -27,19 +27,19 @@ ...@@ -27,19 +27,19 @@
"name": "Adafruit ItsyBitsy RP2040" "name": "Adafruit ItsyBitsy RP2040"
}, },
{ {
"name": "Adafruit KB2040" "name": "Adafruit QT Py RP2040"
}, },
{ {
"name": "Adafruit Macropad RP2040" "name": "Adafruit STEMMA Friend RP2040"
}, },
{ {
"name": "Adafruit QTPy RP2040" "name": "Adafruit Trinkey RP2040 QT"
}, },
{ {
"name": "Adafruit STEMMA Friend RP2040" "name": "Adafruit MacroPad RP2040"
}, },
{ {
"name": "Adafruit Trinkey RP2040 QT" "name": "Adafruit KB2040"
}, },
{ {
"name": "Arduino Nano RP2040 Connect" "name": "Arduino Nano RP2040 Connect"
...@@ -51,31 +51,31 @@ ...@@ -51,31 +51,31 @@
"name": "Cytron Maker Pi RP2040" "name": "Cytron Maker Pi RP2040"
}, },
{ {
"name": "DeRuiLab FlyBoard2040 Core" "name": "DeRuiLab FlyBoard2040Core"
}, },
{ {
"name": "DFRobot Beetle RP2040" "name": "DFRobot Beetle RP2040"
}, },
{ {
"name": "Invector Labs Challenger RP2040 WiFi" "name": "iLabs Challenger 2040 LoRa"
}, },
{ {
"name": "Invector Labs Challenger RP2040 WiFi/BLE" "name": "iLabs Challenger 2040 WiFi"
}, },
{ {
"name": "Invector Labs Challenger NB RP2040 WiFi" "name": "iLabs Challenger 2040 LTE"
}, },
{ {
"name": "Invector Labs Challenger RP2040 LTE" "name": "iLabs Challenger 2040 WiFi/BLE"
}, },
{ {
"name": "Invector Labs Challenger RP2040 LoRa" "name": "iLabs Challenger NB 2040 WiFi"
}, },
{ {
"name": "Invector Labs RPICO32" "name": "iLabs RPICO32"
}, },
{ {
"name": "Seeed XIAO RP2040" "name": "Melopero Shake RP2040"
}, },
{ {
"name": "Solder Party RP2040 Stamp" "name": "Solder Party RP2040 Stamp"
...@@ -87,22 +87,22 @@ ...@@ -87,22 +87,22 @@
"name": "SparkFun Thing Plus RP2040" "name": "SparkFun Thing Plus RP2040"
}, },
{ {
"name": "Melopero Shake RP2040" "name": "uPesy RP2040 DevKit"
}, },
{ {
"name": "uPesy RP2040 DevKit" "name": "Seeed XAIO RP2040"
}, },
{ {
"name": "WIZnet W5100S-EVB-Pico" "name": "WIZnet W5100S-EVB-Pico"
}, },
{ {
"name": "WIZnet 5500-EVB-Pico" "name": "WIZnet WizFi360-EVB-Pico"
}, },
{ {
"name": "WIZnet WizFi360-EVB-Pico" "name": "WIZnet W5500-EVB-Pico"
}, },
{ {
"name": "Generic RP2040 Module" "name": "Generic RP2040"
} }
], ],
"toolsDependencies": [ "toolsDependencies": [
......
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import sys import sys
import json
def BuildFlashMenu(name, flashsize, fssizelist): def BuildFlashMenu(name, flashsize, fssizelist):
for fssize in fssizelist: for fssize in fssizelist:
...@@ -173,6 +174,10 @@ def MakeBoard(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flash ...@@ -173,6 +174,10 @@ def MakeBoard(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flash
if name == "generic": if name == "generic":
BuildBoot(n) BuildBoot(n)
MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flashsizemb, boot2) MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flashsizemb, boot2)
global pkgjson
thisbrd = {}
thisbrd['name'] = "%s %s" % (vendor_name, product_name)
pkgjson['packages'][0]['platforms'][0]['boards'].append(thisbrd)
def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flashsizemb, boot2): def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, flashsizemb, boot2):
json = """{ json = """{
...@@ -230,6 +235,9 @@ def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, f ...@@ -230,6 +235,9 @@ def MakeBoardJSON(name, vendor_name, product_name, vid, pid, pwr, boarddefine, f
f.write(json) f.write(json)
f.close() f.close()
pkgjson = json.load(open(os.path.abspath(os.path.dirname(__file__)) + '/../package/package_pico_index.template.json'))
pkgjson['packages'][0]['platforms'][0]['boards'] = []
sys.stdout = open(os.path.abspath(os.path.dirname(__file__)) + "/../boards.txt", "w") sys.stdout = open(os.path.abspath(os.path.dirname(__file__)) + "/../boards.txt", "w")
WriteWarning() WriteWarning()
BuildGlobalMenuList() BuildGlobalMenuList()
...@@ -295,5 +303,6 @@ MakeBoard("wiznet_5500_evb_pico", "WIZnet", "W5500-EVB-Pico", "0x2e8a", "0x1029" ...@@ -295,5 +303,6 @@ MakeBoard("wiznet_5500_evb_pico", "WIZnet", "W5500-EVB-Pico", "0x2e8a", "0x1029"
# Generic # Generic
MakeBoard("generic", "Generic", "RP2040", "0x2e8a", "0xf00a", 250, "GENERIC_RP2040", 16, "boot2_generic_03h_4_padded_checksum") MakeBoard("generic", "Generic", "RP2040", "0x2e8a", "0xf00a", 250, "GENERIC_RP2040", 16, "boot2_generic_03h_4_padded_checksum")
sys.stdout.close() sys.stdout.close()
with open(os.path.abspath(os.path.dirname(__file__)) + '/../package/package_pico_index.template.json', 'w') as f:
f.write(json.dumps(pkgjson, indent=3))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment