Develop for Arduino using Kdevelop

Kdevelop is a free development environment that can be set up to work with Arduino. This page is very much a work-in-progress and explains how to achieve basic Arduino support for Kdevelop, please feel free to add to it or improve it.


Index


Installation

On Debian and others distros kdevelop and arduino-core is needed:

  • apt-get install kdevelop arduino-core

Copy arduino.tar.bz2 on /usr/share/kde4/apps/kdevappwizard/templates

Create a new external script in kdevelop, you can name it "Compile and upload Arduino" and put the following command:

  • make TARGET=%b all upload

Use

  1. Select "New from template" on Project menu.
  2. Select "Simpre Arduino application" template.
  3. Select a name for your project, press Next and then Finish.
  4. Edit the example as you need. I recommend to add #include "WProgram.h" at top of pde file for better arduino support.
  5. Edit Makefile if necessary
  6. Select "Compile and upload Arduino" external script

Configuration

If you have a diecimila arduino the Makefile is correct. If you have another arduino you must edit Makefile with information you can grab from /usr/share/arduino/hardware/arduino/boards.txt

Tips

To improve arduino support on kdevelop you can add at the top of the pde file:

  • #include "WProgram.h"

If you want to view arduino documentation (not a very polite method), you can configure php documentation to point at:

  • /usr/share/doc/arduino-core/reference

As a serial monitor you can use cutecom, you can instal it with:

  • apt-get instal cutecom

To open examples you can manually copy to your project the file from:

  • /usr/share/doc/arduino-core/examples

Finally to select de board and communications port you must manually edit Makefile. On AVRDUDE_ARD_BAUDRATE you must select the correct baudrate for your board, on MCU you must select the microcontroller model of your board, on F_CPU is the frecuency of your board and ARDUINO_PORT the communications port. This information is on /usr/share/arduino/hardware/arduino/boards.txt file.

Share