Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def esp32_chip(base):

def esp32_fragment(chip, module_dirs, board, variant, flash, table):
"""Our sdkconfig, appended last. Each source is used only if it exists."""
parts = ["# Generated by build_mp.py. kconfgen takes the last assignment, so this", "# file is appended after the board's own (cmods#29).", ""]
parts = ["# Generated by build_mp.py. kconfgen takes the last assignment, so this", "# file is appended after the board's own.", ""]
if flash:
parts += [f"# --flash {flash}", f'CONFIG_ESPTOOLPY_FLASHSIZE="{flash}"', f"CONFIG_ESPTOOLPY_FLASHSIZE_{flash}=y", ""]
if table:
Expand Down Expand Up @@ -492,7 +492,7 @@ def esp32_board_dir(gen, base, board, variant, fragment_path, module_dirs, compo
header.append(f'#include "{(base / "mpconfigboard.h").as_posix()}"')
if len(header) > 1:
(gen / "mpconfigboard.h").write_text("\n".join(header) + "\n")
vlines = ["# Generated by build_mp.py. Our fragment comes LAST: kconfgen takes the", "# last assignment in SDKCONFIG_DEFAULTS (cmods#29)."]
vlines = ["# Generated by build_mp.py. Our fragment comes LAST: kconfgen takes the", "# last assignment in SDKCONFIG_DEFAULTS."]
base_variant = base / vfile
if variant and not base_variant.exists():
# One of ours: its mpconfigvariant.cmake includes the upstream variant it builds on.
Expand Down Expand Up @@ -1168,7 +1168,7 @@ def shell(cmd, log=None):
shims = [tinyusb_override(build / "tinyusb_override", tinyusb)] if tinyusb else []
esp32_board_dir(gen, base, board, variant, frag, module_dirs, shims)
make_esp = [c for c in make if not c.startswith("BOARD=")] + [f"BOARD={board}", f"BOARD_DIR={gen}"]
# A saved sdkconfig beats SDKCONFIG_DEFAULTS; ours is generated (cmods#29).
# A saved sdkconfig beats SDKCONFIG_DEFAULTS; ours is generated.
(build / "sdkconfig").unlink(missing_ok=True)
if attempt == 1:
say(f"esp32 {board}{' ' + variant if variant else ''} ({chip}); our sdkconfig: {frag}")
Expand Down
6 changes: 3 additions & 3 deletions docs/build-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ On esp32 it also writes a thin board dir into the build dir, the way cmods'
links the rest of the board's files through, and appends our sdkconfig
**last**: the flash size and partition table, then the fragments below.
Last matters, because kconfgen takes the last assignment, and a fragment
listed earlier is silently overridden (cmods#29).
listed earlier is silently overridden.

The fragments are found by convention, and each is applied only if it
exists. Every place that can carry them uses the same two names: `sdkconfig`
Expand Down Expand Up @@ -132,7 +132,7 @@ error, grows the app partition to the image plus headroom (1/32 of the flash,
that table, which lives only in the build dir. It then prints the new layout
and warns that the filesystem moved. This port puts the filesystem after the
last partition, so a board flashed with the new layout comes up with an empty
filesystem (cmods#30). Dev boards hold nothing we keep, so this is on by
filesystem. Dev boards hold nothing we keep, so this is on by
default; `--no-autosize` refuses instead and prints the table that would fit.

rp2 gets the same treatment. When the link overflows the `FLASH` region, the
Expand Down Expand Up @@ -342,7 +342,7 @@ flash. Hence `--flash`.
build dir as your configuration, so one failed run can pin the wrong
partition table for every run after it. The build deletes it first, and
afterwards checks that the configured table is the one we chose, failing
loudly if it isn't (cmods#29).
loudly if it isn't.

**`make clean` on esp32 is `idf.py fullclean`**, which deletes the whole
port's `managed_components/`. Never run it against a build dir that doesn't
Expand Down
Loading