diff options
| author | Simon John <git@the-jedi.co.uk> | 2017-06-02 10:38:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-02 10:38:16 +0100 |
| commit | ba96840399381b35e20a9fe620602dc4a6fc6be7 (patch) | |
| tree | 94213e6b035355429c90a8106e3c70ef89004efd /examples/MakefileExample/Makefile-3rd_party-board.mk | |
| parent | c41763851b63385e2706355ccfacf2bf0bff653d (diff) | |
| parent | 1b5494f2625a49ac069683516e2f9f033070c8c4 (diff) | |
Merge pull request #501 from MilanV/master
Document how to setup Makefile for 3rd party boards
Diffstat (limited to 'examples/MakefileExample/Makefile-3rd_party-board.mk')
| -rw-r--r-- | examples/MakefileExample/Makefile-3rd_party-board.mk | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/examples/MakefileExample/Makefile-3rd_party-board.mk b/examples/MakefileExample/Makefile-3rd_party-board.mk new file mode 100644 index 0000000..96e972c --- /dev/null +++ b/examples/MakefileExample/Makefile-3rd_party-board.mk @@ -0,0 +1,56 @@ +### DISCLAIMER +### This is an example Makefile and it MUST be configured to suit your needs. +### For detailed explanations about all of the available options, please refer +### to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md + +### How to setup a project using a board definition provided by the 3rd party +### ========================================================================= + +### Some vendors provide definitions/configuration of their boards separately, +### as so-called addon packages. Originally, they are supposed to be used in +### the Arduino IDE but they can be used with Arduino-Makefile as well: + +### 1. get the package from the vendor +### if they provide .json file, look into it and take the URL of the package +### archive from there +### +### 2. extract the package into your ARDUINO_SKETCHBOOK directory +### you have to end with the directory structure like this, in your +### ARDUINO_SKETCHBOOK directory (sparkfun is the vendor name): + +### hardware/ +### ├── sparkfun/ +### │ └── avr/ +### │ ├── boards.txt +### │ ├── bootloaders/ +### │ ├── driver/ +### │ ├── platform.txt +### │ ├── signed_driver/ +### │ └── variants/ + +### 3. Create this Makefile (use your vendor/package name) + +### ALTERNATE_CORE = sparkfun +### include $(HOME)/Arduino-Makefile/Arduino.mk + +### 4. run 'make show_boards' +### check that you can see (only) boards provided by this vendor + +### 5. select the name of your board +### and add a line "BOARD_TAG = ...." to your Makefile + +### 6. if your board has more cpu variants, run 'make show_submenu' +### to see them; select your one and add a line "BOARD_SUB = ...." +### to your Makefile + +##### + +### The basic configuration should be done now. +### The example follows: + +ARDUINO_SKETCHBOOK = $(HOME)/sketchbook +ALTERNATE_CORE = sparkfun +BOARD_TAG = promicro +BOARD_SUB = 8MHzatmega32U4 +include /usr/share/arduino/Arduino.mk + |
