Skip to content

Commit a3ac43f

Browse files
Wojciech Dubowiksandeepmistry
authored andcommitted
Add Seeed Studio Arch Link support
[[http://wiki.seeedstudio.com/Arch_Link/]] Signed-off-by: Wojciech Dubowik <[email protected]>
1 parent 9d6b784 commit a3ac43f

File tree

6 files changed

+219
-0
lines changed

6 files changed

+219
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ script:
3939
- buildExampleSketch sandeepmistry:nRF5:hackaBLE 01.Basics Blink
4040
- buildExampleSketch sandeepmistry:nRF5:Sinobit 01.Basics BareMinimum
4141
- buildExampleSketch sandeepmistry:nRF5:DWM1001-DEV 01.Basics Blink
42+
- buildExampleSketch sandeepmistry:nRF5:SeeedArchLink 01.Basics Blink

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
108108
* [ng-beacon](https://github.com/urish/ng-beacon)
109109
* [TinyBLE](https://www.seeedstudio.com/Seeed-Tiny-BLE-BLE-%2B-6DOF-Mbed-Platform-p-2268.html)
110110
* [Sino:bit](http://sinobit.org)
111+
* [SeeedArchLink](http://wiki.seeedstudio.com/Arch_Link/)
111112

112113
## Installing
113114

boards.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,3 +948,43 @@ DWM1001-DEV.menu.softdevice.s132.softdeviceversion=2.0.1
948948
DWM1001-DEV.menu.softdevice.s132.upload.maximum_size=409600
949949
DWM1001-DEV.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
950950
DWM1001-DEV.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld
951+
952+
SeeedArchLink.name=Seeed Arch Link
953+
954+
SeeedArchLink.upload.tool=sandeepmistry:openocd
955+
SeeedArchLink.upload.target=nrf51
956+
SeeedArchLink.upload.protocol=cmsis-dap
957+
SeeedArchLink.upload.maximum_size=262144
958+
959+
SeeedArchLink.bootloader.tool=sandeepmistry:openocd
960+
961+
SeeedArchLink.build.mcu=cortex-m0
962+
SeeedArchLink.build.f_cpu=16000000
963+
SeeedArchLink.build.board=ARCHLINK
964+
SeeedArchLink.build.core=nRF5
965+
SeeedArchLink.build.variant=SeeedArchLink
966+
SeeedArchLink.build.variant_system_lib=
967+
SeeedArchLink.build.extra_flags=-DNRF51
968+
SeeedArchLink.build.float_flags=
969+
SeeedArchLink.build.ldscript=nrf51_xxaa.ld
970+
971+
SeeedArchLink.build.lfclk_flags=-DUSE_LFXO
972+
973+
SeeedArchLink.menu.softdevice.none=None
974+
SeeedArchLink.menu.softdevice.none.softdevice=none
975+
SeeedArchLink.menu.softdevice.none.softdeviceversion=
976+
977+
SeeedArchLink.menu.softdevice.s110=S110
978+
SeeedArchLink.menu.softdevice.s110.softdevice=s110
979+
SeeedArchLink.menu.softdevice.s110.softdeviceversion=8.0.0
980+
SeeedArchLink.menu.softdevice.s110.upload.maximum_size=151552
981+
SeeedArchLink.menu.softdevice.s110.build.extra_flags=-DNRF51 -DS110 -DNRF51_S110
982+
SeeedArchLink.menu.softdevice.s110.build.ldscript=armgcc_s110_nrf51822_xxaa.ld
983+
984+
SeeedArchLink.menu.softdevice.s130=S130
985+
SeeedArchLink.menu.softdevice.s130.softdevice=s130
986+
SeeedArchLink.menu.softdevice.s130.softdeviceversion=2.0.1
987+
SeeedArchLink.menu.softdevice.s130.upload.maximum_size=151552
988+
SeeedArchLink.menu.softdevice.s130.build.extra_flags=-DNRF51 -DS130 -DNRF51_S130
989+
SeeedArchLink.menu.softdevice.s130.build.ldscript=armgcc_s130_nrf51822_xxaa.ld
990+

variants/SeeedArchLink/pins_arduino.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
This library is free software; you can redistribute it and/or
4+
modify it under the terms of the GNU Lesser General Public
5+
License as published by the Free Software Foundation; either
6+
version 2.1 of the License, or (at your option) any later version.
7+
This library is distributed in the hope that it will be useful,
8+
but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
See the GNU Lesser General Public License for more details.
11+
You should have received a copy of the GNU Lesser General Public
12+
License along with this library; if not, write to the Free Software
13+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14+
*/
15+
16+
// API compatibility
17+
#include "variant.h"

variants/SeeedArchLink/variant.cpp

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
See the GNU Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
#include "variant.h"
21+
22+
const uint32_t g_ADigitalPinMap[] = {
23+
24+
// D0 - D7
25+
7, //RX
26+
8, //TX
27+
9, //W5500 interrupt
28+
10,
29+
11, //SS_SDCARD
30+
12,
31+
13,
32+
17, //W5500 reset
33+
34+
// D8 - D13
35+
18,
36+
23,
37+
24, //SS_W5500
38+
25, //SPI MOSI
39+
28, //SPI MISO
40+
29, //SPI SCK
41+
42+
// A0 - A6
43+
1,
44+
2,
45+
3,
46+
4,
47+
5, //I2C SDA
48+
6, //I2C SDA
49+
30, //LED
50+
51+
// AREF
52+
0,
53+
};

variants/SeeedArchLink/variant.h

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*
2+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
3+
Copyright (c) 2016 Sandeep Mistry All right reserved.
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+
This library is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
See the GNU Lesser General Public License for more details.
12+
You should have received a copy of the GNU Lesser General Public
13+
License along with this library; if not, write to the Free Software
14+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15+
*/
16+
17+
#ifndef _VARIANT_ARCHLINK_
18+
#define _VARIANT_ARCHLINK_
19+
20+
/** Master clock frequency */
21+
#define VARIANT_MCK (16000000ul)
22+
23+
/*----------------------------------------------------------------------------
24+
* Headers
25+
*----------------------------------------------------------------------------*/
26+
27+
#include "WVariant.h"
28+
29+
#ifdef __cplusplus
30+
extern "C"
31+
{
32+
#endif // __cplusplus
33+
34+
// Number of pins defined in PinDescription array
35+
#define PINS_COUNT (22u)
36+
#define NUM_DIGITAL_PINS (22u)
37+
#define NUM_ANALOG_INPUTS (7u)
38+
#define NUM_ANALOG_OUTPUTS (0u)
39+
40+
// LEDs
41+
#define PIN_LED1 (20)
42+
43+
#define LED_BUILTIN PIN_LED1
44+
45+
/*
46+
* Analog pins
47+
*/
48+
#define PIN_A0 (14)
49+
#define PIN_A1 (15)
50+
#define PIN_A2 (16)
51+
#define PIN_A3 (17)
52+
#define PIN_A4 (18)
53+
#define PIN_A5 (19)
54+
#define PIN_A6 (20)
55+
56+
static const uint8_t A0 = PIN_A0 ;
57+
static const uint8_t A1 = PIN_A1 ;
58+
static const uint8_t A2 = PIN_A2 ;
59+
static const uint8_t A3 = PIN_A3 ;
60+
static const uint8_t A4 = PIN_A4 ;
61+
static const uint8_t A5 = PIN_A5 ;
62+
static const uint8_t A6 = PIN_A6 ;
63+
#define ADC_RESOLUTION 10
64+
65+
// Other pins
66+
#define PIN_AREF (21)
67+
static const uint8_t AREF = PIN_AREF;
68+
69+
/*
70+
* SPI Interfaces
71+
*/
72+
#define SPI_INTERFACES_COUNT 1
73+
74+
#define PIN_SPI_MISO (12)
75+
#define PIN_SPI_MOSI (11)
76+
#define PIN_SPI_SCK (13)
77+
78+
static const uint8_t SS = 10 ;
79+
static const uint8_t MOSI = PIN_SPI_MOSI ;
80+
static const uint8_t MISO = PIN_SPI_MISO ;
81+
static const uint8_t SCK = PIN_SPI_SCK ;
82+
83+
static const uint8_t SDCARD_SS = 4 ;
84+
85+
/*
86+
* Wire Interfaces
87+
*/
88+
#define WIRE_INTERFACES_COUNT 1
89+
90+
#define PIN_WIRE_SDA (18)
91+
#define PIN_WIRE_SCL (19)
92+
93+
static const uint8_t SDA = PIN_WIRE_SDA;
94+
static const uint8_t SCL = PIN_WIRE_SCL;
95+
96+
/*
97+
* Serial interfaces
98+
*/
99+
// Serial
100+
#define PIN_SERIAL_RX (0)
101+
#define PIN_SERIAL_TX (1)
102+
103+
#ifdef __cplusplus
104+
}
105+
#endif
106+
107+
#endif

0 commit comments

Comments
 (0)