Skip to content

Commit 4dc07e5

Browse files
committed
Add CONTRIBUTING.md and update README
1 parent 2d94c0a commit 4dc07e5

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

ACKNOWLEDGMENTS.md

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Development: Testing your changes
2+
3+
### Local install (simpler)
4+
5+
- Close Arduino IDE.
6+
- Copy your **macchina** folder from this repository into your Arduino directory.
7+
- This can be either your _sketchbook_ directory (usually <Documents>/Arduino), or the directory of the Arduino application itself, the choice is up to you.
8+
- Launch Arduino IDE and you should find the **Macchina M2** board file installed.
9+
10+
### Board Manager Install
11+
12+
- Reference the steps in see `before_deploy` in [**.travis.yml**](./.travis.yml) to create an archive from your **macchina** folder and get the size and hash.
13+
- Grab a copy of [`package_macchina_index.json`](https://macchina.github.io/package_macchina_index.json) and edit one of the `packages.platforms` entries to match your created archive.
14+
- You can use either a `file://` url or [serve the files over HTTP locally](https://gist.github.com/willurd/5720255).
15+
- Add your modified `package_macchina_index.json` under Preferences and download your board with the Board Manager.
16+
17+
18+
## Upstream: ArduinoCore-sam
19+
This variant started as a fork of the `arduino_due_x` variant in [**ArduinoCore-sam**](https://github.com/arduino/ArduinoCore-sam). This was done in a way that preserves the ability to merge most upstream changes from the variant.
20+
21+
### Variant folder (`m2`)
22+
Running the following command from a branch in **ArduinoCore-sam** prepares that branch so it can be merged with the contents in [**macchina/sam/variants/m2**](https://github.com/adamvoss/Macchina_Arduino_Boards/tree/master/macchina/sam/variants/m2) folder. This should probably be done with some regularity, unless the variant has diverged sufficiently so merging is no longer useful.
23+
24+
```bash
25+
git filter-branch --prune-empty --subdirectory-filter variants/arduino_due_x/ -f
26+
```
27+
28+
### Platforms.txt / Boards.txt
29+
Summary: it will be best to update these files manually if upstream changes happen that would be relevant/beneficial.
30+
31+
These files change less frequently, are shorter, and would be a greater source of merge conflicts. To increase tidyness of the repository, they were included in such a way that it would not be easy to use git to merge changes from upstream (it remains possible, but would require `git replace`). Since the files change infrequently, checking for changes from time to time and integrating them should be feasible.
32+
33+
For completeness, here is the command to prepare an **ArduinoCore-sam** branch to match the structure needed for merging with this repository.
34+
35+
```bash
36+
git filter-branch \
37+
--force \
38+
--prune-empty \
39+
--index-filter '
40+
git ls-tree -z -r --name-only --full-tree $GIT_COMMIT \
41+
| grep -z -v "^boards.txt" \
42+
| grep -z -v "^platform.txt" \
43+
| grep -z -v "^programmers.txt" \
44+
| xargs -0 -r git rm -q --cached -r
45+
'
46+
47+
# Eliminate merge commits
48+
git rebase
49+
```

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Macchina Board files for Arduino IDE
22

3-
Note that this is a work-in-progress, so keep that in mind.
3+
Note that this is a work-in-progress, so please report any issues.
44

55
## Installation
66

77
Under "Preferences", in the "additional Boards Manager URLs" field, paste:
88

99
> https://macchina.github.io/package_macchina_index.json
1010
11-
Then select "Board Manager" under Tools -> Boards, and install "M2 by Macchina".
11+
Then select "Board Manager" under Tools -> Boards, and install "Macchina M2 by Macchina".
1212

1313
You should now have "Macchina M2" to in your Tools -> Boards menu in the Arduino IDE.
1414

@@ -18,9 +18,12 @@ You should now have "Macchina M2" to in your Tools -> Boards menu in the Arduino
1818
See: [variant.h](https://github.com/macchina/Macchina_Arduino_Boards/blob/master/variants/arduino_due_x/variant.h)
1919

2020
## Acknowledgments
21-
A big thank you to [@t_doust](https://forum.macchina.cc/u/t_doust) for putting together these files. The result is a much cleaner, easy to set up, and less confusing development experience.
21+
A big thank you to [@TDoust](https://github.com/TDoust) for initially putting together these files. The result is a much cleaner, easy to set up, and less confusing development experience.
2222

23-
[Adding custom (Zero based) boards to the Arduino IDE](https://forum.arduino.cc/index.php?topic=409715.0) has the instructions needed to create files needed by the "Boards Manager" feature of the Arduino IDE.
23+
## References
24+
The [Arduino IDE 3rd-party Hardware Specification](https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification) provides the guidelines on how the content is structured and what can be included.
25+
26+
The [Arduino IDE package_index.json format specification](https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.6.x-package_index.json-format-specification) contains the details for integrating with the Arduino Board Manager.
2427

2528
## Motivation
2629
If you select "Arduino Due (Native USB Port)" from the Tools -> Board menu in the Arduino IDE, you'd use this code:

0 commit comments

Comments
 (0)