Skip to content

Commit ba96840

Browse files
authored
Merge pull request #501 from MilanV/master
Document how to setup Makefile for 3rd party boards
2 parents c417638 + 1b5494f commit ba96840

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
1212
- Fix: Fixed sed expression to properly format show_submenu (issue #488) (https://github.com/cbosdo)
1313
- New: Add support for good old cu as monitor command (issue #492) (https://github.com/mwm)
1414
- Tweak: Removed tilde from documentation (issue #497). (https://github.com/sej7278)
15+
- New: Add a documentation how to setup Makefile for 3rd party boards (issue #499). (https://github.com/MilanV)
1516

1617
### 1.5.2 (2017-01-11)
1718

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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

Comments
 (0)