Skip to content

Commit cbc3305

Browse files
manchozfacchinm
authored andcommitted
Add support for Arduino Edge Control
1 parent 42db954 commit cbc3305

File tree

22 files changed

+4570
-0
lines changed

22 files changed

+4570
-0
lines changed

boards.txt

+42
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
##############################################################
22

3+
edge_control.name=Arduino Edge Control
4+
edge_control.build.core=arduino
5+
edge_control.build.crossprefix=arm-none-eabi-
6+
edge_control.build.compiler_path={runtime.tools.arm-none-eabi-gcc.path}/bin/
7+
8+
edge_control.build.variant=EDGE_CONTROL
9+
edge_control.build.mcu=cortex-m4
10+
edge_control.build.extra_flags=
11+
edge_control.build.architecture=cortex-m4
12+
edge_control.build.fpu=-mfpu=fpv4-sp-d16
13+
edge_control.build.float-abi=-mfloat-abi=softfp
14+
edge_control.build.board=EDGE_CONTROL
15+
edge_control.build.ldscript=linker_script.ld
16+
edge_control.compiler.mbed.arch.define=-DARDUINO_ARCH_NRF52840
17+
edge_control.compiler.mbed.defines={build.variant.path}/defines.txt
18+
edge_control.compiler.mbed.ldflags={build.variant.path}/ldflags.txt
19+
edge_control.compiler.mbed.cflags={build.variant.path}/cflags.txt
20+
edge_control.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
21+
edge_control.compiler.mbed.includes={build.variant.path}/includes.txt
22+
edge_control.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
23+
edge_control.compiler.mbed="{build.variant.path}/libs/libmbed.a" "{build.variant.path}/libs/libcc_310_core.a" "{build.variant.path}/libs/libcc_310_ext.a" "{build.variant.path}/libs/libcc_310_trng.a"
24+
edge_control.vid.0=0x2341
25+
edge_control.pid.0=0x005d
26+
edge_control.vid.1=0x2341
27+
edge_control.pid.1=0x805d
28+
29+
edge_control.upload.tool=bossac
30+
edge_control.upload.protocol=
31+
edge_control.upload.use_1200bps_touch=true
32+
edge_control.upload.wait_for_upload_port=true
33+
edge_control.upload.native_usb=true
34+
edge_control.upload.maximum_size=983040
35+
edge_control.upload.maximum_data_size=262144
36+
37+
edge_control.bootloader.tool=openocd
38+
edge_control.bootloader.extra_action.preflash=echo INFO:removed_mass-erase
39+
edge_control.bootloader.config=-f target/nrf52.cfg
40+
edge_control.bootloader.programmer=-f interface/cmsis-dap.cfg
41+
edge_control.bootloader.file=EDGE_CONTROL/bootloader.hex
42+
43+
##############################################################
44+
345
envie_m7.name=Arduino Portenta H7 (M7 core)
446
envie_m7.build.core=arduino
547
envie_m7.build.crossprefix=arm-none-eabi-
34.5 KB
Binary file not shown.
819 KB
Binary file not shown.

bootloaders/EDGE_CONTROL/bootloader.hex

+2,218
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
/*
2+
* Copyright (c) 2019 Arduino SA
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef MBED_PINNAMES_H
18+
#define MBED_PINNAMES_H
19+
20+
#include "cmsis.h"
21+
#include "nrf_gpio.h"
22+
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
typedef enum {
28+
PIN_INPUT,
29+
PIN_OUTPUT
30+
} PinDirection;
31+
32+
///> define macro producing for example Px_y = NRF_GPIO_PIN_MAP(x, y)
33+
#define PinDef(port_num, pin_num) P##port_num##_##pin_num = NRF_GPIO_PIN_MAP(port_num, pin_num)
34+
35+
36+
typedef enum {
37+
PinDef(0 , 0), // P0_0 = 0...
38+
PinDef(0 , 1),
39+
PinDef(0 , 2),
40+
PinDef(0 , 3),
41+
PinDef(0 , 4),
42+
PinDef(0 , 5),
43+
PinDef(0 , 6),
44+
PinDef(0 , 7),
45+
PinDef(0 , 8),
46+
PinDef(0 , 9),
47+
PinDef(0 , 10),
48+
PinDef(0 , 11),
49+
PinDef(0 , 12),
50+
PinDef(0 , 13),
51+
PinDef(0 , 14),
52+
PinDef(0 , 15),
53+
PinDef(0 , 16),
54+
PinDef(0 , 17),
55+
PinDef(0 , 18),
56+
PinDef(0 , 19),
57+
PinDef(0 , 20),
58+
PinDef(0 , 21),
59+
PinDef(0 , 22),
60+
PinDef(0 , 23),
61+
PinDef(0 , 24),
62+
PinDef(0 , 25),
63+
PinDef(0 , 26),
64+
PinDef(0 , 27),
65+
PinDef(0 , 28),
66+
PinDef(0 , 29),
67+
PinDef(0 , 30),
68+
PinDef(0 , 31),
69+
70+
PinDef(1 , 0), //P1_1 = 32...
71+
PinDef(1 , 1),
72+
PinDef(1 , 2),
73+
PinDef(1 , 3),
74+
PinDef(1 , 4),
75+
PinDef(1 , 5),
76+
PinDef(1 , 6),
77+
PinDef(1 , 7),
78+
PinDef(1 , 8),
79+
PinDef(1 , 9),
80+
PinDef(1 , 10),
81+
PinDef(1 , 11),
82+
PinDef(1 , 12),
83+
PinDef(1 , 13),
84+
PinDef(1 , 14),
85+
PinDef(1 , 15),
86+
87+
// Port0
88+
p0 = P0_0,
89+
p1 = P0_1,
90+
p2 = P0_2,
91+
p3 = P0_3,
92+
p4 = P0_4,
93+
p5 = P0_5,
94+
p6 = P0_6,
95+
p7 = P0_7,
96+
p8 = P0_8,
97+
p9 = P0_9,
98+
p10 = P0_10,
99+
p11 = P0_11,
100+
p12 = P0_12,
101+
p13 = P0_13,
102+
p14 = P0_14,
103+
p15 = P0_15,
104+
p16 = P0_16,
105+
p17 = P0_17,
106+
p18 = P0_18,
107+
p19 = P0_19,
108+
p20 = P0_20,
109+
p21 = P0_21,
110+
p22 = P0_22,
111+
p23 = P0_23,
112+
p24 = P0_24,
113+
p25 = P0_25,
114+
p26 = P0_26,
115+
p27 = P0_27,
116+
p28 = P0_28,
117+
p29 = P0_29,
118+
p30 = P0_30,
119+
p31 = P0_31,
120+
121+
// Port1
122+
p32 = P1_0,
123+
p33 = P1_1,
124+
p34 = P1_2,
125+
p35 = P1_3,
126+
p36 = P1_4,
127+
p37 = P1_5,
128+
p38 = P1_6,
129+
p39 = P1_7,
130+
p40 = P1_8,
131+
p41 = P1_9,
132+
p42 = P1_10,
133+
p43 = P1_11,
134+
p44 = P1_12,
135+
p45 = P1_13,
136+
p46 = P1_14,
137+
p47 = P1_15,
138+
139+
TX_PIN_NUMBER = P1_11,
140+
RX_PIN_NUMBER = P1_10,
141+
142+
143+
// mBed interface Pins
144+
CONSOLE_TX = TX_PIN_NUMBER,
145+
CONSOLE_RX = RX_PIN_NUMBER,
146+
STDIO_UART_TX = TX_PIN_NUMBER,
147+
STDIO_UART_RX = RX_PIN_NUMBER,
148+
149+
SPI_PSELMOSI0 = P0_20,
150+
SPI_PSELMISO0 = P0_21,
151+
SPI_PSELSCK0 = P0_19,
152+
SPI_PSELSS0 = P1_12,
153+
154+
SPIS_PSELMOSI = P0_20,
155+
SPIS_PSELMISO = P0_21,
156+
SPIS_PSELSCK = P0_19,
157+
SPIS_PSELSS = P1_12,
158+
159+
I2C_SDA0 = P1_9,
160+
I2C_SCL0 = P0_11,
161+
I2C_SDA1 = P0_31,
162+
I2C_SCL1 = P0_2,
163+
164+
/**** QSPI pins ****/
165+
QSPI1_IO0 = P0_20,
166+
QSPI1_IO1 = P0_21,
167+
QSPI1_IO2 = P0_22,
168+
QSPI1_IO3 = P0_23,
169+
QSPI1_SCK = P0_19,
170+
QSPI1_CSN = P0_17,
171+
172+
/**** QSPI FLASH pins ****/
173+
QSPI_FLASH1_IO0 = QSPI1_IO0,
174+
QSPI_FLASH1_IO1 = QSPI1_IO1,
175+
QSPI_FLASH1_IO2 = QSPI1_IO2,
176+
QSPI_FLASH1_IO3 = QSPI1_IO3,
177+
QSPI_FLASH1_SCK = QSPI1_SCK,
178+
QSPI_FLASH1_CSN = QSPI1_CSN,
179+
180+
// Not connected
181+
NC = (int)0xFFFFFFFF,
182+
183+
STDIO_UART_RTS = NC,
184+
STDIO_UART_CTS = NC,
185+
186+
LED1 = NC,
187+
LED2 = NC,
188+
LED3 = NC,
189+
LED4 = NC,
190+
BUTTON1 = NC,
191+
BUTTON2 = NC,
192+
BUTTON3 = NC,
193+
BUTTON4 = NC,
194+
} PinName;
195+
196+
typedef enum {
197+
PullNone = 0,
198+
PullDown = 1,
199+
PullUp = 3,
200+
PullDefault = PullUp
201+
} PinMode;
202+
203+
#ifdef __cplusplus
204+
}
205+
#endif
206+
207+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'features' section of the target description in 'targets.json' for more details.
3+
/* mbed Microcontroller Library
4+
* Copyright (c) 2006-2013 ARM Limited
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
#ifndef MBED_DEVICE_H
19+
#define MBED_DEVICE_H
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
#include "objects.h"
37+
38+
#endif

0 commit comments

Comments
 (0)