Skip to content

Commit 03f4aa0

Browse files
author
Mike Grusin
committed
Update 1.4.0 incorporating 1.3.x additions
1 parent aea8a39 commit 03f4aa0

File tree

119 files changed

+10160
-8816
lines changed

Some content is hidden

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

119 files changed

+10160
-8816
lines changed

IDE_Board_Manager/package_sparkfun_index.json

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,62 @@
180180
{
181181
"name": "SparkFun SAMD Boards (dependency: Arduino SAMD Boards 1.6.8)",
182182
"architecture": "samd",
183+
"version": "1.3.0",
184+
"category": "Contributed",
185+
"url": "https://github.com/sparkfun/Arduino_Boards/raw/master/IDE_Board_Manager/sparkfun-samd-1.3.0.tar.bz2",
186+
"archiveFileName": "sparkfun-samd-1.3.0.tar.bz2",
187+
"checksum": "SHA-256:87695137f303000099e7e6d3fae3e87d5882ed999e4c14403c65cf51a4d6a6be",
188+
"size": "195440",
189+
"help": {
190+
"online": "https://forums.sparkfun.com"
191+
},
192+
"boards": [
193+
{
194+
"name": "SparkFun SAMD21 Mini Breakout"
195+
},
196+
{
197+
"name": "SparkFun SAMD21 Dev Breakout"
198+
},
199+
{
200+
"name": "SparkFun 9DoF Razor IMU M0"
201+
}
202+
],
203+
"toolsDependencies": []
204+
},
205+
{
206+
"name": "SparkFun SAMD Boards (dependency: Arduino SAMD Boards 1.6.9)",
207+
"architecture": "samd",
208+
"version": "1.3.2",
209+
"category": "Contributed",
210+
"url": "https://github.com/sparkfun/Arduino_Boards/raw/master/IDE_Board_Manager/sparkfun-samd-1.3.2.tar.bz2",
211+
"archiveFileName": "sparkfun-samd-1.3.2.tar.bz2",
212+
"checksum": "SHA-256:eb4274a3df4c6c4dbc1396600b1efc9cd9454e5be4880530ff87ba4fb3e6216a",
213+
"size": "206253",
214+
"help": {
215+
"online": "https://forums.sparkfun.com"
216+
},
217+
"boards": [
218+
{
219+
"name": "SparkFun SAMD21 Mini Breakout"
220+
},
221+
{
222+
"name": "SparkFun SAMD21 Dev Breakout"
223+
},
224+
{
225+
"name": "SparkFun 9DoF Razor IMU M0"
226+
}
227+
],
228+
"toolsDependencies": []
229+
},
230+
{
231+
"name": "SparkFun SAMD Boards (dependency: Arduino SAMD Boards 1.6.9)",
232+
"architecture": "samd",
183233
"version": "1.4.0",
184234
"category": "Contributed",
185235
"url": "https://github.com/sparkfun/Arduino_Boards/raw/LilyMini_testing/IDE_Board_Manager/sparkfun-samd-1.4.0.tar.bz2",
186236
"archiveFileName": "sparkfun-samd-1.4.0.tar.bz2",
187-
"checksum": "SHA-256:488B086A783A91CA5EB6C6B7BBC1AD1C84E0B522562B8AC1E560A1169684564F",
188-
"size": "349612",
237+
"checksum": "SHA256: B11E88EECFC04DAF8516BA26109BAE9D743B83C69199C17BB36529413E60CAA4",
238+
"size": "248649",
189239
"help": {
190240
"online": "https://forums.sparkfun.com"
191241
},
@@ -197,16 +247,19 @@
197247
"name": "SparkFun SAMD21 Dev Breakout"
198248
},
199249
{
200-
"name": "SparkFun LilyMini (SAMD11)"
250+
"name": "SparkFun 9DoF Razor IMU M0"
251+
},
252+
{
253+
"name": "SparkFun LilyMini"
201254
}
202255
],
203256
"toolsDependencies": [
204-
{
205-
"packager": "SparkFun",
206-
"name": "bossac",
207-
"version": "1.4.0"
208-
}
209-
]
257+
{
258+
"packager": "SparkFun",
259+
"name": "bossac",
260+
"version": "1.4.0"
261+
}
262+
]
210263
}
211264
],
212265
"tools": [
191 KB
Binary file not shown.
201 KB
Binary file not shown.
-98.6 KB
Binary file not shown.

sparkfun/samd/boards.txt

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ samd21_dev.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
3636
samd21_dev.build.openocdscript=openocd_scripts/arduino_zero.cfg
3737
samd21_dev.build.variant=arduino_zero
3838
samd21_dev.build.variant_system_lib=
39+
samd21_dev.build.extra_combine_flags=
3940
samd21_dev.build.vid=0x1B4F
4041
samd21_dev.build.pid=0x8D21
4142
samd21_dev.bootloader.tool=openocd
42-
samd21_dev.bootloader.file=zero/samd21_sam_ba.bin
43+
samd21_dev.bootloader.file=zero/SparkFun_SAMD21_Dev.bin
4344

4445
samd21_mini.name=SparkFun SAMD21 Mini Breakout
4546
samd21_mini.vid.0=0x1B4F
@@ -63,10 +64,40 @@ samd21_mini.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
6364
samd21_mini.build.openocdscript=openocd_scripts/arduino_zero.cfg
6465
samd21_mini.build.variant=SparkFun_SAMD_Mini
6566
samd21_mini.build.variant_system_lib=
67+
samd21_mini.build.extra_combine_flags=
6668
samd21_mini.build.vid=0x1B4F
6769
samd21_mini.build.pid=0x8D21
6870
samd21_mini.bootloader.tool=openocd
69-
samd21_mini.bootloader.file=zero/samd21_sam_ba.bin
71+
samd21_mini.bootloader.file=zero/SparkFun_SAMD21_Dev.bin
72+
73+
samd21_9dof.name=SparkFun 9DoF Razor IMU M0
74+
samd21_9dof.vid.0=0x1B4F
75+
samd21_9dof.pid.0=0x9D0E
76+
samd21_9dof.vid.1=0x1B4F
77+
samd21_9dof.pid.1=0x9D0F
78+
samd21_9dof.upload.tool=bossac
79+
samd21_9dof.upload.protocol=sam-ba
80+
samd21_9dof.upload.maximum_size=262144
81+
samd21_9dof.upload.use_1200bps_touch=true
82+
samd21_9dof.upload.wait_for_upload_port=true
83+
samd21_9dof.upload.native_usb=true
84+
samd21_9dof.build.mcu=cortex-m0plus
85+
samd21_9dof.build.f_cpu=48000000L
86+
samd21_9dof.build.usb_product="SFE 9DOF-D21"
87+
samd21_9dof.build.usb_manufacturer="SparkFun"
88+
samd21_9dof.build.board=SAMD_ZERO
89+
samd21_9dof.build.core=arduino
90+
samd21_9dof.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags}
91+
samd21_9dof.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
92+
samd21_9dof.build.openocdscript=openocd_scripts/arduino_zero.cfg
93+
samd21_9dof.build.variant=SparkFun_9DoF_M0
94+
samd21_9dof.build.variant_system_lib=
95+
#samd21_9dof.build.extra_combine_flags="{build.variant.path}/lib/invensense_mpl_6.12/liblibmplmpu.a"
96+
samd21_9dof.build.extra_combine_flags=
97+
samd21_9dof.build.vid=0x1B4F
98+
samd21_9dof.build.pid=0x9D0F
99+
samd21_9dof.bootloader.tool=openocd
100+
samd21_9dof.bootloader.file=zero/SparkFun_9DoF_Razor_M0.bin
70101

71102
LilyMini.name=SparkFun LilyMini
72103
LilyMini.vid.0=0x1B4F
@@ -95,5 +126,3 @@ LilyMini.build.vid=0x1B4F
95126
LilyMini.build.pid=0x0100
96127
LilyMini.bootloader.tool=openocd
97128
LilyMini.bootloader.file=LilyMini/samd11_sam_ba.bin
98-
99-
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# Copyright (c) 2015 Atmel Corporation/Thibaut VIARD. All right reserved.
2+
# Copyright (c) 2015 Arduino LLC. All right reserved.
3+
#
4+
# This library is free software; you can redistribute it and/or
5+
# modify it under the terms of the GNU Lesser General Public
6+
# License as published by the Free Software Foundation; either
7+
# version 2.1 of the License, or (at your option) any later version.
8+
#
9+
# This library is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12+
# See the GNU Lesser General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Lesser General Public
15+
# License along with this library; if not, write to the Free Software
16+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
18+
# -----------------------------------------------------------------------------
19+
# Boards definitions
20+
BOARD_ID?=LilyMini
21+
NAME?=samd11_sam_ba
22+
MCU?=__SAMD11D14AM__
23+
LINKER_SCRIPT?=bootloader4k_samd11.ld
24+
25+
# -----------------------------------------------------------------------------
26+
# Paths
27+
ifeq ($(OS),Windows_NT)
28+
# Are we using mingw/msys/msys2/cygwin?
29+
ifeq ($(TERM),xterm)
30+
T=$(shell cygpath -u $(LOCALAPPDATA))
31+
MODULE_PATH?=$(T)/Arduino15/packages/arduino
32+
RM=rm
33+
SEP=/
34+
else
35+
MODULE_PATH?=$(LOCALAPPDATA)/Arduino15/packages/arduino
36+
RM=rm
37+
SEP=\\
38+
endif
39+
else
40+
UNAME_S := $(shell uname -s)
41+
42+
ifeq ($(UNAME_S),Linux)
43+
MODULE_PATH?=$(HOME)/.arduino15/packages/arduino
44+
RM=rm
45+
SEP=/
46+
endif
47+
48+
ifeq ($(UNAME_S),Darwin)
49+
MODULE_PATH?=$(HOME)/Library/Arduino15/packages/arduino/
50+
RM=rm
51+
SEP=/
52+
endif
53+
endif
54+
55+
ARM_GCC_PATH?=$(MODULE_PATH)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-
56+
BUILD_PATH=build
57+
58+
# -----------------------------------------------------------------------------
59+
# Tools
60+
CC=$(ARM_GCC_PATH)gcc
61+
OBJCOPY=$(ARM_GCC_PATH)objcopy
62+
NM=$(ARM_GCC_PATH)nm
63+
SIZE=$(ARM_GCC_PATH)size
64+
65+
# -----------------------------------------------------------------------------
66+
# Compiler options
67+
CFLAGS_EXTRA=-D__SAMD11D14AM__ -DBOARD_ID_$(BOARD_ID)
68+
CFLAGS=-mthumb -mcpu=cortex-m0plus -Wall -c -std=gnu99 -ffunction-sections -fdata-sections -nostdlib -nostartfiles --param max-inline-insns-single=500
69+
ifdef DEBUG
70+
CFLAGS+=-g3 -O1 -DDEBUG=1
71+
else
72+
CFLAGS+=-Os -DDEBUG=0
73+
endif
74+
75+
ELF=$(NAME).elf
76+
BIN=$(NAME).bin
77+
HEX=$(NAME).hex
78+
79+
INCLUDES=-I"$(MODULE_PATH)/tools/CMSIS/4.0.0-atmel/CMSIS/Include/" -I"$(MODULE_PATH)/tools/CMSIS/4.0.0-atmel/Device/ATMEL/"
80+
81+
# -----------------------------------------------------------------------------
82+
# Linker options
83+
LDFLAGS=-mthumb -mcpu=cortex-m0plus -Wall -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all
84+
LDFLAGS+=-Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols --specs=nano.specs --specs=nosys.specs
85+
86+
# -----------------------------------------------------------------------------
87+
# Source files and objects
88+
SOURCES= \
89+
board_driver_led.c \
90+
board_driver_usb.c \
91+
board_init.c \
92+
board_startup.c \
93+
main.c \
94+
sam_ba_usb.c \
95+
sam_ba_cdc.c \
96+
sam_ba_monitor.c
97+
98+
#SOURCES= \
99+
# board_driver_led.c \
100+
# board_driver_serial.c \
101+
# board_driver_usb.c \
102+
# board_init.c \
103+
# board_startup.c \
104+
# main.c \
105+
# sam_ba_usb.c \
106+
# sam_ba_cdc.c \
107+
# sam_ba_monitor.c \
108+
# sam_ba_serial.c
109+
110+
OBJECTS=$(addprefix $(BUILD_PATH)/, $(SOURCES:.c=.o))
111+
DEPS=$(addprefix $(BUILD_PATH)/, $(SOURCES:.c=.d))
112+
113+
ifneq "test$(AVRSTUDIO_EXE_PATH)" "test"
114+
AS_BUILD=copy_for_atmel_studio
115+
AS_CLEAN=clean_for_atmel_studio
116+
else
117+
AS_BUILD=
118+
AS_CLEAN=
119+
endif
120+
121+
all: print_info $(SOURCES) $(BIN) $(HEX) $(AS_BUILD)
122+
123+
$(ELF): Makefile $(BUILD_PATH) $(OBJECTS)
124+
@echo ----------------------------------------------------------
125+
@echo Creating ELF binary
126+
"$(CC)" -L. -L$(BUILD_PATH) $(LDFLAGS) -Os -Wl,--gc-sections -save-temps -T$(LINKER_SCRIPT) -Wl,-Map,"$(BUILD_PATH)/$(NAME).map" -o "$(BUILD_PATH)/$(ELF)" -Wl,--start-group $(OBJECTS) -lm -Wl,--end-group
127+
"$(NM)" "$(BUILD_PATH)/$(ELF)" >"$(BUILD_PATH)/$(NAME)_symbols.txt"
128+
"$(SIZE)" --format=sysv -t -x $(BUILD_PATH)/$(ELF)
129+
130+
$(BIN): $(ELF)
131+
@echo ----------------------------------------------------------
132+
@echo Creating flash binary
133+
"$(OBJCOPY)" -O binary $(BUILD_PATH)/$< $@
134+
135+
$(HEX): $(ELF)
136+
@echo ----------------------------------------------------------
137+
@echo Creating flash binary
138+
"$(OBJCOPY)" -O ihex $(BUILD_PATH)/$< $@
139+
140+
$(BUILD_PATH)/%.o: %.c
141+
@echo ----------------------------------------------------------
142+
@echo Compiling $< to $@
143+
"$(CC)" $(CFLAGS) $(CFLAGS_EXTRA) $(INCLUDES) $< -o $@
144+
@echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
145+
146+
$(BUILD_PATH):
147+
@echo ----------------------------------------------------------
148+
@echo Creating build folder
149+
-mkdir $(BUILD_PATH)
150+
151+
print_info:
152+
@echo ----------------------------------------------------------
153+
@echo Compiling bootloader using
154+
@echo BASE PATH = $(MODULE_PATH)
155+
@echo GCC PATH = $(ARM_GCC_PATH)
156+
@echo OS = $(OS)
157+
@echo SHELL = $(SHELL)
158+
@echo TERM = $(TERM)
159+
"$(CC)" -v
160+
# env
161+
162+
copy_for_atmel_studio: $(BIN) $(HEX)
163+
@echo ----------------------------------------------------------
164+
@echo Atmel Studio detected, copying ELF to project root for debug
165+
cp $(BUILD_PATH)/$(ELF) .
166+
167+
clean_for_atmel_studio:
168+
@echo ----------------------------------------------------------
169+
@echo Atmel Studio detected, cleaning ELF from project root
170+
-$(RM) ./$(ELF)
171+
172+
clean: $(AS_CLEAN)
173+
@echo ----------------------------------------------------------
174+
@echo Cleaning project
175+
-$(RM) $(BIN)
176+
-$(RM) $(HEX)
177+
-$(RM) $(BUILD_PATH)/*.*
178+
-rmdir $(BUILD_PATH)
179+
180+
.phony: print_info $(BUILD_PATH)

0 commit comments

Comments
 (0)