Page tree
Skip to end of metadata
Go to start of metadata

This guide demonstrates how to deploy an Eclipse IDE on a GNU/Linux system and set it up for general-purpose and embedded development.

We do not support host OS other than GNU/Linux; however, the provided instructions might just work for Mac too (no guarantees though). If you're keen on running another OS, please consider using the Bistromathic VM, where the development environment is already pre-configured.

This guide has been verified against Eclipse Oxygen running on a GNU/Linux distribution based on Ubuntu 16.04, but the guide should be applicable to newer versions as well (possibly with minor modifications).

If you have any suggestions, please submit them to the Zubax Forum.

Installing a Java runtime

If you're running a Debian-based distribution (such as Ubuntu or Mint), execute the following command:

sudo apt-get install default-jre

If you're using a different distribution, refer to its documentation to find out how to install a Java runtime environment.

Installing the Eclipse package

Download the self-installer from eclipse.org.

Launch the downloaded installer and select the option for Eclipse IDE for C/C++ Developers.

When prompted, select the installation directory under ~/opt/eclipse/, e.g. /home/pavel/opt/eclipse/cpp-oxygen, where the last part may vary depending on the specific version that is being installed.

Once the installation is finished, close the installer. There is no need to launch Eclipse right away.

Configuring the launcher

Technically, this part is optional, because Eclipse can be directly invoked from the command line. However, that is unlikely to be convenient enough for most people. Therefore, we recommend to configure the application launcher of your desktop environment so that it provides a nice button for the freshly installed Eclipse.

It is recommended to configure the launcher so that the IDE is started from an interactive shell, as that would allow the IDE to reference the environment variables specified in the user's shell profile file (for example, ~/.bashrc). If this recommendation is omitted, the user will have to configure the environment variables that Eclipse needs access to globally, which may be less convenient, and therefore that approach is not recommended.

In order to make the launcher always launch Eclipse from an interactive shell, use the following command (where the path to the executable may be different depending on your installation):

bash -ic "/home/pavel/opt/eclipse/cpp-oxygen/eclipse/eclipse"

If you're not using Bash as your system shell, you know what to do.

The following screenshot demonstrates how to set up the launcher for KDE. Other desktop environments (e.g. Gnome) should provide similar configuration options.

.

Installing necessary plugins

Now you can launch Eclipse and proceed to plugin installation. Eclipse will ask you which workspace to use; for now you can use the default workspace location or any other existing workspace if you prefer so (if you chose to use the default workspace, you can freely delete it at the end of this guide in order to not pollute your file system).

Navigate to Help → Eclipse Marketplace.... Using the search bar, find and install at least the following plugins:

  • Markdown Text Editor.
  • PyDev. All optional components should be selected.
  • GNU MCU Eclipse. All default components should be installed; additionally, all components in the section *.debug.* should be installed as well. It should be safe to install additional components even if they are not going to be used.

GNU MCU Eclipse failed to install?

If Eclipse complained about its inability to install the GNU MCU Eclipse plugin, proceed with installation of other packages as if nothing happened, then restart the IDE and perform the following steps:

  • Navigate to HelpInstall New Software....
  • Paste the following URL into the field titled Work with: http://gnu-mcu-eclipse.netlify.com/v4-neon-updates
  • Wait until the contents of the package is fetched, then select all of its components.
  • Click Next to proceed with the installation and follow the white rabbit dialogs.
  • Restart the IDE.

At this point, your Eclipse IDE should be ready for use. Refer to the adjacent guides to find out how to configure your first workspace.