Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f45af9b
Initial commit, working in-situ, needs cleanup & packaging
Dec 13, 2016
1d5ef77
lilymini testing branch initiial commit (alpha)
Dec 22, 2016
025e5e7
Update json
Dec 22, 2016
b4d4996
So picky about commas
Dec 22, 2016
11aa906
debugging
Dec 22, 2016
b79dee4
debugging
Dec 22, 2016
a857c13
Debugging
Dec 22, 2016
8cb1189
More debugging
Dec 22, 2016
4da33e6
Guess what? More debugging!
Dec 22, 2016
0128750
Guess who? Debugging!
Dec 22, 2016
69309c0
Changed version to 1.4.0 to avoid collisions
Dec 22, 2016
f18f572
They see me debugging, they hating,
Dec 22, 2016
fbb157a
Bugging
Dec 23, 2016
43e3b1e
You know.
Dec 23, 2016
aea8a39
Fixes to variant.cpp and variant.h
Jan 9, 2017
03f4aa0
Update 1.4.0 incorporating 1.3.x additions
Jan 9, 2017
f7f0fba
Fix SHA formatting
Jan 9, 2017
c29f968
Interim commit
Mar 20, 2017
c35df4b
1.8.1 Candidate
Mar 20, 2017
2eada83
Minor update
Mar 20, 2017
d66a8e4
Minor update
Mar 20, 2017
0176baf
Minor update
Mar 20, 2017
f4b617c
Fix OSX Bossac
Mar 21, 2017
6e18956
Fixed slash direction in linker command
Mar 21, 2017
f74d23d
Revert to previous windows driver
Mar 21, 2017
1adff9d
Trying different windows driver
Mar 21, 2017
d4288ae
Fixed analog out bug
Mar 22, 2017
0e6002e
AVR boards V 1.1.6
Apr 10, 2017
6216d52
AVR boards 1.1.6 (added variant for Digital Sandbox)
Apr 10, 2017
ae8bb04
AVR boards 1.1.6 (Digital Sandbox variant)
Apr 10, 2017
0cbde52
AVR boards 1.1.6 (add Digital Sandbox variant)
Apr 10, 2017
518ce47
1.4.0 Release
Jun 22, 2017
588a62d
Image fix
Jun 22, 2017
390dccd
Image fix
Jun 22, 2017
1d3fda8
Minor syntax
Jun 22, 2017
a5ddc45
Minor syntax
Jun 22, 2017
9d7a5a1
Minor syntax
Jun 22, 2017
121bf67
Merge branch 'master' into LilyMini_testing
Jun 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,174 changes: 632 additions & 542 deletions IDE_Board_Manager/package_sparkfun_index.json

Large diffs are not rendered by default.

Binary file added IDE_Board_Manager/sparkfun-samd-1.4.0.tar.bz2
Binary file not shown.
Binary file added IDE_Board_Manager/sparkfunboards.1.1.6.tar.bz2
Binary file not shown.
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# SparkFun Arduino Boards

This repository contains support for the following SparkFun Arduino-compatible development boards:
This repository contains support for the following SparkFun Arduino-compatible development boards.

**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.

#### AVR Boards

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

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

#### ESP8266 Boards

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

Each board will be added as an entry to the Arduino **Tools** > **Board** menu.

![Example image](example.png)

### Installation Instructions

To add board support for our products, go to **File** > **Preferences**, and paste this URL into the 'Additional Boards Manager URLs' input field:
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:

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

![Adding a board manager list](https://cdn.sparkfun.com/assets/learn_tutorials/4/5/4/arduino-board-add.png)
![Location of Additional Boards Manager URL input field](prefs-arrow.png)

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.

### AVR and ESP Installation Instructions

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

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.
![Boards Manager Menu](manager-menu.png)

**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.**
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.

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

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

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

### Cleaning up the Boards Menu
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.

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.
Click anywhere in the "Arduino SAMD Boards" box, and click "Install". This is a large installation and will take a while.

![Arduino SAMD Boards](manager-arrow.png)

Now click anywhere in the "SparkFun SAMD Boards" box, and click "Install". This is a small installation and will happen much faster.

![SparkFun SAMD Boards](manager-arrow2.png)

You're now ready to use SparkFun SAMD boards. They will appear at the bottom of the board list.

### Notes

* **Please note: This will only work under Arduino IDE versions 1.5 and up.**
* 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.
* 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.
* Information on compiling and programming the bootloaders can be found in the bootloaders directory.
* **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.**

**Have fun!**<br>
\-Your friends at SparkFun
Binary file removed SparkFunBoards.png
Binary file not shown.
Binary file removed boards_list.png
Binary file not shown.
Binary file removed example.png
Binary file not shown.
Binary file added manager-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added manager-arrow2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added manager-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added prefs-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sparkfun/avr/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ digitalsandbox.build.mcu=atmega328p
# Can run at less than 5V on battery, so run at only 8MHz
digitalsandbox.build.f_cpu=8000000L
digitalsandbox.build.core=arduino:arduino
digitalsandbox.build.variant=arduino:standard
digitalsandbox.build.variant=digitalsandbox


################################################################################
Expand Down
264 changes: 264 additions & 0 deletions sparkfun/avr/variants/digitalsandbox/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/

Copyright (c) 2007 David A. Mellis

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
*/

#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <avr/pgmspace.h>

#define NUM_DIGITAL_PINS 20
#define NUM_ANALOG_INPUTS 6
#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 14 : -1)

#if defined(__AVR_ATmega8__)
#define digitalPinHasPWM(p) ((p) == 9 || (p) == 10 || (p) == 11)
#else
#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
#endif

#define PIN_SPI_SS (10)
#define PIN_SPI_MOSI (11)
#define PIN_SPI_MISO (12)
#define PIN_SPI_SCK (13)

static const uint8_t SS = PIN_SPI_SS;
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;

#define PIN_WIRE_SDA (18)
#define PIN_WIRE_SCL (19)

static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 13

#define PIN_A0 (14)
#define PIN_A1 (15)
#define PIN_A2 (16)
#define PIN_A3 (17)
#define PIN_A4 (18)
#define PIN_A5 (19)
#define PIN_A6 (20)
#define PIN_A7 (21)

static const uint8_t A0 = PIN_A0;
static const uint8_t A1 = PIN_A1;
static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;
static const uint8_t A4 = PIN_A4;
static const uint8_t A5 = PIN_A5;
static const uint8_t A6 = PIN_A6;
static const uint8_t A7 = PIN_A7;

#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))

#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))

#ifdef ARDUINO_MAIN

// On the Arduino board, digital pins are also used
// for the analog output (software PWM). Analog input
// pins are a separate set.

// ATMEL ATMEGA8 & 168 / ARDUINO
//
// +-\/-+
// PC6 1| |28 PC5 (AI 5)
// (D 0) PD0 2| |27 PC4 (AI 4)
// (D 1) PD1 3| |26 PC3 (AI 3)
// (D 2) PD2 4| |25 PC2 (AI 2)
// PWM+ (D 3) PD3 5| |24 PC1 (AI 1)
// (D 4) PD4 6| |23 PC0 (AI 0)
// VCC 7| |22 GND
// GND 8| |21 AREF
// PB6 9| |20 AVCC
// PB7 10| |19 PB5 (D 13)
// PWM+ (D 5) PD5 11| |18 PB4 (D 12)
// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
// (D 7) PD7 13| |16 PB2 (D 10) PWM
// (D 8) PB0 14| |15 PB1 (D 9) PWM
// +----+
//
// (PWM+ indicates the additional PWM pins on the ATmega168.)

// ATMEL ATMEGA1280 / ARDUINO
//
// 0-7 PE0-PE7 works
// 8-13 PB0-PB5 works
// 14-21 PA0-PA7 works
// 22-29 PH0-PH7 works
// 30-35 PG5-PG0 works
// 36-43 PC7-PC0 works
// 44-51 PJ7-PJ0 works
// 52-59 PL7-PL0 works
// 60-67 PD7-PD0 works
// A0-A7 PF0-PF7
// A8-A15 PK0-PK7


// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
};

