Skip to content

Use the board detector for displayless boards - #396

Merged
lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:displayless_detect
Oct 9, 2026
Merged

lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:displayless_detect

Conversation

@ainyan03

@ainyan03 ainyan03 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Requires m5stack/M5GFX#342, which moves the identification of boards without a display into the board detector.

What changes

  • The displayless fallback block in _check_boardtype() is removed.
  • The board is chosen in this order: the detector's result, an explicit cfg.fallback_board, the detector's candidate (getBoardCandidate()), the remaining ESP32-P4 checks, then a build or package default (_default_fallback_board()).
  • cfg.fallback_board now defaults to board_unknown on every target. Setting it still forces the board when the detector cannot confirm one.
  • Pin setup follows the chosen board however it was chosen (confirmed, candidate, fallback or default): GPIO46 is restored on the S3 boards that use it, DualKey releases G7 / G8 and has its own pin map, and Capsule sends the I2C STOP and releases its Grove port in its own setup.

Defaults when nothing is confirmed

Chip / package Default
ESP32 PICO-D4 StampPico
ESP32 PICO-V3 AtomPsram
ESP32 D0WDQ6 TimerCam
ESP32-S3, not LGA56 StampS3 (previously AtomS3Lite)
ESP32-S3 LGA56 StampS3Mini
ESP32-C3 StampC3U
ESP32-C6 NanoC6 / StampC6 by eFuse flash capacity
ESP32-H2 NanoH2
ESP32-C5 StampC5
ESP32-P4 Tab5 (not reached: the remaining P4 GPIO checks always pick a board. #397 moves those checks into the detector and makes this default StampP4 / StampP4X)

BOARD_ID 147 selects DualKey. BOARD_ID 31 / 35 select CoreP4X / Tab5X before the P4 GPIO checks. On ESP32, an Arduino board macro now takes precedence over the package default.

The S3 default changes because AtomS3Lite is now identified by its own pins, so a board that reaches the default is more likely a StampS3.

Tested

On 28 boards together with the M5GFX change (see that PR for the list). Builds: Arduino-ESP32 2.x / 3.x and ESP-IDF 5.x / 6.x for the CI targets.

Remove the displayless fallback block from _check_boardtype(); the board
detector now identifies those boards. M5Unified picks the board in this
order: the detector's result, an explicit cfg.fallback_board, the
detector's candidate, the remaining ESP32-P4 checks, then a build or
package default (_default_fallback_board()).

- Package defaults: StampPico (PICO-D4), AtomPsram (PICO-V3), TimerCam
  (D0WDQ6), StampS3 (S3 other than LGA56, previously AtomS3Lite),
  StampS3Mini (LGA56), StampC3U (C3), NanoC6 / StampC6 (C6), NanoH2 (H2),
  StampC5 (C5), Tab5 (P4). BOARD_ID 147 selects DualKey; BOARD_ID 31 / 35
  select CoreP4X / Tab5X before the P4 GPIO checks.
- cfg.fallback_board now defaults to board_unknown on every target.
- Pin setup follows the chosen board, however it was chosen: GPIO46 is
  restored on S3 boards that use it, DualKey releases G7 / G8 and gets its
  own pin map, and Capsule sends the I2C STOP and releases its Grove port
  in its own setup.
@lovyan03
lovyan03 merged commit 4e5295c into m5stack:develop Oct 9, 2026
30 checks passed
@ainyan03
ainyan03 deleted the displayless_detect branch October 9, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants