Skip to content

Commit 8eeed95

Browse files
author
Mike Grusin
authored
Merge pull request #25 from sparkfun/LilyMini_testing
SAMD 1.4.0 release
2 parents 1f8f9a6 + 121bf67 commit 8eeed95

File tree

145 files changed

+18444
-594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+18444
-594
lines changed

IDE_Board_Manager/package_sparkfun_index.json

Lines changed: 632 additions & 542 deletions
Large diffs are not rendered by default.
283 KB
Binary file not shown.
1.11 MB
Binary file not shown.

README.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SparkFun Arduino Boards
22

3-
This repository contains support for the following SparkFun Arduino-compatible development boards:
3+
This repository contains support for the following SparkFun Arduino-compatible development boards.
4+
5+
**IMPORTANT NOTE:** These board files have been updated for compatibility with Arduino version 1.8 and higher. Some boards (e.g. SAMD) may not compile correctly with earlier versions of Arduino. If you need compatibility with earlier versions of Arduino, you can choose previous releases of these boards from the Boards Manager.
46

57
#### AVR Boards
68

@@ -21,43 +23,55 @@ This repository contains support for the following SparkFun Arduino-compatible d
2123

2224
* [SparkFun SAMD21 Dev Breakout](https://www.sparkfun.com/products/13672)
2325
* [SparkFun SAMD21 Mini Breakout](https://www.sparkfun.com/products/13664)
26+
* [SparkFun 9DoF Razor IMU M0 (SAMD21)](https://www.sparkfun.com/products/14001)
27+
* [SparkFun LilyMini ProtoSnap (SAMD11)](https://www.sparkfun.com/products/14063)
28+
* [SparkFun LilyMini (SAMD11)](https://www.sparkfun.com/products/14064)
2429

2530
#### ESP8266 Boards
2631

2732
* [ESP8266 Thing](https://www.sparkfun.com/products/13231)
2833
* [ESP8266 WiFi Shield](https://www.sparkfun.com/products/13287)
2934

30-
Each board will be added as an entry to the Arduino **Tools** > **Board** menu.
31-
32-
![Example image](example.png)
33-
3435
### Installation Instructions
3536

36-
To add board support for our products, go to **File** > **Preferences**, and paste this URL into the 'Additional Boards Manager URLs' input field:
37+
To add board support for our products, start Arduino and open the Preferences window (**File** > **Preferences**). Now copy and paste the following URL into the 'Additional Boards Manager URLs' input field:
3738

3839
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
3940

40-
![Adding a board manager list](https://cdn.sparkfun.com/assets/learn_tutorials/4/5/4/arduino-board-add.png)
41+
![Location of Additional Boards Manager URL input field](prefs-arrow.png)
42+
43+
If there is already an URL from another manufacturer in that field, click the button at the right end of the field. This will open an editing window allowing you to paste the above URL onto a new line.
44+
45+
### AVR and ESP Installation Instructions
4146

42-
This field can be found in 'Preferences...' under the Arduino File menu.
47+
Open the Boards Manager window by selecting **Tools** > **Board**, scroll to the top of the board list, and select **Boards Manager**.
4348

44-
Now, under the **Tools** > **Board** > **Boards Manager...**, if you type in "sparkfun", you will see an option to install board files for SparkFun Arduino compatible boards. Click "Install" to add these to your list.
49+
![Boards Manager Menu](manager-menu.png)
4550

46-
**NOTE: If you are using Arduino 1.6.6 and the link isn't working for you, change "https" at the beginning of the link to "http" and try again. We're working to figure out why this is happening in version 1.6.6.**
51+
If you type "sparkfun" (without quotes) into the "filter your search" field, you will see options to install SparkFun's AVR and ESP board files. Click in the desired box, and click the "Install" button that appears. Once installed, the boards will appear at the bottom of the board list.
4752

48-
![SparkFun Boards image](https://cdn.sparkfun.com/assets/learn_tutorials/4/5/4/sparkfun-arduino-board-install.png)
53+
![Sparkfun Boards](sparkfunboards.png)
4954

50-
Now, when you select the Boards list, you will see a collection of new boards for SparkFun.
55+
### SAMD Installation Instructions
5156

52-
![SparkFun Boards List](boards_list.png)
57+
When installing SAMD boards, you will need to first install Arduino SAMD support, then SparkFun's SAMD boards.
5358

54-
### Cleaning up the Boards Menu
59+
Open the Boards Manager window by selecting **Tools** > **Board**, scroll to the top of the board list, and select **Boards Manager**. Now type "samd" (without quotes) into the "filter your search" field at the top of the window. Two entries should show up, one for Arduino SAMD boards, and one for SparkFun SAMD boards. We'll install both of these, starting with Arduino SAMD boards.
5560

56-
Each entry in the boards list is defined in [boards.txt](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/boards.txt). If you want to de-clutter the menu, you can comment out a board by inserting a `#` at the beginning of each line.
61+
Click anywhere in the "Arduino SAMD Boards" box, and click "Install". This is a large installation and will take a while.
62+
63+
![Arduino SAMD Boards](manager-arrow.png)
64+
65+
Now click anywhere in the "SparkFun SAMD Boards" box, and click "Install". This is a small installation and will happen much faster.
66+
67+
![SparkFun SAMD Boards](manager-arrow2.png)
68+
69+
You're now ready to use SparkFun SAMD boards. They will appear at the bottom of the board list.
5770

5871
### Notes
5972

60-
* **Please note: This will only work under Arduino IDE versions 1.5 and up.**
61-
* Some boards such as the Pro Micro and the Mega Pro come in more than one form. For these **you must select the correct processor** in the 'Tools' menu.
73+
* Some boards such as the Arduino Pro and Pro Mini come in more than one flavor. For these **you must select the correct processor** in the 'Tools' menu.
6274
* Information on compiling and programming the bootloaders can be found in the bootloaders directory.
63-
* **Bugs introduced in the Arduino IDE version 1.6.6 through at least 1.6.9 produce errors indicating there is something wrong with these files. This can be resolved by reverting back to 1.6.5-r5. So far all reports seem to indicated that 1.6.10 has also fixed the issues. These intermittent issues are difficult to reliably reproduce.**
75+
76+
**Have fun!**<br>
77+
\-Your friends at SparkFun

SparkFunBoards.png

-15 KB
Binary file not shown.

boards_list.png

-51 KB
Binary file not shown.

example.png

-55 KB
Binary file not shown.

manager-arrow.png

69.3 KB
Loading

manager-arrow2.png

73.5 KB
Loading

manager-menu.png

54.4 KB
Loading

prefs-arrow.png

161 KB
Loading

sparkfun/avr/boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ digitalsandbox.build.mcu=atmega328p
220220
# Can run at less than 5V on battery, so run at only 8MHz
221221
digitalsandbox.build.f_cpu=8000000L
222222
digitalsandbox.build.core=arduino:arduino
223-
digitalsandbox.build.variant=arduino:standard
223+
digitalsandbox.build.variant=digitalsandbox
224224

225225

226226
################################################################################
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
/*
2+
pins_arduino.h - Pin definition functions for Arduino
3+
Part of Arduino - http://www.arduino.cc/
4+
5+
Copyright (c) 2007 David A. Mellis
6+
7+
This library is free software; you can redistribute it and/or
8+
modify it under the terms of the GNU Lesser General Public
9+
License as published by the Free Software Foundation; either
10+
version 2.1 of the License, or (at your option) any later version.
11+
12+
This library is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
Lesser General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General
18+
Public License along with this library; if not, write to the
19+
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20+
Boston, MA 02111-1307 USA
21+
*/
22+
23+
#ifndef Pins_Arduino_h
24+
#define Pins_Arduino_h
25+
26+
#include <avr/pgmspace.h>
27+
28+
#define NUM_DIGITAL_PINS 20
29+
#define NUM_ANALOG_INPUTS 6
30+
#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 14 : -1)
31+
32+
#if defined(__AVR_ATmega8__)
33+
#define digitalPinHasPWM(p) ((p) == 9 || (p) == 10 || (p) == 11)
34+
#else
35+
#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
36+
#endif
37+
38+
#define PIN_SPI_SS (10)
39+
#define PIN_SPI_MOSI (11)
40+
#define PIN_SPI_MISO (12)
41+
#define PIN_SPI_SCK (13)
42+
43+
static const uint8_t SS = PIN_SPI_SS;
44+
static const uint8_t MOSI = PIN_SPI_MOSI;
45+
static const uint8_t MISO = PIN_SPI_MISO;
46+
static const uint8_t SCK = PIN_SPI_SCK;
47+
48+
#define PIN_WIRE_SDA (18)
49+
#define PIN_WIRE_SCL (19)
50+
51+
static const uint8_t SDA = PIN_WIRE_SDA;
52+
static const uint8_t SCL = PIN_WIRE_SCL;
53+
54+
#define LED_BUILTIN 13
55+
56+
#define PIN_A0 (14)
57+
#define PIN_A1 (15)
58+
#define PIN_A2 (16)
59+
#define PIN_A3 (17)
60+
#define PIN_A4 (18)
61+
#define PIN_A5 (19)
62+
#define PIN_A6 (20)
63+
#define PIN_A7 (21)
64+
65+
static const uint8_t A0 = PIN_A0;
66+
static const uint8_t A1 = PIN_A1;
67+
static const uint8_t A2 = PIN_A2;
68+
static const uint8_t A3 = PIN_A3;
69+
static const uint8_t A4 = PIN_A4;
70+
static const uint8_t A5 = PIN_A5;
71+
static const uint8_t A6 = PIN_A6;
72+
static const uint8_t A7 = PIN_A7;
73+
74+
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0))
75+
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
76+
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
77+
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
78+
79+
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
80+
81+
#ifdef ARDUINO_MAIN
82+
83+
// On the Arduino board, digital pins are also used
84+
// for the analog output (software PWM). Analog input
85+
// pins are a separate set.
86+
87+
// ATMEL ATMEGA8 & 168 / ARDUINO
88+
//
89+
// +-\/-+
90+
// PC6 1| |28 PC5 (AI 5)
91+
// (D 0) PD0 2| |27 PC4 (AI 4)
92+
// (D 1) PD1 3| |26 PC3 (AI 3)
93+
// (D 2) PD2 4| |25 PC2 (AI 2)
94+
// PWM+ (D 3) PD3 5| |24 PC1 (AI 1)
95+
// (D 4) PD4 6| |23 PC0 (AI 0)
96+
// VCC 7| |22 GND
97+
// GND 8| |21 AREF
98+
// PB6 9| |20 AVCC
99+
// PB7 10| |19 PB5 (D 13)
100+
// PWM+ (D 5) PD5 11| |18 PB4 (D 12)
101+
// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
102+
// (D 7) PD7 13| |16 PB2 (D 10) PWM
103+
// (D 8) PB0 14| |15 PB1 (D 9) PWM
104+
// +----+
105+
//
106+
// (PWM+ indicates the additional PWM pins on the ATmega168.)
107+
108+
// ATMEL ATMEGA1280 / ARDUINO
109+
//
110+
// 0-7 PE0-PE7 works
111+
// 8-13 PB0-PB5 works
112+
// 14-21 PA0-PA7 works
113+
// 22-29 PH0-PH7 works
114+
// 30-35 PG5-PG0 works
115+
// 36-43 PC7-PC0 works
116+
// 44-51 PJ7-PJ0 works
117+
// 52-59 PL7-PL0 works
118+
// 60-67 PD7-PD0 works
119+
// A0-A7 PF0-PF7
120+
// A8-A15 PK0-PK7
121+
122+
123+
// these arrays map port names (e.g. port B) to the
124+
// appropriate addresses for various functions (e.g. reading
125+
// and writing)
126+
const uint16_t PROGMEM port_to_mode_PGM[] = {
127+
NOT_A_PORT,
128+
NOT_A_PORT,
129+
(uint16_t) &DDRB,
130+
(uint16_t) &DDRC,
131+
(uint16_t) &DDRD,
132+
};
133+
134+
const uint16_t PROGMEM port_to_output_PGM[] = {
135+
NOT_A_PORT,
136+
NOT_A_PORT,
137+
(uint16_t) &PORTB,
138+
(uint16_t) &PORTC,
139+
(uint16_t) &PORTD,
140+
};
141+
142+
const uint16_t PROGMEM port_to_input_PGM[] = {
143+
NOT_A_PORT,
144+
NOT_A_PORT,
145+
(uint16_t) &PINB,
146+
(uint16_t) &PINC,
147+
(uint16_t) &PIND,
148+
};
149+
150+
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
151+
PD, /* 0 */
152+
PD,
153+
PD,
154+
PD,
155+
PD,
156+
PD,
157+
PD,
158+
PD,
159+
PB, /* 8 */
160+
PB,
161+
PB,
162+
PB,
163+
PB,
164+
PB,
165+
PC, /* 14 */
166+
PC,
167+
PC,
168+
PC,
169+
PC,
170+
PC,
171+
};
172+
173+
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
174+
_BV(0), /* 0, port D */
175+
_BV(1),
176+
_BV(2),
177+
_BV(3),
178+
_BV(4),
179+
_BV(5),
180+
_BV(6),
181+
_BV(7),
182+
_BV(0), /* 8, port B */
183+
_BV(1),
184+
_BV(2),
185+
_BV(3),
186+
_BV(4),
187+
_BV(5),
188+
_BV(0), /* 14, port C */
189+
_BV(1),
190+
_BV(2),
191+
_BV(3),
192+
_BV(4),
193+
_BV(5),
194+
};
195+
196+
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
197+
NOT_ON_TIMER, /* 0 - port D */
198+
NOT_ON_TIMER,
199+
NOT_ON_TIMER,
200+
// on the ATmega168, digital pin 3 has hardware pwm
201+
#if defined(__AVR_ATmega8__)
202+
NOT_ON_TIMER,
203+
#else
204+
TIMER2B,
205+
#endif
206+
NOT_ON_TIMER,
207+
// on the ATmega168, digital pins 5 and 6 have hardware pwm
208+
#if defined(__AVR_ATmega8__)
209+
NOT_ON_TIMER,
210+
NOT_ON_TIMER,
211+
#else
212+
TIMER0B,
213+
TIMER0A,
214+
#endif
215+
NOT_ON_TIMER,
216+
NOT_ON_TIMER, /* 8 - port B */
217+
TIMER1A,
218+
TIMER1B,
219+
#if defined(__AVR_ATmega8__)
220+
TIMER2,
221+
#else
222+
TIMER2A,
223+
#endif
224+
NOT_ON_TIMER,
225+
NOT_ON_TIMER,
226+
NOT_ON_TIMER,
227+
NOT_ON_TIMER, /* 14 - port C */
228+
NOT_ON_TIMER,
229+
NOT_ON_TIMER,
230+
NOT_ON_TIMER,
231+
NOT_ON_TIMER,
232+
};
233+
234+
// Digital Sandbox specific functions
235+
236+
void initVariant() {
237+
238+
// Set pin 3 to be a low output to avoid heating up buzzer attached to expansion port
239+
240+
pinMode(3,OUTPUT);
241+
digitalWrite(3,LOW);
242+
}
243+
244+
#endif
245+
246+
// These serial port names are intended to allow libraries and architecture-neutral
247+
// sketches to automatically default to the correct port name for a particular type
248+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
249+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
250+
//
251+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
252+
//
253+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
254+
//
255+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
256+
//
257+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
258+
//
259+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
260+
// pins are NOT connected to anything by default.
261+
#define SERIAL_PORT_MONITOR Serial
262+
#define SERIAL_PORT_HARDWARE Serial
263+
264+
#endif
Binary file not shown.
Binary file not shown.
Binary file not shown.

sparkfun/samd/boards.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,34 @@ samd21_mini.build.pid=0x8D21
7070
samd21_mini.bootloader.tool=openocd
7171
samd21_mini.bootloader.file=zero/SparkFun_SAMD21_Dev.bin
7272

73+
LilyMini.name=LilyPad LilyMini
74+
LilyMini.vid.0=0x1B4F
75+
LilyMini.pid.0=0x0100
76+
LilyMini.vid.1=0x1B4F
77+
LilyMini.pid.1=0x0101
78+
LilyMini.upload.tool=bossac
79+
LilyMini.upload.protocol=sam-ba
80+
LilyMini.upload.maximum_size=12030
81+
LilyMini.upload.use_1200bps_touch=true
82+
LilyMini.upload.wait_for_upload_port=true
83+
LilyMini.upload.native_usb=true
84+
LilyMini.build.mcu=cortex-m0plus
85+
LilyMini.build.f_cpu=48000000L
86+
LilyMini.build.usb_product="SFE LILYMINI"
87+
LilyMini.build.usb_manufacturer="SparkFun"
88+
LilyMini.build.board=SAMD_ZERO
89+
LilyMini.build.core=lilymini
90+
LilyMini.build.extra_flags=-D__SAMD11D14AM__ {build.usb_flags}
91+
LilyMini.build.ldscript=linker_scripts/gcc/flash_with_4kbootloader.ld
92+
LilyMini.build.openocdscript=openocd_scripts/arduino_zero.cfg
93+
LilyMini.build.variant=SparkFun_LilyMini
94+
LilyMini.build.variant_system_lib=
95+
LilyMini.build.extra_combine_flags=
96+
LilyMini.build.vid=0x1B4F
97+
LilyMini.build.pid=0x0100
98+
LilyMini.bootloader.tool=openocd
99+
LilyMini.bootloader.file=LilyMini/samd11_sam_ba.bin
100+
73101
samd21_9dof.name=SparkFun 9DoF Razor IMU M0
74102
samd21_9dof.vid.0=0x1B4F
75103
samd21_9dof.pid.0=0x9D0E

0 commit comments

Comments
 (0)