{"id":16218912,"url":"https://github.com/arminjo/sloebertutorial","last_synced_at":"2026-01-04T00:30:34.473Z","repository":{"id":93079220,"uuid":"602711283","full_name":"ArminJo/SloeberTutorial","owner":"ArminJo","description":"Tutorial for the Sloeber Eclipse plugin","archived":false,"fork":false,"pushed_at":"2023-03-20T22:32:17.000Z","size":9188,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-11T11:51:31.678Z","etag":null,"topics":["arduino","arduino-ide","eclipse","eclipse-plugin","sloeber","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArminJo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-16T19:34:22.000Z","updated_at":"2024-08-27T14:19:42.000Z","dependencies_parsed_at":"2024-10-10T11:51:28.735Z","dependency_job_id":"4fff22ff-76d5-4bd8-8e93-856898ba74d4","html_url":"https://github.com/ArminJo/SloeberTutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminJo%2FSloeberTutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminJo%2FSloeberTutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminJo%2FSloeberTutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminJo%2FSloeberTutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArminJo","download_url":"https://codeload.github.com/ArminJo/SloeberTutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222906360,"owners_count":17055837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-ide","eclipse","eclipse-plugin","sloeber","tutorial"],"created_at":"2024-10-10T11:51:26.197Z","updated_at":"2026-01-04T00:30:34.424Z","avatar_url":"https://github.com/ArminJo.png","language":"Batchfile","readme":"# Sloeber Tutorial\n\nThis introduction is copied from: http://eclipse.baeyens.it/learn.shtml\n\nThe arduino IDE put the focus on \"a low entry level\". Honestly with decades of experience in software development I can tell you -hand on heart- that the Arduino IDE is very good designed ... for it's purpose.\n\nBut when you start growing and \"the low entry level\" is no longer your first concern. You start to want a \"rich tool\", not a \"this way it will work always work tool\". So a tool that allows you to control more things, and as such does not stop you from breaking things.\n\nAs it is nearly impossible to combine a \"rich tool\" with a \"low entry level tool\" many \"requests for improvements\" are rejected by the arduino core team as it may infringe the \"low entry level\" target.\n\nSo when you have a need that goes above \"low entry level\" you are out of the focus of the arduino IDE development team and you need to start banging another door/tool.\n\nAt that point in time, one of the doors/options is the arduino eclipse plugin. One of the strong points of the Arduino eclipse plugin compared to the other available tools is that it is multi platform. It has active users using Windows, Mac and linux.\n\nThe arduino eclipse plugin is easy to set-up (though harder than the Arduino IDE) and easy to use. It has the same icons for verifying upload and serial monitor as the arduino IDE. And to name the biggest plus: It supports you to serve your multiple projects with different configurations (of each project). And it supports you from writing your code up to hopping into code of included libraries – seamless.\n\nMost people have uploaded their first sketch in Slouber in less than 30 minutes - there are some people who never succeeded in running the tool – with this introduction we firmly believe that you belong to the first group. Good luck and have fun with this impressive extension!\n\n# Table of contents\n\n- [Table of contents](#table-of-contents)\n- [Installation](#installation)\n  - [Setting Paths](#setting-paths)\n  - [First start of Sloeber](#first-start-of-sloeber)\n  - [Eclipse IDE with Sloeber extensions](#eclipse-ide-with-sloeber-extensions)\n- [First Project Blink on Arduino UNO](#first-project-blink-on-arduino-uno)\n  - [Create a new project: Blink-test for Arduino UNO](#create-a-new-project-blink-test-for-arduino-uno)\n    - [Suppress sloeber.ini.cpp](#suppress-sloeberinicpp)\n    - [Add line numbers to the editor](#add-line-numbers-to-the-editor)\n    - [Change Compile options and Compile summary format](#change-compile-options-and-compile-summary-format)\n    - [Upload to Arduino UNO](#upload-to-arduino-uno)\n    - [Enable automatic build before upload](#enable-automatic-build-before-upload)\n    - [Changing the Com Port for uploading](#changing-the-com-port-for-uploading)\n    - [Where are the compiled results?](#where-are-the-compiled-results)\n- [Discovering the Arduino cores](#discovering-the-arduino-cores)\n- [Manage Debug and Release version in one project (Multiple configurations)](#manage-debug-and-release-version-in-one-project-multiple-configurations)\n  - [Extend Menu with Active Build Configuration and Build Active Configuration buttons.](#extend-menu-with-active-build-configuration-and-build-active-configuration-buttons)\n  - [Set indexer settings for multiple configurations](#set-indexer-settings-for-multiple-configurations)\n  - [Rename an existing configuration](#rename-an-existing-configuration)\n  - [Add Debug configuration for the project](#add-debug-configuration-for-the-project)\n    - [Set up the Debug configuration](#set-up-the-debug-configuration)\n- [Two different sources in the same project](#two-different-sources-in-the-same-project)\n  - [Add a new configuration for the new source](#add-a-new-configuration-for-the-new-source)\n  - [Assign the sources to the respective configurations](#assign-the-sources-to-the-respective-configurations)\n  - [Choose which configuration to build](#choose-which-configuration-to-build)\n- [Change platform to ESP32](#change-platform-to-esp32)\n  - [Install ESP platform](#install-esp-platform)\n    - [Extend Third party index url's](#extend-third-party-index-urls)\n    - [Choose the ESP core version](#choose-the-esp-core-version)\n    - [Select the ESP32 board for my project](#select-the-esp32-board-for-my-project)\n- [Useful Settings](#useful-settings)\n  - [Auto Format 132 character per line](#auto-format-132-character-per-line)\n  - [Enable file history](#enable-file-history)\n    - [Access the history of a file](#access-the-history-of-a-file)\n  - [Launch explorer for the current file](#launch-explorer-for-the-current-file)\n  - [Create a launch configuration for external tool](#create-a-launch-configuration-for-external-tool)\n- [Advanced features](#advanced-features)\n  - [Advanced Editing shortcuts](#advanced-editing-shortcuts)\n  - [Explore the history of your code](#explore-the-history-of-your-code)\n  - [Generating Assembler output of your program](#generating-assembler-output-of-your-program)\n  - [Synchronize editor window with left tree view](#synchronize-editor-window-with-left-tree-view)\n  - [Add user libraries](#add-user-libraries)\n  - [Create a function from multiple lines of code](#create-a-function-from-multiple-lines-of-code)\n  - [Convert an ino file to a cpp file](#convert-an-ino-file-to-a-cpp-file)\n- [Working sets](#working-sets)\n- [Tips and Tricks](#tips-and-tricks)\n  - [Detach an editor perspective (e.g. Console) window](#detach-an-editor-perspective-eg-console-window)\n  - [Full screen Editing](#full-screen-editing)\n- [Errors and Problems](#errors-and-problems)\n  - [A Window (e.g. Console) was accidentally deleted, the window arrangement is broken](#a-window-eg-console-was-accidentally-deleted-the-window-arrangement-is-broken)\n  - [Errors in unknown libraries](#errors-in-unknown-libraries)\n  - [Strange errors indicated, F3 does not work, index not complete](#strange-errors-indicated-f3-does-not-work-index-not-complete)\n  - [No build.opt](#no-build-opt)\n  - [Keyboard layout changed to English/US](#keyboard-layout-changed-to-englishus)\n  - [Error message: invalid argument to --format: avr](#error-message-invalid-argument-to---format-avr)\n- [Software updates](#software-updates)\n\n\n# Installation\n\n## Setting Paths\n\nIn windows environment, choose an install path with a short name e.g. **C:\\Sloeber**. Otherwise, while installation, some path names will be longer than accepted under Windows.\n\nCreate empty directory as workspace C:\\sloeber-workspace\n\nStart **sloeber-ide.exe**, select the new workspace and check \"Use this…\"\n\n![](./media/image1.png)\n\n## First start of Sloeber\n\nSince you do not have secure data, you may allow for public sites.\n\n![](./media/image2.png)\n\nClose the welcome tab.\n\n![](./media/image3.png)\n\nWait while sloeber is loading the current core and libraries\n\n![](./media/image4.png)\n\n## Eclipse IDE with Sloeber extensions\n\nThis is the Eclipse window with the Sloeber extensions as well as *two extra buttons you will add in a few seconds!*  \n\u003cimg src=\"./media/image5.png\" style=\"width:5.20277in;height:2.11656in\" /\u003e\n\n# First Project Blink on Arduino UNO\n\n## Create a new project: Blink-test for Arduino UNO\n\n![](./media/image6.png)\n\n![](./media/image7.png)\n\nHere we choose a sample sketch as start for our project.\n\n![](./media/image8.png)\n\nThis is the Sloeber/Eclipse window for the Source file **Blink.uno**.\n\nOn the right, you see the **Outline window**, with all variables and functions listed for quick access.\n\nIn the middle, there are the **edit windows.**\n\nLeft is the **Project Explorer** with the tree view of your projects and files.\n\nOn the Bottom, there are some **Views** like the **Console** and **Serial monitor view**.\n\n![](./media/image9.png)\n\n### Suppress sloeber.ini.cpp\n\nWe think that the presence of the file “sloeber.ini.cpp” is a crutch. How to get rid of it? Just rename “Blink.ino” into “Blink.cpp” and the sloeber.ini.cpp file will vanish.\n\n**Note: If you do so, you must add the line \\#include \\\u003cArduino.h\\\u003e in your source.**\n\n### Add line numbers to the editor\n\nOpen **Window \\\u003e Preferences  \n**![](./media/image10.png)\n\nSearch for line and check **Insert spaces for tabs** and **Show line numbers**  \n![](./media/image11.png)\n\n### Change Compile options and Compile summary format\n\nOpen Project properties with **Alt + Enter**  \n![](./media/image12.png)\n\nCheck **use alternative size command? (AVR only)  \nDo not check it for any non AVR platform!  \n**\u003cimg src=\"./media/image13.png\" style=\"width:6.3in;height:4.21319in\" /\u003e\n\n### Upload to Arduino UNO\n\n\u003cimg src=\"./media/image14.png\" style=\"width:1.875in;height:0.80208in\" alt=\"C:\\Users\\Armin\\AppData\\Local\\Microsoft\\Windows\\INetCache\\Content.Word\\2021-01-19 23_09_36-sloeber-workspace - Blink_test_Blink.cpp - Sloeber.png\" /\u003e\n\n### Enable automatic build before upload\n\nTo be sure, that your upload includes all your recent changes, you should enable **Save automatically before manual build option** in **Window \\\u003e Preferences \\\u003e General \\\u003e Workspace \\\u003e Build.**\n\n\u003cimg src=\"./media/image15.png\" style=\"width:6.3in;height:5.13194in\" /\u003e\n\n### Changing the Com Port for uploading\n\nYou must set the Com Port in the **Arduino properties** of your project to the port number of your Arduino board, which is displayed in the **Windows Device Manager**. **You most likely have to attach the Board**, before selecting the port, because only Com-Ports currently attached can be selected.\n\n\u003cimg src=\"./media/image16.png\" style=\"width:2.66667in;height:0.95833in\" alt=\"C:\\Users\\Armin\\AppData\\Local\\Microsoft\\Windows\\INetCache\\Content.Word\\2021-02-12 13_51_21-Window.png\" /\u003e\n\n\u003cimg src=\"./media/image17.png\" style=\"width:6.3in;height:4.21319in\" /\u003e\n\n### Where are the compiled results?\n\n![](./media/image18.png)\n\nThe **Blink_test.hex** file is the file used by uploading with avrdude.exe\n\n![](./media/image19.png)\n\nYou can remove the Release folder and other build folders anytime. Sloeber will restore them at the next build.\n\n# Discovering the Arduino cores\n\nIf you place the cursor over an Arduino (or library) function, it shows you the sourcecode.  \n\u003cimg src=\"./media/image20.png\" style=\"width:4.03538in;height:2.29769in\" /\u003e\n\nIf you press **F3**, the function definition will open in a new editor window. If you activate the **Link with Editor** button, the **Project Explorer** window shows you all core files.  \nYou can even modify the core sources, but be careful!\n\n\u003cimg src=\"./media/image21.png\" style=\"width:0.93151in;height:0.43881in\" /\u003e\n\n\u003cimg src=\"./media/image22.png\" style=\"width:5.98358in;height:5.8609in\" /\u003e\n\n# Manage Debug and Release version in one project (Multiple configurations)\n\nEach project has individual settings, like Board/CPU (type/clock), libraries, clock speed, Com Port, or Sources used for compile.  \nTo have 2 different settings, you can of course create 2 projects, but then you have to take care to keep the sources synchronized .  \nWith configurations, you can have different sets of settings for one source. Each configuration is available at one mouse click.\n\n## Extend Menu with Active Build Configuration and Build Active Configuration buttons.\n\nFirst, we extend the menu to have **two useful buttons** available for configuration management.\n\n\u003cimg src=\"./media/image23.png\" style=\"width:4.0625in;height:2.83333in\" alt=\"2021-02-12 14_28_14-Window\" /\u003e\n\n\u003cimg src=\"./media/image24.png\" style=\"width:3.64583in;height:5.20702in\" alt=\"2021-02-12 14_29_35-Window\" /\u003e\n\nCheck **Build Configuration** on the **Action Set Availability** tab to enable the **Active Build Configuration** and **Build Active Configuration** buttons.  \n\u003cimg src=\"./media/image25.png\" style=\"width:6.30208in;height:3.57292in\" alt=\"2021-02-12 14_31_40-Customize Perspective - Arduino\" /\u003e\n\nSave the changes to the current perspective in order to have it persistent even after a reset perspective. We simply overwrite the existent Arduino perspective.  \n\u003cimg src=\"./media/image26.png\" style=\"width:3.29167in;height:4.72917in\" alt=\"2021-02-12 14_40_46-Save Perspective As\" /\u003e\n\n## Set indexer settings for multiple configurations\n\nThe index for **active build configuration** should be enabled. This allows for more advanced usage of configuration, like binding different libraries etc.\n\nOpen this with **Window \u003e Preferences**.\n\u003cimg src=\"./media/image27.png\" style=\"width:6.30208in;height:7.30208in\" alt=\"2021-01-23 09_47_09-Preferences\" /\u003e\n\n## Rename an existing configuration\n\n\u003cimg src=\"./media/Manage_Configuration.png\" /\u003e\n\n\u003cimg src=\"./media/image28.png\" style=\"width:3.53125in;height:1.94792in\" alt=\"C:\\Users\\Armin\\AppData\\Local\\Microsoft\\Windows\\INetCache\\Content.Word\\2021-01-23 10_00_04-Blink_test_ Manage Configurations.png\" /\u003e\n\n\u003cimg src=\"./media/image29.png\" style=\"width:3.41714in;height:2.42742in\" /\u003e\n\n## Add Debug configuration for the project\nYou can open the `Manage Configuration` window also by **Project \u003e Build Configuration \u003e Manage**.\n\n\u003cimg src=\"./media/image30.png\" style=\"width:5.52083in;height:1.25in\" alt=\"2021-01-23 09_58_46-\" /\u003e\n\n\u003cimg src=\"./media/image31.png\" style=\"width:3.53174in;height:2.54202in\" /\u003e\n\n\u003cimg src=\"./media/image32.png\" style=\"width:5.61537in;height:3.93805in\" /\u003e\n\n\u003cimg src=\"./media/image33.png\" style=\"width:5.5216in;height:1.94819in\" /\u003e\n\nWe can now change easily to the Debug configuration  \n\u003cimg src=\"./media/image34.png\" style=\"width:5.42784in;height:1.92735in\" /\u003e\n\n### Set up the Debug configuration\n\nNow we change the Debug configuration to have the **DEBUG** macro defined. This is equivalent to including the line **\\#define DEBUG** in your code. To have it specified in our configuration allows fast switching between using or not using the define without changing the code.\n\n\u003cimg src=\"./media/image35.png\" style=\"width:6.3in;height:4.21319in\" /\u003e\n\n![](./media/image36.png)\n\nSwitching back to the Release configuration shows that the **DEBUG** guarded statements are inactive now.\n\n\u003cimg src=\"./media/image37.png\" style=\"width:6.29167in;height:3.86458in\" alt=\"C:\\Users\\Armin\\AppData\\Local\\Microsoft\\Windows\\INetCache\\Content.Word\\2021-02-12 14_54_42-Window.png\" /\u003e\n\n##### The code for the example:\n\n*void setup() {*\n\n*// initialize digital pin LED_BUILTIN as an output.*\n\n*pinMode(LED_BUILTIN, OUTPUT);*\n\n*// Just to know which program is running on my Arduino*\n\n*\\#ifdef DEBUG*\n\n*Serial.println(F(\"START \" \\_\\_FILE\\_\\_ \" from \" \\_\\_DATE\\_\\_));*\n\n*\\#endif*\n\n*}*\n\n*// the loop function runs over and over again forever*\n\n*void loop() {*\n\n*\\#ifdef DEBUG*\n\n*Serial.println(\"Activate LED\");*\n\n*\\#endif*\n\n*digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)*\n\n*delay(1000); // wait for a second*\n\n*\\#ifdef DEBUG*\n\n*Serial.println(\"Deactivate LED\");*\n\n*\\#endif*\n\n*digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW*\n\n*delay(1000); // wait for a second*\n\n*}*\n\n# Two different sources in the same project\n\nNext, we add an additional source file with an extended version of our blink example.\n\nWithout a new configuration, we get the multiple definition of \\`setup' Error on compile.  \n![](./media/image38.png)\n\n### Add a new configuration for the new source\n\n![](./media/image39.png)\n\nAnd yet another for the *Debug* **variant for the new source.**  \nHere we just copy the settings from the existent Debug configuration, so the **–DDEBUG** is already set on creation  \n.![](./media/image40.png)\n\n### Assign the sources to the respective configurations\n\nIn Eclipse, all project sources (and libraries) are assigned to all configurations by default.  \nFor each source, you must therefore specify all the configurations where this source should be excluded. Here we exclude the old file **Blink.cpp** from the new configurations.\n\n![](./media/image41.png)\n\n\u003cimg src=\"./media/image42.png\" style=\"width:4.57356in;height:5.12572in\" /\u003e\n\nThe \"same\" must be done for the new source file.\n\n### Choose which configuration to build.\nThis can be done in two ways.\n\n![](./media/Choose_Configuration1.png)\n![](./media/Choose_Configuration2.png)\n\n# Change platform to ESP32\n\n## Install ESP platform\n\nOpen **Arduino \\\u003e Preferences  \n.**\u003cimg src=\"./media/image44.png\" style=\"width:2.23958in;height:2.63851in\" alt=\"2021-01-19 20_22_01-sloeber-workspace - Sloeber\" /\u003e\n\n### Extend Third party index url's\n\nAdd https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json\u003cimg src=\"./media/image45.png\" style=\"width:6.3in;height:3.18264in\" /\u003e\n\n### Choose the ESP core version\n\nOpen **Arduino \\\u003e Preferences** again and choose the desired version in Platform and Boards. You can choose multiple versions, which can be used for different configurations or projects. \u003cimg src=\"./media/image46.png\" style=\"width:6.3in;height:3.92569in\" /\u003e\n\n![](./media/image47.png)\n\nHere you find the unofficial list of all known core / board URL's\n\n\u003chttps://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls\u003e\n\nA few more common URL's:\n\n- http://arduino.esp8266.com/stable/package_esp8266com_index.json\n\n- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json\n\n- https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json\n\n- http://dan.drown.org/stm32duino/package_STM32duino_index.json\n\n- https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json\n\n- https://files.pololu.com/arduino/package_pololu_index.json\n\n- http://drazzy.com/package_drazzy.com_index.json\n\n- https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json\n\n- http://raw.githubusercontent.com/MHEtLive/arduino-boards-index/master/package_mhetlive_index.json\n\n- https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json\n\n- https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json\n\n- https://raw.githubusercontent.com/xukangmin/TinyCore/master/avr/package/package_tinycore_index.json\n\n- https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json\n\n### Select the ESP32 board for my project\n\n\u003cimg src=\"./media/image48.png\" style=\"width:6.3in;height:4.21319in\" /\u003e\n\nOne **drawback of Sloeber** is, that the default settings are not filled in. But they can easily be determined, if you select the same board in the **Arduino IDE**.\n\n\u003cimg src=\"./media/image49.png\" style=\"width:3.45833in;height:4.36458in\" alt=\"2021-01-19 22_59_00-DigisparkBlink _ Arduino 1\" /\u003e\n\n# Useful Settings\n\n## Auto Format 132 character per line\n\nThe standard auto format settings are the **Kernighan \u0026 Ritchie style** with a **maximum line length of 80** characters. If you feel that this is too short for your HD Monitor (like I do), set maximum line length to e.g. 132.\n\nOpen **Window \\\u003e Preferences  \n**![](./media/image50.png)\n\nNavigate to the **C++ Formatter**, click on **New….** and give it a sensible name.  \n![](./media/image51.png)\n\nThen change **Maximum line width** on the **Line Wrapping** tab to 132.  \n![](./media/image52.png)\n\n## Enable file history\n\nBy default, the file history is limited to 7 days.  \n\u003cimg src=\"./media/image53.png\" style=\"width:6.3in;height:3.57174in\" alt=\"C:\\Users\\Armin\\AppData\\Local\\Microsoft\\Windows\\INetCache\\Content.Word\\2021-03-23 16_15_09-Preferences.png\" /\u003e\n\nI personally prefer an unlimited history, it does not take too much space on your disk (2.6 GB for 136 projects and 5 years).  \n\u003cimg src=\"./media/image54.png\" style=\"width:6.3in;height:3.57174in\" alt=\"C:\\Users\\Armin\\AppData\\Local\\Microsoft\\Windows\\INetCache\\Content.Word\\2021-03-23 16_17_40-Preferences.png\" /\u003e\n\n### Access the history of a file\n\nThe local history (stored on your computer) can be accessed by selecting a file and them **Team \\\u003e Show Local History**  \n![](./media/image55.png)\n\nThis is an example history.\n\n![](./media/image56.png)\n\n## Launch explorer for the current file\n\nThis opens a Windows explorer window located at the file currently selected in the edit window. It is very handy if you want to modify or copy the file outside of Sloeber.\n\n![](./media/image57.png)\n\n## Create a launch configuration for external tool\n\nYou can also create a launch configuration for external tool, to have this function available at one click.\n\n![](./media/image58.png)\n\nAdd the path **C:\\Windows\\explorer.exe** and add **Arguments** \"/select,\\${resource_loc}\"**  \n**\u003cimg src=\"./media/image59.png\" style=\"width:6.3in;height:6.50417in\" /\u003e\n\nOn the Build tab, uncheck the **Build before launch** checkbox  \n\u003cimg src=\"./media/image60.png\" style=\"width:6.3in;height:6.50417in\" /\u003e\n\nOn the Common tab, check **External Tools**  \n![](./media/image61.png)\n\nRun it from the menu  \n![](./media/image62.png)\n\n# Advanced features\n\n## Advanced Editing shortcuts\n\n- Search definition of a variable/function with `F3`\n- Search Usage of variable/function with `Ctrl + Shift + G`\n- Rename variable/function/macro at all occurrences with `Alt + Shift + R`\n- Format source with `Ctrl + Shift + F`\n- Comment/Outcomment with `Ctrl + Shift + /`\n- Search (and replace) in Project or complete Workspace with `Search \\\u003e File …`\n\n### Name completion with Ctrl + Space\n\nHere the completion for \"Seria\".  \n![](./media/image63.png)\n\nIt handles also available functions of an object if pressed after the dot.  \n![](./media/image64.png)\n\n### Creating code blocks with Ctrl + Space\n\nType \"sw\", press Ctrl + Space and select **switch case statement**. A complete switch template will be generated for you.\n\n![](./media/image65.png)\n\nType \"for\", press Ctrl + Space and you get:\n\n\u003cimg src=\"./media/image66.png\" style=\"width:2.77122in;height:1.08348in\" /\u003e\n\nThis results in:\n\n**for** (**int** var = 0; var \\\u003c \u003cu\u003emax\u003c/u\u003e; ++var) {\n\n}\n\n## Explore the history of your code\n\nIn the History view you can not only display historical file contents, but also compare them with current content.\n\n\u003cimg src=\"./media/image67.png\" style=\"width:6.10502in;height:2.25031in\" /\u003e\n\nIf you select two dates / lines in the history view, you can compare them with each other.\n\n\u003cimg src=\"./media/image68.png\" style=\"width:6.07376in;height:1.90652in\" /\u003e\n\n## Generating Assembler output of your program\n\nOpen **Project \\\u003e Properties \\\u003e C/C++ Build \\\u003e Settings \\\u003e Build Steps** and add \"avr-objdump -h -S \\${BuildArtifactFileBaseName}.elf \\\u003e \\${BuildArtifactFileBaseName}.lss\" in the field **Post-build steps \\\u003e Command**\n\n\u003cimg src=\"./media/image69.png\" style=\"width:6.3in;height:3.82014in\" /\u003e\n\nThe assembler output is located in Blink/Blink_test.lss and looks like:\n\n\u003cimg src=\"./media/image70.png\" style=\"width:6.3in;height:5.09792in\" /\u003e\n\n## Synchronize editor window with left tree view\n\nIf you activate the \"Link with Editor\" button. The tree view will position at the file in the Editor window (which is not always desirable).![](./media/image71.png)\n\n## Add user libraries\n\nYou can specify the location where your manually managed libraries are located.  \n\u003cimg src=\"./media/image72.png\" style=\"width:5.53125in;height:6.65625in\" alt=\"2021-01-19 21_02_48-Preferences (Filtered)\" /\u003e\n\n## Create a function from multiple lines of code\n\nFirst, select the lines of code you want to have as a function, then use **Refactor \\\u003e Extract Function** and specify name of the function as well as other parameters. The function will then be created and inserted before the current function.  \n![](./media/image73.png)\n\n## Convert an ino file to a cpp file\n\nIf you create a project from an Arduino example or download Arduino examples, you always have an \\*.ino file as main program.\n\n\u003cimg src=\"./media/image74.png\" style=\"width:6.24045in;height:2.93791in\" /\u003e\n\nIf you just rename your \\*.ino file to \\*.cpp, you will get compiler errors. You must **first** include the lines\n\n**\\#include** \"Arduino.h\"\n\n**void** **\u003cu\u003esetup\u003c/u\u003e**() ;\n\n**void** **\u003cu\u003eloop\u003c/u\u003e**() ;\n\n**void** **\u003cu\u003ecalibrate\u003c/u\u003e**() ;\n\nfrom the file *sloeber.ino.cpp* into the \\*.ino file before any \\#defines or declarations. After renaming your file, the file file sloeber.ino.cpp will be deleted (and if you rename it back, it is created again ).\n\n# Working sets\n\nIf after a while you have many projects in your workspace, you can group them with working sets.  \nHere I grouped all projects with the same core into a working set and used the project configuration for the different source files/examples  \n\u003cimg src=\"./media/image75.png\" style=\"width:2.52569in;height:6.16566in\" alt=\"2021-03-23 16_36_49-WORKSPACE_SLOEBER - Digispark_DigiKeyboard_Keyboard\" /\u003e\n\n\u003cimg src=\"./media/image76.png\" style=\"width:2.52582in;height:2.97917in\" alt=\"2021-03-23 16_37_59-Select Working Set\" /\u003e\n\n# Tips and Tricks\n\n## Detach an editor perspective (e.g. Console) window\n\nYou can detach every window by just dragging it elsewhere.  \nDragging back can be done by simply **clicking on the tab (not on the title of the detached tab window)**. Then you will see mouse cursor change showing you where you can drop it to attach the tab back to Eclipse. Alternatively, you can close the window and use **Window \\\u003e Perspective \\\u003e Reset Perspective**.\n\n## Full screen Editing\n\nBy double clicking on the tab of every window, this window changes to full screen / full window. The next double click reverts this change.\n\n# Errors and Problems\nBefore you chase a strange error, it is always recommended to try **Sloeber \u003e Reattach Libraries**,  **right mouse button \u003e Clean Project** and **Index \u003e Rebuild** and to close and open the project or even restart Sloeber.\nAlso look to the list of libraries with **Sloeber \u003e Add a library to the selected project** and check, if it corresponds to your requirements.\n\n\n## A Window (e.g. Console) was accidentally deleted, the window arrangement is broken\n\nReset window arrangement with **Window \\\u003e Perspective \\\u003e Reset Perspective**.  \n**Do NEVER check** the box **Also discard perspective's customization**.\n\n![](./media/image77.png)\n\n## Errors in unknown libraries\n\nIf you get errors like\n\n`make: \\*\\*\\* \\[libraries\\FreeRTOS\\src\\croutine.c.o\\] Error 1`\n\nthen check libraries, sometimes there are more libraries than required. In this case, Sloeber thinks you might need the FreeRTOS library for the project.\n\n![](./media/image78.png)\n\nSimply delete it in the Project Explorer or exclude it from your configuration.\n\n## Strange errors indicated, F3 does not work, index not complete\n\nThis happens sometimes after changing configuration.  \nRun **Index \\\u003e Rebuild** or **Index \\\u003e Freshen All Files** and the strange behavior will vanish.\n\n![](./media/image79.png)\n\n## No build.opt\n\nIf you get errors like\n\n`ESP8266/core/build.opt: No such file or directory`\n\nthen just removing the line `build.opt.flags=\"@{build.opt.fqfn}\"` in the files platform.txt and platform.sloeber.txt and restarting Sloeber will fix it. \n\"Build options\" can be specified in the **Compile Options** tab in the Sloeber project settings.\n\nThe files can be found at e.g. Sloeber\\arduinoPlugin\\packages\\esp8266\\hardware\\esp8266\\3.1.1\\.\n\n\n## Keyboard layout changed to English/US\n\nKeyboard layout can be (accidentally) changed by **Alt + Shift** to English and back.\n\n## Error message: invalid argument to --format: avr\n\nYou accidentally selected `AVR_ALTERNATIVE` for **use alternative size command?**\n\nDo not select it for any non AVR platform!\n\n**\u003cimg src=\"./media/image80.png\" style=\"width:6.3in;height:4.21319in\" /\u003e\n\n#  Software updates\n\nCheck for updates with **Help \\\u003e Check for Updates**\n\n\u003cimg src=\"./media/image81.png\" style=\"width:3.02234in;height:1.32446in\" /\u003e\n\nYou see a list of available updates\n\n\u003cimg src=\"./media/image82.png\" style=\"width:4.19914in;height:2.36341in\" /\u003e\n\nThen you will be asked to **accept the terms of the license agreements**\n\n![](./media/image83.png)\n\nAnd because the package is of course not signed, you must choose **Install anyway**![](./media/image84.png)\n\nAt last restart Sloeber\n\n![](./media/image85.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farminjo%2Fsloebertutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farminjo%2Fsloebertutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farminjo%2Fsloebertutorial/lists"}