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

Custom build_flags by feature #20692

Merged

Conversation

thinkyhead
Copy link
Member

Add the capability to customize build flags for an environment based on enabled features. In support of PR #20492 Postmortem Debugging.

Usage

Add a custom_marlin.FEATURE entry to any environment in platformio.ini and include build_flags= in the line. On build the specified flags will be added onto the existing build flags.

@thinkyhead thinkyhead merged commit 3dd1fe4 into MarlinFirmware:bugfix-2.0.x Jan 6, 2021
@thinkyhead thinkyhead deleted the bf2_custom_build_flags_PR branch January 6, 2021 03:03
@@ -132,8 +132,7 @@ def force_ignore_unused_libs():
known_libs = get_all_known_libs()
diff = (list(set(known_libs) - set(env_libs)))
lib_ignore = env.GetProjectOption('lib_ignore') + diff
if verbose:
print("Ignore libraries:", lib_ignore)
blab(f'Ignore libraries: {lib_ignore}')
Copy link
Contributor

Choose a reason for hiding this comment

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

Please note this syntax breaks python 2.7 support. Maybe a python version check should be done before ? to avoid weird errors later...

Copy link
Contributor

@tpruvot tpruvot Jan 6, 2021

Choose a reason for hiding this comment

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

the problem is not i dont use python3 but ubuntu 18.04 and fedora 29 (at least) symlink "python" to python2 by default

tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
susisstrolch pushed a commit to susisstrolch/Marlin that referenced this pull request Jan 8, 2021
… into bugfix-2.0.x

* 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (105 commits)
  [cron] Bump distribution date (2021-01-08)
  Fix M48 output (MarlinFirmware#20713)
  Improved MKS Robin support (MarlinFirmware#19333)
  Preheat before Power Loss Recovery homing (MarlinFirmware#20697)
  [cron] Bump distribution date (2021-01-07)
  Custom build_flags by feature (MarlinFirmware#20692)
  [cron] Bump distribution date (2021-01-06)
  Multi-Z stepper inverting (MarlinFirmware#20678)
  Fix Azteeg X3 macro typo (MarlinFirmware#20681)
  Define SANGUINOLOLU 1.1 enable pins (MarlinFirmware#20682)
  No BTN_ENC_EN on Anet 10 (MarlinFirmware#20684)
  Temperature report followup (MarlinFirmware#20687)
  Adjustable precision in M105 temperature report (MarlinFirmware#20602)
  Don't apply hotend_offset.z to Z soft endstops (MarlinFirmware#20675)
  Indent tool_change_prime
  Clarify solenoid active / magnet-on state
  Defer "quiet probing" till the last Z bump (MarlinFirmware#20610)
  Solenoid cleanups
  [cron] Bump distribution date (2021-01-05)
  Remove untranslated strings
  ...
tpruvot added a commit to tpruvot/Marlin that referenced this pull request Jan 8, 2021
blab(f'str') requires Python 3.6... adapt for both...
thinkyhead added a commit that referenced this pull request Jan 9, 2021
dpreed pushed a commit to dpreed/Marlin_2.0.x that referenced this pull request Feb 5, 2021
dpreed pushed a commit to dpreed/Marlin_2.0.x that referenced this pull request Feb 5, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
thinkyhead added a commit that referenced this pull request Apr 30, 2021
thinkyhead added a commit that referenced this pull request Apr 30, 2021
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