From cfbd9ba0e7cb268a92ce0d212ec0477555729fa3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 19 Apr 2021 11:20:17 +0200 Subject: [PATCH] eclipse: recommend changing the default project make target (#12447) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is required for example for quickly iterating with a debugger, where Eclipse will build the project automatically. It’s also shorter than the previous steps, which I think might not have been updated since https://qmk.fm/changes/2017-09-08-making-from-root-and-no-more-makefiles --- docs/other_eclipse.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/other_eclipse.md b/docs/other_eclipse.md index cb3ceb540b..91557d07d7 100644 --- a/docs/other_eclipse.md +++ b/docs/other_eclipse.md @@ -50,7 +50,7 @@ This is the most important plugin as it will allow Eclipse to _understand_ AVR C ### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console) This plugin is necessary to properly display the colored build output generated by the QMK makefile. -1. Open Help > Eclipse Marketplace… +1. Open Help > Eclipse Marketplace… 2. Search for _ANSI Escape in Console_ 3. Click the Install button of the plugin 4. Follow the instructions and agree again with the security warning for unsigned content. @@ -59,7 +59,7 @@ Once both plugins are installed, restart Eclipse as prompted. # Configure Eclipse for QMK ## Importing the Project -1. Click File > New > Makefile Project with Existing Code +1. Click File > New > Makefile Project with Existing Code 2. On the next screen: * Select the directory where you cloned the repository as _Existing Code Location_; * (Optional) Give a different name to the project¹, e.g. _QMK_ or _Quantum_; @@ -73,16 +73,18 @@ Once both plugins are installed, restart Eclipse as prompted. ¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`). ## Build Your Keyboard -We will now configure a make target that cleans the project and builds the keymap of your choice. -1. On the right side of the screen, select the Make Target tab -2. Expand the folder structure to the keyboard of your choice, e.g. `qmk_firmware/keyboards/ergodox` -3. Right-click on the keyboard folder and select New… (or select the folder and click the New Make Target icon above the tree) -4. Choose a name for your build target, e.g. _clean \_ -5. Make Target: this is the arguments that you give to `make` when building from the command line. If your target name does not match these arguments, uncheck Same as target name and input the correct arguments, e.g. `clean ` -6. Leave the other options checked and click OK. Your make target will now appear under the selected keyboard. -7. (Optional) Toggle the Hide Empty Folders icon button above the targets tree to only show your build target. -8. Double-click the build target you created to trigger a build. -9. Select the Console view at the bottom to view the running build. +We will now change the default make target of the the project from `all` to the +specific keyboard and keymap combination we are working on, +e.g. `kinesis/kint36:stapelberg`. This way, project-wide actions like cleaning +and building the project will complete quickly, instead of taking a long time or +outright locking up Eclipse. + +1. Focus an editor tab within the project +2. Open the `Project` > `Properties` window, then select the `C/C++ Build` list + entry and switch to the `Behavior` tab. +3. Change the default `Make build target` text fields for all enabled builds + from `all` to e.g. `kinesis/kint41:stapelberg`. +4. Verify your setup works by selecting `Project` > `Clean...`. [1]: https://en.wikipedia.org/wiki/Eclipse_(software)