const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
};

const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
};

const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PD, /* 0 */
PD,
PD,
PD,
PD,
PD,
PD,
PD,
PB, /* 8 */
PB,
PB,
PB,
PB,
PB,
PC, /* 14 */
PC,
PC,
PC,
PC,
PC,
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(0), /* 0, port D */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(6),
_BV(7),
_BV(0), /* 8, port B */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(0), /* 14, port C */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
};

const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER, /* 0 - port D */
NOT_ON_TIMER,
NOT_ON_TIMER,
// on the ATmega168, digital pin 3 has hardware pwm
#if defined(__AVR_ATmega8__)
NOT_ON_TIMER,
#else
TIMER2B,
#endif
NOT_ON_TIMER,
// on the ATmega168, digital pins 5 and 6 have hardware pwm
#if defined(__AVR_ATmega8__)
NOT_ON_TIMER,
NOT_ON_TIMER,
#else
TIMER0B,
TIMER0A,
#endif
NOT_ON_TIMER,
NOT_ON_TIMER, /* 8 - port B */
TIMER1A,
TIMER1B,
#if defined(__AVR_ATmega8__)
TIMER2,
#else
TIMER2A,
#endif
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER, /* 14 - port C */
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
};

// Digital Sandbox specific functions

void initVariant() {

// Set pin 3 to be a low output to avoid heating up buzzer attached to expansion port

pinMode(3,OUTPUT);
digitalWrite(3,LOW);
}

#endif

// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE Serial

#endif
Binary file not shown.
Binary file not shown.
Binary file added sparkfun/samd-tools/bossac/bossac-1.4.0-win.zip
Binary file not shown.
28 changes: 28 additions & 0 deletions sparkfun/samd/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,34 @@ samd21_mini.build.pid=0x8D21
samd21_mini.bootloader.tool=openocd
samd21_mini.bootloader.file=zero/SparkFun_SAMD21_Dev.bin

LilyMini.name=LilyPad LilyMini
LilyMini.vid.0=0x1B4F
LilyMini.pid.0=0x0100
LilyMini.vid.1=0x1B4F
LilyMini.pid.1=0x0101
LilyMini.upload.tool=bossac
LilyMini.upload.protocol=sam-ba
LilyMini.upload.maximum_size=12030
LilyMini.upload.use_1200bps_touch=true
LilyMini.upload.wait_for_upload_port=true
LilyMini.upload.native_usb=true
LilyMini.build.mcu=cortex-m0plus
LilyMini.build.f_cpu=48000000L
LilyMini.build.usb_product="SFE LILYMINI"
LilyMini.build.usb_manufacturer="SparkFun"
LilyMini.build.board=SAMD_ZERO
LilyMini.build.core=lilymini
LilyMini.build.extra_flags=-D__SAMD11D14AM__ {build.usb_flags}
LilyMini.build.ldscript=linker_scripts/gcc/flash_with_4kbootloader.ld
LilyMini.build.openocdscript=openocd_scripts/arduino_zero.cfg
LilyMini.build.variant=SparkFun_LilyMini
LilyMini.build.variant_system_lib=
LilyMini.build.extra_combine_flags=
LilyMini.build.vid=0x1B4F
LilyMini.build.pid=0x0100
LilyMini.bootloader.tool=openocd
LilyMini.bootloader.file=LilyMini/samd11_sam_ba.bin

samd21_9dof.name=SparkFun 9DoF Razor IMU M0
samd21_9dof.vid.0=0x1B4F
samd21_9dof.pid.0=0x9D0E
Expand Down
Binary file not shown.
Loading