Skip to content

support user-configuration files#10817

Merged
dhalbert merged 3 commits into
adafruit:mainfrom
bablokb:userconfig
Feb 19, 2026
Merged

support user-configuration files#10817
dhalbert merged 3 commits into
adafruit:mainfrom
bablokb:userconfig

Conversation

@bablokb

@bablokb bablokb commented Feb 14, 2026

Copy link
Copy Markdown

This patch adds support for user-specific makefile-includes.

Currently, there are mainly

  • mpconfigboard.mk (board-specific)
  • mpconfigport.mk (port-specific)
  • circuitpy_mpconfig.mk (globals)

User-overrides are possible from the make commandline (except for a number of hardcoded settings), but this gets tedious. This patch allows power-users to put the changes in user-specific files with the added benefit that you can use makefile-logic to limit the changes to specific ports or boards.

User configuration can be maintained out-of-tree, e.g.

make -I ~/proj1 BOARD=xxx
make -I ~/proj2 BOARD=yyy

will build with two different sets of user-configurations.

User configurations are optional, they are included via -include, so a missing include file does not even generate a warning.

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - this seems convenient. I often end up editing an mpconfigboard.mk temporarily, but this is less intrusive.

Comment thread py/circuitpy_mkenv.mk Outdated
Comment thread py/circuitpy_mkenv.mk Outdated
Comment thread py/circuitpy_mkenv.mk Outdated
@bablokb

bablokb commented Feb 16, 2026

Copy link
Copy Markdown
Author

I changed the filenames as you suggested.

dhalbert
dhalbert previously approved these changes Feb 16, 2026

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I hope you think the new names clarify things.

@dhalbert dhalbert requested a review from tannewt February 16, 2026 14:38
@dhalbert

Copy link
Copy Markdown
Collaborator

@tannewt Do you have any suggestions? If not I'll merge.

@bablokb

bablokb commented Feb 16, 2026

Copy link
Copy Markdown
Author

I hope you think the new names clarify things.

Yes they do, thanks for the suggestions.

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. The one suggestion I have is to document this somewhere so others can use it. Maybe somewhere in docs/?

@bablokb

bablokb commented Feb 17, 2026

Copy link
Copy Markdown
Author

What about adding a section in BUILDING.md?

@tannewt

tannewt commented Feb 17, 2026

Copy link
Copy Markdown
Member

What about adding a section in BUILDING.md?

Works for me! Thanks!

mimi89999 pushed a commit to mimi89999/circuitpython that referenced this pull request Feb 17, 2026
This reduces inconsitencies between esp32 and other ports.

According to the discussion in adafruit#10817.

Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the nice writeup!

There was a GitHub CI failure. I re-ran the failed jobs and it succeeded.

@dhalbert dhalbert merged commit 546b41e into adafruit:main Feb 19, 2026
1287 of 1292 checks passed

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too! Thanks!

@bablokb bablokb deleted the userconfig branch June 6, 2026 06:57
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.

3 participants