Skip to content

support user-configuration files#10817

Open
bablokb wants to merge 2 commits intoadafruit:mainfrom
bablokb:userconfig
Open

support user-configuration files#10817
bablokb wants to merge 2 commits intoadafruit:mainfrom
bablokb:userconfig

Conversation

@bablokb
Copy link

@bablokb bablokb commented Feb 14, 2026

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.

Copy link
Collaborator

@dhalbert dhalbert left a comment

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.

@bablokb
Copy link
Author

bablokb commented Feb 16, 2026

I changed the filenames as you suggested.

Copy link
Collaborator

@dhalbert dhalbert left a comment

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
Collaborator

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

@bablokb
Copy link
Author

bablokb commented Feb 16, 2026

I hope you think the new names clarify things.

Yes they do, thanks for the suggestions.

Copy link
Member

@tannewt tannewt left a comment

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
Copy link
Author

bablokb commented Feb 17, 2026

What about adding a section in BUILDING.md?

@tannewt
Copy link
Member

tannewt commented Feb 17, 2026

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>
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

Comments