Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b66848e
some reworking of boards.txt.py
mcspr Feb 8, 2022
e45a85b
same names as original map
mcspr Feb 14, 2022
1883f03
Merge remote-tracking branch 'origin/master' into nosizeconf-amend
mcspr Apr 25, 2022
f5f5233
argparse, calc tests, regions
mcspr Apr 30, 2022
6ac142f
doctest prints these
mcspr Apr 30, 2022
b3e74af
invalid crc location?
mcspr Apr 30, 2022
61cdbfe
ide means app size, total size is different
mcspr Apr 30, 2022
f4d9f8e
.ld locations were wrong
mcspr Apr 30, 2022
f1b8589
more descriptive
mcspr Apr 30, 2022
27318e9
...even more descriptive
mcspr Apr 30, 2022
e8756f8
also an example of pprint
mcspr Apr 30, 2022
1028983
names
mcspr Apr 30, 2022
5040cd3
normalize paths
mcspr Apr 30, 2022
b341be9
remember 512k boards
mcspr Apr 30, 2022
bef7b9f
encoding!
mcspr Jun 7, 2022
fe2750f
KB and MB in menu entries
mcspr Jun 7, 2022
6681c40
finalize .txt and .ld generator
mcspr Jun 7, 2022
123057f
separate .json for boards, use slurpfile
mcspr Jun 7, 2022
80911f0
dashes, fix outputs
mcspr Jun 7, 2022
b705420
boards rst was not sorted
mcspr Jun 7, 2022
9228301
boards json aligned
mcspr Jun 7, 2022
92d06a0
some qol changes
mcspr Jun 8, 2022
488e2bc
names
mcspr Jun 8, 2022
30aaa9d
fix ld output
mcspr Jun 8, 2022
8fbf159
doc doc
mcspr Jun 8, 2022
a405c41
fix comment, always store cmdline
mcspr Jun 8, 2022
6f2e52b
choice-based selection of output
mcspr Jun 8, 2022
046f813
consistent quoting in code, formatting
mcspr Jun 8, 2022
71dacc8
consistent quoting
mcspr Jun 8, 2022
a00b355
extra escape
mcspr Jun 8, 2022
0e5e48d
shorter line width
mcspr Jun 8, 2022
afb4110
relax size adjustment when not even
mcspr Jun 8, 2022
a1fec47
names, only use the basename in cmdline comment
mcspr Jun 9, 2022
51cdcaf
revert to the original way template gets our boards list
mcspr Jul 13, 2022
887f681
Merge remote-tracking branch 'origin/master' into nosizeconf-amend
mcspr Jul 13, 2022
6eb9edc
formatter does not like multiline strings
mcspr Jul 13, 2022
58b7a80
words
mcspr Jul 13, 2022
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert to the original way template gets our boards list
  • Loading branch information
mcspr committed Jul 13, 2022
commit 51cdcafba73022b10d93a1b98fcbfc29426c97d8
6 changes: 1 addition & 5 deletions package/build_boards_manager_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,7 @@ if [ ! -z "${DOC_URL}" ]; then
.packages[0].platforms[0].help.online = \"${DOC_URL}\""
fi

jq_arg="${jq_arg} |\
.packages[0].platforms[0].boards = "'$'"boards"

jq --slurpfile boards ${srcdir}/package/package_esp8266com_index.boards.json \
"${jq_arg}" ${srcdir}/package/package_esp8266com_index.template.json \
jq "${jq_arg}" ${srcdir}/package/package_esp8266com_index.template.json \
> package_esp8266com_index.json

# Use Github API token, if available
Expand Down
113 changes: 0 additions & 113 deletions package/package_esp8266com_index.boards.json

This file was deleted.

