Difference between revisions of "Arduino CLI"

From Fixme.ch
Jump to: navigation, search
(Created page with "== Makefile == * Install this: apt-get install arduino-mk avr-gcc avr-libc * Use the arduino from the command line, to compile and upload ARDUINO_DIR = /usr/share/arduino BOARD_...")
 
(Makefile)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Makefile ==
+
== Use the arduino from the command line, to compile and upload ==
 
* Install this:
 
* Install this:
 
  apt-get install arduino-mk avr-gcc avr-libc
 
  apt-get install arduino-mk avr-gcc avr-libc
* Use the arduino from the command line, to compile and upload
+
* Put this in a Makefile
ARDUINO_DIR = /usr/share/arduino
+
ARDUINO_DIR = /usr/share/arduino
BOARD_TAG    = atmega328
+
BOARD_TAG    = atmega328
ARDUINO_PORT = /dev/ttyUSB*
+
ARDUINO_PORT = /dev/ttyUSB*
ARDUINO_LIBS = NewPing OtherLibs
+
ARDUINO_LIBS = NewPing OtherLibs
include /usr/share/arduino/Arduino.mk
+
include /usr/share/arduino/Arduino.mk
 
* Choose the BOARD_TAG using this command:
 
* Choose the BOARD_TAG using this command:
 
  ard-parse-boards --boards
 
  ard-parse-boards --boards

Latest revision as of 20:41, 15 January 2013

Use the arduino from the command line, to compile and upload

  • Install this:
apt-get install arduino-mk avr-gcc avr-libc
  • Put this in a Makefile
ARDUINO_DIR = /usr/share/arduino
BOARD_TAG    = atmega328
ARDUINO_PORT = /dev/ttyUSB*
ARDUINO_LIBS = NewPing OtherLibs
include /usr/share/arduino/Arduino.mk
  • Choose the BOARD_TAG using this command:
ard-parse-boards --boards
  • Commands
make             - no upload
make upload      - compile and upload
make clean       - remove all our dependencies
make depends     - update dependencies
make reset       - reset the Arduino by tickling DTR on the serial port
make raw_upload  - upload without first resetting
make show_boards - list all the boards defined in boards.txt