Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Allow use of a minimal Config.h #27338

Merged

Conversation

thinkyhead
Copy link
Member

By popular demand…

Users have long wanted a way to use a minimal configuration file containing only their enabled options without having to migrate their settings from the old configurations to the new formats. Some vendors maintain unified configuration files based on this basic idea.

We balked at this idea because we didn't want to wrap every option in the config files with #ifndef as this would only make the files harder to read. We did put together a config.ini method, but it is somewhat obscure and we don't distribute our examples in this format, so users and vendors have been slow to adopt. (It also requires PlatformIO.)

This PR provides…

  • A script to convert the configurations to base configurations containing only the defaults and removing all documentation.
  • New CONFIG_EXPORT 5 and CONFIG_EXPORT 105 options. On build this export option creates a Config-export.h file containing only the defined options, split up by file or by section. This file should be renamed to Config.h for use.
  • Handling for the Config.h file so it can act as the sole configuration file, overriding the base default config files. The Configuration.h and Configuration_adv.h files will be ignored, with a warning.

@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch 28 times, most recently from 32f2168 to 1b3d729 Compare August 10, 2024 22:29
@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch 6 times, most recently from 96c75ed to efcbb23 Compare August 11, 2024 01:06
@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch 4 times, most recently from b6f3896 to 2b868fd Compare August 11, 2024 21:41
@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch from 2b868fd to f0fe9b5 Compare August 12, 2024 01:37
@thisiskeithb
Copy link
Member

thisiskeithb commented Aug 14, 2024

Just a heads up: I'm running the monthly "build all examples" script and have run across an issue with recent bugfix-2.1.x commits / #27346 that were added for / related to this PR.

Conditionals_post.h:899:44: error: 'X_MAX_ENDSTOP_HIT_STATE' was not declared in this scope; did you mean 'X_MIN_ENDSTOP_HIT_STATE'?
  899 |           #define Z2_MIN_ENDSTOP_HIT_STATE X_MAX_ENDSTOP_HIT_STATE

...or...

Conditionals_post.h:907:44: error: 'Z_MAX_ENDSTOP_HIT_STATE' was not declared in this scope; did you mean 'Z2_MAX_ENDSTOP_HIT_STATE'?
  907 |           #define Z2_MIN_ENDSTOP_HIT_STATE Z_MAX_ENDSTOP_HIT_STATE

The affected configs so far:

  • examples/AnyCubic/Vyper/
  • examples/AnyCubic/i3 Mega/Trigorilla AVR/
  • examples/Two Trees/Sapphire Plus/Sapphire Plus V2/

I'll have a full report of unbuildable configs posted to the Configurations repo soon.

Looks like it's only those three:


There's also a report of error: 'MICROSTEP_MODES' was not declared in this scope on an SKR 2. Reverting back to a commit just prior to #27346 fixes it: https://discord.com/channels/461605380783472640/491165528295997450/1273295142069207091

image

@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch 2 times, most recently from 40c5279 to ecbff8f Compare August 15, 2024 20:37
thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Aug 15, 2024
@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch from ecbff8f to 5b5fbc4 Compare August 15, 2024 21:06
@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch from 5b5fbc4 to ae31871 Compare August 15, 2024 23:43
@thinkyhead thinkyhead force-pushed the bf2_minimal_config_PR branch from e301d6b to 9fa25f2 Compare August 16, 2024 00:47
@thinkyhead thinkyhead merged commit 9863446 into MarlinFirmware:bugfix-2.1.x Aug 16, 2024
63 checks passed
@thinkyhead thinkyhead deleted the bf2_minimal_config_PR branch August 16, 2024 04:08
@thisiskeithb
Copy link
Member

There's also a report of error: 'MICROSTEP_MODES' was not declared in this scope on an SKR 2. Reverting back to a commit just prior to #27346 fixes it

This is still broken: #27410

rngkll pushed a commit to rngkll/Configurations that referenced this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants