Skip to content

Commit 0cca97c

Browse files
committed
Fixed bootloader compilation on Windows. Documentation updates.
1 parent 5712293 commit 0cca97c

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
1.6.8-beta-b2:
1+
1.6.8-beta-b2 (in-progress):
22
* Added more Serial, SPI, and WIRE options
33
* Added MicroSD card firmware loading in the bootloader
44
* Fixed SDU library to work with MattairTech boards
55
* Fixed auto-detection for Arduino Zero and M0 board variants
6+
* Fixed bootloader compilation on Windows
67
* Documentation updates
78
* Merged in changes from upstream SAMD CORE 1.6.15:
89
*

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ Analog Outputs | One 10-bit (two 12-bit on L21) | One 10-bit (two 12-bit on L21)
7272
PWM Outputs | 18 | 14 | 14 | 8 (6 for 14-pin)
7373
Interrupts | 16 | 16 | 16 | 8 (7 for 14-pin)
7474
USB | Full Speed Device and Host (not C21) | Full Speed Device and Host (not C21) | Full Speed Device and Host (not C21) | Full Speed Device
75-
SERCOM* | 6 | 6 | 4 | 3 (2 for 14-pin)
76-
UART (Serial)* | Up to 6 | Up to 6 | Up to 4 | Up to 2
75+
SERCOM* | 6 | 6 | 4 (6 for L21) | 3 (2 for 14-pin)
76+
UART (Serial)* | Up to 6 | Up to 6 | Up to 4 (up to 5 for L21) | Up to 2
7777
SPI* | Up to 3 | Up to 2 | Up to 2 | Up to 1
7878
I2C (WIRE)* | Up to 3 | Up to 2 | Up to 2 | Up to 1
7979
I2S | Present on the D21 only | Present on the D21 only | Present on the D21 only | Not present
@@ -306,6 +306,7 @@ TODO: more info
306306
* On the L21, SERCOM5 is in a low power domain. The Fm+ and HS modes of I2C (wire) are not supported.
307307
* The SAML and SAMC have double-buffered TCs, which are supported in the core.
308308
* The CHANGE and RISING interrupt modes on pin A31 do not seem to work properly on the L21.
309+
* When using pin A31 as UART RX, in Arduino, pinMode(31, INPUT_PULLUP) must be called before SerialX.begin().
309310
* The L21 has two performance levels that affect power consumption. During powerup, the L21 starts at the lowest performance level (PL0).
310311
The startup code changes to the highest performance level (PL2) in order to support 48MHz and USB (among other things).
311312
* Two Flash Wait States are inserted for the L21 and C21 (the D21/D11 use one wait state).
@@ -475,7 +476,7 @@ OS X support currently in beta (see below), the following instructions are only
475476
3. Click the button next to Additional Boards Manager URLs.
476477
4. Add https://www.mattairtech.com/software/arduino/package_MattairTech_index.json.
477478
5. Save preferences, then open the Boards Manager.
478-
6. Install the Arduino SAM M0+ Boards package. Use version 1.6.2 or higher.
479+
6. Install the Arduino SAMD Boards package. Use version 1.6.2 or higher.
479480
7. Install the MattairTech SAM M0+ Boards package.
480481
8. Close Boards Manager, then click Tools->Board->MattairTech MT-D21E (or MT-D11).
481482
9. Select the MCU with the now visible Tools->Microcontroller menu (if present).

bootloaders/zero/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ ifeq ($(OS),Windows_NT)
7474
ifeq ($(TERM),xterm)
7575
T=$(shell cygpath -u $(LOCALAPPDATA))
7676
MODULE_PATH?=$(T)/Arduino15/packages/$(CORE_VENDOR)
77+
MODULE_PATH_ARDUINO?=$(T)/Arduino15/packages/arduino
7778
RM=rm
7879
SEP=/
7980
else
8081
MODULE_PATH?=$(LOCALAPPDATA)/Arduino15/packages/$(CORE_VENDOR)
82+
MODULE_PATH_ARDUINO?=$(LOCALAPPDATA)/Arduino15/packages/arduino
8183
RM=rm
8284
SEP=\\
8385
endif
@@ -86,18 +88,20 @@ else
8688

8789
ifeq ($(UNAME_S),Linux)
8890
MODULE_PATH?=$(HOME)/.arduino15/packages/$(CORE_VENDOR)
91+
MODULE_PATH_ARDUINO?=$(HOME)/.arduino15/packages/arduino
8992
RM=rm
9093
SEP=/
9194
endif
9295