116 changes: 114 additions & 2 deletions package/package_esp8266com_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,119 @@
"version": "",
"architecture": "esp8266",
"archiveFileName": "",
"boards": [],
"boards": [
{
"name": "Generic ESP8266 Module"
},
{
"name": "Generic ESP8285 Module"
},
{
"name": "4D Systems gen4 IoD Range"
},
{
"name": "Adafruit Feather HUZZAH ESP8266"
},
{
"name": "Amperka WiFi Slot"
},
{
"name": "Arduino"
},
{
"name": "DOIT ESP-Mx DevKit (ESP8285)"
},
{
"name": "Digistump Oak"
},
{
"name": "ESPDuino (ESP-13 Module)"
},
{
"name": "ESPectro Core"
},
{
"name": "ESPino (ESP-12 Module)"
},
{
"name": "ESPresso Lite 1.0"
},
{
"name": "ESPresso Lite 2.0"
},
{
"name": "ITEAD Sonoff"
},
{
"name": "Invent One"
},
{
"name": "LOLIN(WEMOS) D1 R2 & mini"
},
{
"name": "LOLIN(WEMOS) D1 mini (clone)"
},
{
"name": "LOLIN(WEMOS) D1 mini Lite"
},
{
"name": "LOLIN(WEMOS) D1 mini Pro"
},
{
"name": "LOLIN(WeMos) D1 R1"
},
{
"name": "Lifely Agrumino Lemon v4"
},
{
"name": "NodeMCU 0.9 (ESP-12 Module)"
},
{
"name": "NodeMCU 1.0 (ESP-12E Module)"
},
{
"name": "Olimex MOD-WIFI-ESP8266(-DEV)"
},
{
"name": "Phoenix 1.0"
},
{
"name": "Phoenix 2.0"
},
{
"name": "Schirmilabs Eduino WiFi"
},
{
"name": "Seeed Wio Link"
},
{
"name": "SparkFun Blynk Board"
},
{
"name": "SparkFun ESP8266 Thing"
},
{
"name": "SparkFun ESP8266 Thing Dev"
},
{
"name": "SweetPea ESP-210"
},
{
"name": "ThaiEasyElec's ESPino"
},
{
"name": "WiFi Kit 8"
},
{
"name": "WiFiduino"
},
{
"name": "WifInfo"
},
{
"name": "XinaBox CW01"
}
],
"toolsDependencies": [
{
"packager": "esp8266",
Expand Down Expand Up @@ -268,4 +380,4 @@
]
}
]
}
}
41 changes: 20 additions & 21 deletions tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,13 +1279,11 @@
],
"desc": [
"ESP8266 based devices from ITEAD: Sonoff SV, Sonoff TH, Sonoff"
" Basic, "
+ "and Sonoff S20",
" Basic, and Sonoff S20",
"",
"These are not development boards. The development process is "
+ "inconvenient with these devices. When flashing firmware you"
" will "
+ "need a Serial Adapter to connect it to your computer.",
"inconvenient with these devices. When flashing firmware you"
" will need a Serial Adapter to connect it to your computer.",
"",
" | Most of these devices, during normal operation, are"
" connected to "
Expand Down Expand Up @@ -2241,10 +2239,7 @@ def ldscript_name(*, flash_size, expected_fs_size, **kwargs):
>>> ldscript_name(flash_size=Kilobytes(512), expected_fs_size=Bytes(0))
'eagle.flash.512k.ld'
"""
return (
f"eagle.flash.{humanize_flash(flash_size)}{humanize_fs(expected_fs_size)}.ld"
.lower()
)
return f"eagle.flash.{humanize_flash(flash_size)}{humanize_fs(expected_fs_size)}.ld".lower()


SPI_START = 0x40200000
Expand Down Expand Up @@ -2466,7 +2461,7 @@ def size(value):
print(" dport0_0_seg : org = 0x3FF00000, len = 0x10")
print(" dram0_0_seg : org = 0x3FFE8000, len = 0x14000")
print(
f" irom0_0_seg : org = {address(sketch)}, len = 0x{sketch.size:x}"
f" irom0_0_seg : org = {address(sketch)}, len = 0x{sketch.size:x}"
)
print("}")
print()
Expand Down Expand Up @@ -2877,20 +2872,23 @@ def show_names(boards):
################################################################
# boards .json

def package_generate(output, boards):

def package_generate(output, package_file, boards):
with open(package_file, "r", encoding="utf-8") as f:
contents = json.load(f)

contents["packages"][0]["platforms"][0]["boards"] = [
{"name": board["name"]} for board in boards.values()
]

with output:
print(
json.dumps(
[{"name": board["name"]} for board in boards.values()],
indent=3,
separators=(",", ": "),
)
)
json.dump(contents, sys.stdout, indent=3, separators=(",", ": "))


################################################################
# boards .rst, here's the only place to use "desc" field


def doc_generate(output, boards):
with output:
print("Boards")
Expand All @@ -2916,8 +2914,8 @@ def doc_generate(output, boards):
(
"package",
"package-file",
"package/package_esp8266com_index.boards.json",
"IDE package index boards list (.json)",
"package/package_esp8266com_index.template.json",
"IDE package index template (.json)",
),
("doc", "doc-file", "doc/boards.rst", "Boards documentation (.rst)"),
)
Expand Down Expand Up @@ -3034,7 +3032,7 @@ def maybe_output(file):
flashmap_generate(maybe_output(args.flashmap_file), all_flash_maps())

if "package" in generators:
package_generate(maybe_output(args.package_file), boards)
package_generate(maybe_output(args.package_file), args.package_file, boards)

if "doc" in generators:
doc_generate(maybe_output(args.doc_file), boards)
Expand All @@ -3043,6 +3041,7 @@ def maybe_output(file):
################################################################
# entrypoint


def main():
args = parse_cmdline()

Expand Down