|
| 1 | +### DISCLAIMER |
| 2 | +### This is an example Makefile and it MUST be configured to suit your needs. |
| 3 | +### For detailed explanations about all of the available options, please refer |
| 4 | +### to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md |
| 5 | + |
| 6 | +### How to setup a project using a board definition provided by the 3rd party |
| 7 | +### ========================================================================= |
| 8 | + |
| 9 | +### Some vendors provide definitions/configuration of their boards separately, |
| 10 | +### as so-called addon packages. Originally, they are supposed to be used in |
| 11 | +### the Arduino IDE but they can be used with Arduino-Makefile as well: |
| 12 | + |
| 13 | +### 1. get the package from the vendor |
| 14 | +### if they provide .json file, look into it and take the URL of the package |
| 15 | +### archive from there |
| 16 | +### |
| 17 | +### 2. extract the package into your ARDUINO_SKETCHBOOK directory |
| 18 | +### you have to end with the directory structure like this, in your |
| 19 | +### ARDUINO_SKETCHBOOK directory (sparkfun is the vendor name): |
| 20 | + |
| 21 | +### hardware/ |
| 22 | +### ├── sparkfun/ |
| 23 | +### │ └── avr/ |
| 24 | +### │ ├── boards.txt |
| 25 | +### │ ├── bootloaders/ |
| 26 | +### │ ├── driver/ |
| 27 | +### │ ├── platform.txt |
| 28 | +### │ ├── signed_driver/ |
| 29 | +### │ └── variants/ |
| 30 | + |
| 31 | +### 3. Create this Makefile (use your vendor/package name) |
| 32 | + |
| 33 | +### ALTERNATE_CORE = sparkfun |
| 34 | +### include $(HOME)/Arduino-Makefile/Arduino.mk |
| 35 | + |
| 36 | +### 4. run 'make show_boards' |
| 37 | +### check that you can see (only) boards provided by this vendor |
| 38 | + |
| 39 | +### 5. select the name of your board |
| 40 | +### and add a line "BOARD_TAG = ...." to your Makefile |
| 41 | + |
| 42 | +### 6. if your board has more cpu variants, run 'make show_submenu' |
| 43 | +### to see them; select your one and add a line "BOARD_SUB = ...." |
| 44 | +### to your Makefile |
| 45 | + |
| 46 | +##### |
| 47 | + |
| 48 | +### The basic configuration should be done now. |
| 49 | +### The example follows: |
| 50 | + |
| 51 | +ARDUINO_SKETCHBOOK = $(HOME)/sketchbook |
| 52 | +ALTERNATE_CORE = sparkfun |
| 53 | +BOARD_TAG = promicro |
| 54 | +BOARD_SUB = 8MHzatmega32U4 |
| 55 | +include /usr/share/arduino/Arduino.mk |
| 56 | + |
0 commit comments