aboutsummaryrefslogtreecommitdiff
path: root/examples/MakefileExample/Makefile-3rd_party-board.mk
blob: 35c0ca6b6ec53aff34d72dc0feb2b94d8e8415e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 $(ARDMK_DIR)/Arduino.mk