A while back, I created an Arduino plugin for NetBeans so that I could use the full-fledged NetBeans IDE for all my Arduino projects. The approach I took was using the NetBeans project sample module method. Under the hood though, it is nothing more than a makefile and an source file template.

Since the release of Arduino 1.0 a few weeks ago, I have received quite a few inquiries on how to make the plugin work with the new Arduino 1.0. The short answer is you will have to pretty much follow the steps I mentioned to re-create a project sample module with the up-to-date makefile.

Unfortunately, the original makefile (modified from the one by Mellis et al. for Arduino 018) is no longer compatible with the latest 1.0 environment due to the many breaking changes introduced in this new Arduino IDE release.

Anyway, I just updated the makefile to make it work with Arduino 1.0, and you can download it towards the end. The new makefile was tested under Ubuntu 10.04 64bit Linux environment. You will most likely need to make some changes to the makefile for it to work under Windows.

Depending on the installation locations and whether additional libraries are used, you may also need to change the following sections in the makefile:

INSTALL_DIR = $(HOME)/arduino-1.0
...
#add your specific c modules at the end
C_MODULES = \
...
#add your specific c++ modules at the end
CXX_MODULES = \

Here are a few additional changes: the main code file name is changed from main.pde to main.cpp in the project. The original makefile assembles the main.cpp file behind the scene, in the event there is an compilation error the error shown is from the assembled file not main.pde. This behavior could cause some confusion. In this updated makefile, the compilation is done directly against the code file you are working on so it should be slightly more convenient to use. Also, the include directives are consolidated thanks to the latest Arduino IDE changes. If you are using chips other than ATmega328 though, you will need to change the $VARIANTS variable setting to include the correct pins_arduino.h header file:

VARIANTS = $(INSTALL_DIR)/hardware/arduino/variants/standard

Using this makefile, you should be able to configure your favorite IDE (NetBeans, Eclipse, CodeBlocks, KDevelop, etc.) to work with Arduino projects.

You can also download the compiled NetBeans module from below. Just keep in mind that given the nature of this project type, the makefile is static which means you will have to add your own C_MODULES/CXX_MODULES in the makefile if you are using libraries other than those come as default.

The following build targets are available:

all, build, clean, upload

Downloads

Makefile (for Arduino 1.0, tested under Linux)
NetBeans Plugin for Arduino 1.0 (tested under NetBeans 7.0.1)

Be Sociable, Share!