9396
ifeq ($(UNAME_S),Darwin)
9497
MODULE_PATH?=$(HOME)/Library/Arduino15/packages/$(CORE_VENDOR)/
98+
MODULE_PATH_ARDUINO?=$(HOME)/Library/Arduino15/packages/arduino/
9599
RM=rm
96100
SEP=/
97101
endif
98102
endif
99103

100-
ARM_GCC_PATH?=$(MODULE_PATH)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-
104+
ARM_GCC_PATH?=$(MODULE_PATH_ARDUINO)/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-
101105
BUILD_PATH=build
102106

103107
# -----------------------------------------------------------------------------
@@ -122,7 +126,7 @@ BIN=$(NAME).bin
122126
HEX=$(NAME).hex
123127

124128

125-
INCLUDES=-I"$(MODULE_PATH)/tools/CMSIS/4.5.0/CMSIS/Include/" -I"$(MODULE_PATH)/tools/CMSIS-Atmel/1.0.0-mattairtech-1/CMSIS/Device/ATMEL/"
129+
INCLUDES=-I"$(MODULE_PATH_ARDUINO)/tools/CMSIS/4.5.0/CMSIS/Include/" -I"$(MODULE_PATH)/tools/CMSIS-Atmel/1.0.0-mattairtech-1/CMSIS/Device/ATMEL/"
126130

127131
# -----------------------------------------------------------------------------
128132
# Linker options

bootloaders/zero/README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
11
# Arduino Zero Bootloader
22

3-
## Prerequisites for Building
4-
5-
The project build is based on Makefile system.
6-
Makefile is present at project root and try to handle multi-platform cases.
3+
This bootloader is based on the Arduino Zero bootloader which is a part of the Arduino SAMD core.
4+
It provides a USB-CDC and/or TTL serial communications interface to a host running the bossac
5+
command-line firmware programming utility (or Bossa with a GUI). This version adds support for
6+
the L21 and C21 microcontrollers. It also adds support for four different clock sources (2 external
7+
crystals and two internal oscillator options). There are additional boards added, and binaries for
8+
most board/chip combinations are pre-built. Additionally, MicroSD firmware loading is supported.
79

8-
Multi-plaform GCC is provided by ARM here: https://launchpad.net/gcc-arm-embedded/+download
910

10-
Atmel Studio contains both make and ARM GCC toolchain. You don't need to install them in this specific use case.
11-
12-
For all builds and platforms you will need to have the Arduino IDE installed and the board support
13-
package for "Arduino SAMD Boards (32-bits ARM Cortex-M0+)". You can install the latter
14-
from the former's "Boards Manager" UI.
11+
## Prerequisites for Using
1512

1613
This version of the bootloader requires bossac (1.7.0-mattairtech-1)
1714
from the package "MattairTech SAM M0+ Boards" or download bossac directly:
1815
* https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-1-mingw32.tar.gz (Windows 32 bit and 64 bit)
1916
* https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-1-x86_64-linux-gnu.tar.gz (Linux 64 bit)
2017
* https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-1-i686-linux-gnu.tar.gz (Linux 32 bit)
2118
* https://www.mattairtech.com/software/arduino/bossac-1.7.0-mattairtech-1-x86_64-apple-darwin.tar.gz (OS X 64 bit)
19+
Note that the SAM-BA tools from Atmel will not work, and the version of bossac from the Arduino
20+
SAMD Core currently does not support the L21, C21, or D11 (but it does support the D21).
21+
22+
23+
## Prerequisites for Building
24+
25+
For all builds and platforms you will need to have the Arduino IDE installed as well as the packages
26+
for both Arduino SAMD Boards and for MattairTech SAM M0+ Boards, which provides the needed dependencies
27+
(CMSIS, CMSIS-Atmel, and the compiler toolchain: arm-none-eabi-gcc), which can be installed using the
28+
Arduino IDE Boards Manager. This project uses a Makefile, which is present in the root (zero) directory.
29+
However, you will need a make program:
2230

2331
### Windows
2432

2533
* Native command line
2634
Make binary can be obtained here: http://gnuwin32.sourceforge.net/packages/make.htm
35+
Be sure that no other version of make is in your PATH (ie: MinGW).
2736

2837
* Cygwin/MSys/MSys2/Babun/etc...
2938
It is available natively in all distributions.
3039

31-
* Atmel Studio
32-
An Atmel Studio **7** Makefile-based project is present at project root, just open samd21_sam_ba.atsln file in AS7.
33-
3440
### Linux
3541

3642
Make is usually available by default.

0 commit comments

Comments
 (0)