User Tools

Site Tools


arduino:configuring_netbeans_for_arduino_development

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
arduino:configuring_netbeans_for_arduino_development [2016/09/19 01:30] – created mithatarduino:configuring_netbeans_for_arduino_development [2018/08/24 16:34] – [Arduino-Build] mithat
Line 1: Line 1:
 ====== Configuring Netbeans for Arduino Development ====== ====== Configuring Netbeans for Arduino Development ======
  
-My current favorite tool for developing non-trivial Arduino projects is Netbeans with C++ support. I use [[https://github.com/sudar/Arduino-Makefile|Arduino-Makefile]] to do the actual building and NB for coding support.+My current favorite tool for developing non-trivial Arduino projects is Netbeans with C++ support. This documents my setupIt has been vetted with NetBeans 8.2.
  
 ===== The tool collection ===== ===== The tool collection =====
 +NetBeans will be happiest if you let it know where the build tools for your project live. Set up a new tool collection for Arduino along the lines of the figure below:
  
 +{{:arduino:arduino-avr-tool-collection.png?direct&300|}}
  
-I won't cover using Arduino-Makefile here as that's its own thing. Assuming you have Arduino-Makefile workingon the command line, the next thing you'll want to do is set up a new tool collection in Netbeans for Arduino along the lines of the figure below:+If you are using an Arduino that uses something other than an AVR microcontroller, the paths will need to be adjusted.
  
-{{:arduino:arduino-avr-tool-collection.png?direct&300|}}+===== The Makefile and config =====
  
 +I use either [[https://github.com/sudar/Arduino-Makefile|Arduino-Makefile]] or my own [[https://github.com/mithat/arduino-build | Arduino-Build]] to do the actual building. I won't cover using either of those in any depth here as they are each their own thing. However, you can use the following as a cheatsheet for setting things up.
  
-===== The Makefile =====+==== Arduino-Makefile ====
  
-When creating a new project, use a Makefile that looks something like the following:+When creating a new project with Arduino-Makefileyour local project Makefile should look something like the following:
  
-<code make>+<file make Makefile>
 # Project config # Project config
 ARDUINO_LIBS = SoftwareWire AsyncTimer ARDUINO_LIBS = SoftwareWire AsyncTimer
Line 31: Line 34:
 # Include parent Makefile from <https://github.com/sudar/Arduino-Makefile> # Include parent Makefile from <https://github.com/sudar/Arduino-Makefile>
 include $(HOME)/Build/Arduino-Makefile/Arduino.mk include $(HOME)/Build/Arduino-Makefile/Arduino.mk
 +</file>
  
-</code>+==== Arduino-Build ====
  
-===== Code completion =====+If you're using Arduino-Build, then your project's Makefile should resemble the following:
  
 +<file make Makefile>
 +# Point BB at the arduino-build script
 +BB=<your-path-to>/arduino-build
 +
 +# You shouldn't have to change any of these.
 +.PHONY : compile clean upload monitor upmon
 +
 +build:
 + $(BB) build
 +
 +clean:
 + $(BB) clean
 +
 +upload:
 + $(BB) upload
 +
 +monitor:
 + $(BB) monitor
 +
 +upmon: upload monitor
 +</file>
 +
 +You will also need an ''arduino.conf'' file in the root of your project that looks like:
 +
 +<file bash arduino.conf>
 +# === Arduino path ===
 +ARDUINO_PATH=/home/mithat/opt/arduino
 +
 +# === Board parameters ===
 +BOARD_PACKAGE=arduino
 +BOARD_ARCHITECTURE=avr
 +BOARD=nano
 +BOARD_PARAM="cpu=atmega328old"
 +
 +# === Communication settings ===
 +PORT=/dev/ttyUSB0
 +SPEED=9600
 +</file>
 +
 +See the Arduino-Build readme for information on figuring out the board parameters and other fiddly bits.
 +
 +===== Code completion =====
  
-While your setup should be working now, NB will be shouting at you a lot about things not being defined, etc. That's because you need to add [[arduino:code_completion|code completion directories]] to the tool collection. Do this on the //Code Completion > C++// tab of the tool collection dialog.+While your setup should be working now, NetBeans will be shouting at you a lot about things not being defined, etc. That's because you need to add [[arduino:code_completion|code completion directories]] to the tool collection. Do this on the //Code Completion > C++// tab of the tool collection dialog.
  
arduino/configuring_netbeans_for_arduino_development.txt · Last modified: 2024/02/05 19:06 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki