Setting up an Eclipse-based IDE

This guide will explain how to setup a complete IDE based entirely on free and open source components for both Linux and Windows.

What this guide does not cover

This guide will not enter into details of common system tasks like and not limited to:

  • Installing applications (unless a special procedure is required).
  • Creating desktop shortcuts.
  • Adding paths to the PATH variable.
  • Creating environment variables.
  • Any other normal PC usage task.
  • Use of the toolchain, this topic is covered in the ”Using an Eclipse-based IDE” article.

Required Hardware

Having to develop embedded software you need some hardware of course.

  • A JTAG probe supporting OpenOCD. A list of compatible devices is available in the OpenOCD documentation, more exactly here. In general any probe supporting a decent GDB server is usable.
  • A suitable development board, for example the cheap Olimex STM32-P103.

Required Software

The first thing to do is to download all the required software components, beginners should avoid the optional components initially.

  • Java Runtime, you probably already have this installed. You may download the JRE from here.
  • Eclipse IDE for C/C++ Developers, download it from here.
  • GCC ARM toolchain, there are several options for this component.
    • Codesourcery Sourcery G++ Lite Edition. It is available for both Linux and Windows. Download it from here.
    • YAGARTO, this one often uses the most recent components. Download it from here.
    • Build yourself from source, not really recommended.
  • YAGARTO TOOLS, some toolchains do not provide the Unix-like commands like “make”, this download includes everything is required. Download it from here. Linux users do not need this package.
  • OpenOCD binaries. Windows users may download it from the Freddie Chopin's homepage, Linux users probably will have to build from source, Ubuntu has the version 4.0 in the repository, it is not the most recent one but perfectly working.
  • Doxygen, only required if you want to regenerate the documentation from source. Download it from here, most Linux distribution have it in the repositories.
  • Graphviz, only required if you want to regenerate the documentation from source. Download it from here, most Linux distribution have it in the repositories.
  • Eclox, only required if you also installed Doxygen, see the installation section.

Installation

Installation notes for the various software components.

ChibiOS/RT

Just unpack the ChibiOS/RT archive into your projects directory. We will use it as workspace later.

GCC

Windows users simply have to use the installers, just make sure that the directories containing arm-none-eabi-gcc.exe is listed in the PATH environment variable. Sourcery G++ linux can be installed into the user home directory, just make sure to add its location to the PATH environment variable. If your compiled is correctly installed then the command ”arm-none-eabi-gcc –version” will print the compiler version.

Eclipse

Eclipse is distributed into a compressed archive, follow this procedure:

  1. Verify if you have Java installed, if not install the runtime. You may verify this using the command: ”java -version”. Make sure you have at least the version 1.6.
  2. Create an eclipse directory in your home and unpack the archive there. Windows users may unpack it into ”c:\Program Files\eclipse”.
  3. Create a desktop shortcut or other way to launch the Eclipse executable easily.
  4. Launch Eclipse.
  5. Eclipse will ask you a directory for its initial workspace, make it point to the ChibiOS/RT root directory (you may have as many workspaces you want, keep this for later), make sure to select the check box or it will ask you again each time.eclipse1-001.jpg
  6. Now you should see the welcome screen, close it and you will be in the normal C/C++ perspective.
  7. Unselect “Project→Build Automatically” unless you like insanity.
  8. Disable the “usage collector” in “Window→Preferences→Usage_Data_Collector” by unselecting “Enable capture” (if present).
  9. If you are behind a proxy or firewall (corporate users usually are) then configure the correct parameters in “Window→Preferences→General→Network_Connections”.
  10. Let Eclipse auto update to the latest version “Help→Check_for_Updates”.
  11. Install the “C/C++ Hardware Debugging” Eclipse extension from “Help→Install New Software…”, the debugger is located in the “Mobile and Device Development” category. This extension is required to use a remote GDB server for debugging.eclipse1-003.jpg

From this same category you may want to install also the package “Terminal”, it is often useful having an handy terminal emulator within Eclipse.

YAGARTO Tools

Make sure that the path ”<install_dir>\yagarto-tools\bin” appears at the beginning of your environment PATH variable. This will make sure Eclipse will use the program “make.exe” from the YAGARTO Tools and not some other version you may have in your system.

OpenOCD

Windows users just have to use the installer. Linux users should follow the normal installation procedure for deb or rpm packages, of course it is also possible to build it from the source code.

Doxygen

Just use the Windows installer, Linux users probably have Doxygen already available into the repositories. Make sure that the Doxygen binaries directory is listed in the PATH variable or Eclipse would not be able to locate it.

Graphviz

Just use the Windows installer, Linux users probably have Graphviz already available into the repositories. Make sure that the Graphviz binaries directory is listed in the PATH variable or Doxygen would not be able to locate it.

Eclox

In order to install Eclox you have to add ”http://download.gna.org/eclox/update” as repository URL into “Help→Install New Software…” then install “Eclox” not “Eclox Hot”. After installing Eclox you will be able to compile Doxygen documentation using the button with the blue @ inside.

 
chibios/guides/eclipse1.txt · Last modified: 2012/06/24 14:50 by giovanni
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.3