Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

code_size: board_snapshot ignores build.py's ESP example rule

Open
#4,162 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start in tools/code_size.py around board_snapshot and trace its callers, including the CI snapshot path and the manual snapshot command with -e, to confirm whether an espressif board can reach this case. Compare the selection with build.select_examples and its ESP component rule; if reachable, update the selection and add a test using an espressif board and a component-less example. Done means the selection excludes examples with no ESP-IDF component and the relevant test passes.

Written by the indexing model from the issue text.

Description

followup Prio 📌

Follow-up from #4161 (#4156).

tools/code_size.py board_snapshot (L1715-1716) picks its scopes with build_utils.skip_example alone:

scopes = [e for e in dict.fromkeys(examples)
          if not build_utils.skip_example(e, board, defines)] if examples else [None]

For an espressif board this skips build.get_examples('espressif')'s rule that only examples with an ESP-IDF component (src/CMakeLists.txt) build, so an example with no component (e.g. device/cdc_msc) could become a scope that has nothing to size. #4161 moved every other selection site onto build.select_examples, which applies that rule.

Not confirmed reachable: CI's change_impact prune pool already lists espressif examples through build.get_examples, so the CI snapshot may never pass such an example.

Remaining work:

  • Confirm whether any caller (CI snapshot, code_size.py snapshot by hand with -e) reaches it for an espressif board.
  • If so, select through build.select_examples(board, examples, defines) (dedupe kept as today) and add a test with an espressif board and a component-less example.

Deferred from #4161: #4156 names only build_board and esp_without_idf, and changing this alters snapshot output, which is outside its acceptance criteria.

Dominant language
C
Stars
7.2k
Forks
1.6k
Avg merge
1d 12h
Merged PRs (30d)
94

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hathach/tinyusb

All issues in hathach/tinyusb

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.