|
| 1 | +# STANDARD ARDUINO WORKFLOW |
| 2 | +# |
| 3 | +# Given a normal sketch directory, all you need to do is to create |
| 4 | +# a small Makefile which defines a few things, and then includes this one. |
| 5 | +# |
| 6 | +# For example: |
| 7 | +# |
| 8 | +# ARDUINO_LIBS = Ethernet Ethernet/utility SPI |
| 9 | +# BOARD_TAG = uno |
| 10 | +# ARDUINO_PORT = /dev/cu.usb* |
| 11 | +# |
| 12 | +# include /usr/share/arduino/Arduino.mk |
| 13 | +# |
| 14 | +# Hopefully these will be self-explanatory but in case they're not: |
| 15 | +# |
| 16 | +# ARDUINO_LIBS - A list of any libraries used by the sketch (we |
| 17 | +# assume these are in $(ARDUINO_DIR)/hardware/libraries |
| 18 | +# or your sketchbook's libraries directory) |
| 19 | +# |
| 20 | +# ARDUINO_PORT - The port where the Arduino can be found (only needed |
| 21 | +# when uploading) |
| 22 | +# |
| 23 | +# BOARD_TAG - The ard-parse-boards tag for the board e.g. uno or mega |
| 24 | +# 'make show_boards' shows a list |
| 25 | +# |
| 26 | +# If you have your additional libraries relative to your source, rather |
| 27 | +# than in your "sketchbook", also set USER_LIB_PATH, like this example: |
| 28 | +# |
| 29 | +# USER_LIB_PATH := $(realpath ../../libraries) |
| 30 | +# |
| 31 | +# If you've added the Arduino-Makefile repository to your git repo as a |
| 32 | +# submodule (or other similar arrangement), you might have lines like this |
| 33 | +# in your Makefile: |
| 34 | +# |
| 35 | +# ARDMK_DIR := $(realpath ../../tools/Arduino-Makefile) |
| 36 | +# include $(ARDMK_DIR)/arduino-mk/Arduino.mk |
| 37 | +# |
| 38 | +# In any case, once this file has been created the typical workflow is just |
| 39 | +# |
| 40 | +# $ make upload |
| 41 | +# |
| 42 | +# All of the object files are created in the build-{BOARD_TAG} subdirectory |
| 43 | +# All sources should be in the current directory and can include: |
| 44 | +# - at most one .pde or .ino file which will be treated as C++ after |
| 45 | +# the standard Arduino header and footer have been affixed. |
| 46 | +# - any number of .c, .cpp, .s and .h files |
| 47 | +# |
| 48 | +# Included libraries are built in the build-{BOARD_TAG}/libs subdirectory. |
| 49 | +# |
| 50 | +# Besides make upload you can also |
| 51 | +# make - no upload |
| 52 | +# make clean - remove all our dependencies |
| 53 | +# make depends - update dependencies |
| 54 | +# make reset - reset the Arduino by tickling DTR on the serial port |
| 55 | +# make raw_upload - upload without first resetting |
| 56 | +# make show_boards - list all the boards defined in boards.txt |
| 57 | +# make monitor - connect to the Arduino's serial port |
| 58 | +# make size - show the size of the compiled output (relative to |
| 59 | +# resources, if you have a patched avr-size) |
| 60 | +# make disasm - generate a .lss file in build-cli that contains |
| 61 | +# disassembly of the compiled file interspersed |
| 62 | +# with your original source code. |
| 63 | +# make verify_size - Verify that the size of the final file is less than |
| 64 | +# the capacity of the micro controller. |
| 65 | +# make eeprom - upload the eep file |
| 66 | +# make raw_eeprom - upload the eep file without first resetting |
| 67 | +# |
| 68 | +######################################################################## |
| 69 | +# |
| 70 | +# SERIAL MONITOR |
| 71 | +# |
| 72 | +# The serial monitor just invokes the GNU screen program with suitable |
| 73 | +# options. For more information see screen (1) and search for |
| 74 | +# 'character special device'. |
| 75 | +# |
| 76 | +# The really useful thing to know is that ^A-k gets you out! |
| 77 | +# |
| 78 | +# The fairly useful thing to know is that you can bind another key to |
| 79 | +# escape too, by creating $HOME{.screenrc} containing e.g. |
| 80 | +# |
| 81 | +# bindkey ^C kill |
| 82 | +# |
| 83 | +# If you want to change the baudrate, just set MONITOR_BAUDRATE. If you |
| 84 | +# don't set it, it tries to read from the sketch. If it couldn't read |
| 85 | +# from the sketch, then it defaults to 9600 baud. |
| 86 | +# |
| 87 | +######################################################################## |
| 88 | + |
| 89 | +ARDUINO_LIBS = SPI SoftwareSerial |
| 90 | +BOARD_TAG = uno |
| 91 | +ARDUINO_PORT = /dev/ttyACM* |
| 92 | +include /usr/share/arduino/Arduino.mk |
0 commit comments