Eclipse: slow start – speed up

Environment
  • Ubuntu 16.04 LTS
  • Eclipse Neon.3 Release 4.6.3 (Eclipse IDE for C/C++ Developers)

A couple of advices from Stackoverflow work quite well – startup time reduced from tens of seconds to less than 10 seconds and HDD became much more quiet during startup.

Eclipse preferences

In Window > Preferences > General > Startup and Shutdown disable Plug-ins (if you do not use them) activated on startup:

  • Eclipse Automated Error Reporting
  • Marketplace Client
  • Mylyn Tasks UI
  • Mylyn Team UI
  • RSE UI
  • UI Responsiveness Monitoring
eclipse.ini

Add at the bottom the bold text:

-Xms256m
-Xmx1024m
-Xverify:none

The verify option enables/disables validation of all the .class files that Eclipse loads on startup.

Android Studio and IntelliJ IDEA

The verify option seems to reduce startup time of Android Studio and IntelliJ IDEA too.

Android Studio
$ cp ${ANDROID_STUDIO_DIR}/bin/*.vmoptions ~/.AndroidStudio1.5/config

Then add the verify option to the copied files as described above.

IntelliJ IDEA
$ cp ${INTELLIJ_IDEA_DIR}/bin/*.vmoptions ~/.IdeaIC2017.1/config

Then add the verify option to the copied files as described above.

 

Raspberry Pi: debugging in Eclipse

Based on this and this GuruCoding pages.

Environment
  • Ubuntu 16.04 LTS
  • Eclipse Neon.3 Release 4.6.3
  • arm-linux-gnueabihf (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  • Raspberry Pi 3 Model B
ARM toolchain

See Raspberry Pi: cross-compiling blog.

Install Eclipse IDE for C/C++ developers

Download and install from here.

Create and compile an example project

See Raspberry Pi: cross-compiling in Eclipse blog.

Set up remote access in Eclipse
  • Window > Perspective > Open perspective > Other > Remote System Explorer
  • File > New > Other > Remote System Explorer > Connection
  • Select Remote System Type:
    • Linux
    • Next
  • Remote System Connection:
    • Host name: raspberry-pi
    • Connection name: raspberry-pi
    • Next
  • Files:
    • Configuration: ssh.files
    • Next
  • Processes
    • Configuration: processes-shell-linux
    • Next
  • Shells:
    • Configuration: ssh-shells
    • Next
  • Ssh Terminals:
    • Configuration: ssh.terminals
    • Finish
  • Right click created connection > Properties
    • Host > Default User Id: pi
Create project

In Eclipse:

  • File > New > C++ Project
  • C++ Project
    • Project name: helloworld
    • Project type: Hello World C++ Project
    • Toolchains: Cross GCC
    • Next
  • Basic Settings
    • Hello world greeting: Hello world!
    • Next
  • Select Configurations
    • Next
  • Cross GCC Command
    • Cross compiler prefix: arm-linux-gnueabihf-
    • Cross compiler path: /usr/sbin
    • Finish
  • Right-click project name > Properties > C/C++ Settings
    • Tool Settings > Cross Settings
      • Prefix: arm-linux-gnueabihf-
      • Path: /usr/sbin
  • Project > Build All

Raspberry Pi: C++ cross-compiling in Eclipse

Based on this GuruCoding page.

Environment
  • Ubuntu 16.04 LTS
  • Eclipse Neon.3 Release 4.6.3
  • arm-linux-gnueabihf (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  • Raspberry Pi 3 Model B
ARM toolchain

See Raspberry Pi: cross-compiling blog.

Upgrade libstdc++ to 6.0.21 on Raspberry Pi

See Raspberry Pi: how to solve the “version `GLIBCXX_6.0.21′ not found” problem.

Install Eclipse IDE for C/C++ developers

Download, unpack from here.

Eclipse plugins

Eclipse:

  • Help > Install new software > Work with: –All Available Sites–
  • Check “Mobile and Device Development”
  • Next > Accept the terms of the license agreement” > Finish
  • Restart Eclipse
Create project

In Eclipse:

  • File > New > C++ Project
  • C++ Project
    • Project name: helloworld
    • Project type: Hello World C++ Project
    • Toolchains: Cross GCC
    • Next
  • Basic Settings
    • Hello world greeting: Hello world!
    • Next
  • Select Configurations
    • Next
  • Cross GCC Command
    • Cross compiler prefix: arm-linux-gnueabihf-
    • Cross compiler path: /usr/bin
    • Finish
  • Project > Properties > C/C++ Build > Settings
    • Tool Settings > Cross Settings
      • Prefix: arm-linux-gnueabihf-
      • Path: /usr/bin
Enable C++ 11
  • Project > Properties > C/C++ Build > Settings
    • Configuration: Debug/Release
    • Tool Settings > Cross G++ Compiler > Dialect: ISO C+11 (-std=c++0x)
Build
  • Project > Build All