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
17 changes: 7 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ can upgrade in-app over USB/serial (`feature/firmware` there).
Meshtastic's separate `Adafruit_nRF52_Bootloader` fork is a **different
lineage without** the OTAFIX patches — don't confuse the two.

This is C, built with a bare Makefile (the supported path) or `CMakeLists.txt`
(**not** fully wired — see the CMake gotcha below). Not PlatformIO.
This is C, built with a bare Makefile. Not PlatformIO.

## Build

Expand Down Expand Up @@ -69,16 +68,14 @@ Each board directory can carry:
`src/screen.c`.
- `board.mk` — Makefile board config (`MCU_SUB_VARIANT`, per-board
`CFLAGS` like the BLE `DEVICE_NAME`).
- `board.cmake` — **only exists for 5 of 19 boards** (`heltec_t096`,
`heltec_t1`, `heltec_t114`, `mesh_tracker_x1`, `thinknode_m1`). `cmake -DBOARD=<anything
else>` fails outright. Nobody
uses the CMake path in practice (CI and `tools/build_all.py` both use
`make`); don't assume feature parity between the two build systems.
- `pinconfig.c` — present on some boards, board-specific pin table.

`Makefile` and `CMakeLists.txt` both dynamically discover the board's files
under `src/boards/$(BOARD)/` — there is no separate hardcoded board list to
keep in sync in either build system (unlike the CI matrix, see below).
The `Makefile` takes the board from `BOARD`: it includes
`src/boards/$(BOARD)/board.mk`, puts `src/boards/$(BOARD)` on the include path
for `board.h`, and compiles `pinconfig.c` on every MCU but the nRF52832. Other sources are
listed explicitly, so a new file in a board directory is not compiled until the
`Makefile` names it. There is no separate board list to keep in sync here;
the one hand-kept list is branch protection's required checks (see CI below).

### Core bootloader (`src/`)

Expand Down
336 changes: 0 additions & 336 deletions CMakeLists.txt

This file was deleted.

9 changes: 2 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ recover — so a few things here are stricter than a typical repo.
## Before you start

- **Read [`AGENTS.md`](./AGENTS.md) first.** It covers the board abstraction,
the build system split (`make` vs. the incomplete `CMakeLists.txt`), the
vendored submodules, and a list of known gotchas. This file covers
process; that one covers the code.
the build, the vendored submodules, and a list of known gotchas. This file
covers process; that one covers the code.
- **New board support needs real hardware.** `UF2_BOARD_ID`, VID/PID, and
pin definitions cannot be guessed from a datasheet alone — see
[Adding a new board](#adding-a-new-board) below.
Expand Down Expand Up @@ -40,10 +39,6 @@ Board names are the directory names under `src/boards/`. `tools/build_all.py`
builds every board and prints a pass/fail + size table — run it before
opening a PR; it's the same check CI's board matrix does per-PR, just local.

**Use `make`, not `cmake`.** `CMakeLists.txt` only has a `board.cmake` for 5
of the 19 boards; `cmake -DBOARD=<anything else>` fails outright. Nobody
uses the CMake path in practice.

There is no lint or test suite — for a bootloader, "does it compile for
every board" (CI's job) and real hardware testing are the correctness
signals that exist.
Expand Down
Loading
Loading