Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a196ddf

Browse files
committed
patches: add mbed-os Stella target
1 parent e2b7865 commit a196ddf

File tree

1 file changed

+343
-0
lines changed

1 file changed

+343
-0
lines changed

‎patches/0262-Add-Stella-target.patch‎

Lines changed: 343 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,343 @@
1+
From 2e630587c4174fc192a1945f09300e73fc2d5b87 Mon Sep 17 00:00:00 2001
2+
From: pennam <m.pennasilico@arduino.cc>
3+
Date: 2025年6月30日 14:15:01 +0200
4+
Subject: [PATCH] Add Stella target
5+
6+
---
7+
.../TARGET_STELLA/PinNames.h | 246 ++++++++++++++++++
8+
.../TARGET_STELLA/device.h | 39 +++
9+
targets/targets.json | 19 ++
10+
3 files changed, 304 insertions(+)
11+
create mode 100644 targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/PinNames.h
12+
create mode 100644 targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/device.h
13+
14+
diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/PinNames.h b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/PinNames.h
15+
new file mode 100644
16+
index 0000000000..b4ef8a160b
17+
--- /dev/null
18+
+++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/PinNames.h
19+
@@ -0,0 +1,246 @@
20+
+/*
21+
+ * Copyright (c) 2019 Arduino SA
22+
+ *
23+
+ * Licensed under the Apache License, Version 2.0 (the "License");
24+
+ * you may not use this file except in compliance with the License.
25+
+ * You may obtain a copy of the License at
26+
+ *
27+
+ * http://www.apache.org/licenses/LICENSE-2.0
28+
+ *
29+
+ * Unless required by applicable law or agreed to in writing, software
30+
+ * distributed under the License is distributed on an "AS IS" BASIS,
31+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32+
+ * See the License for the specific language governing permissions and
33+
+ * limitations under the License.
34+
+ */
35+
+
36+
+/* MBED TARGET LIST: ARDUINO_NANO33BLE */
37+
+
38+
+#ifndef MBED_PINNAMES_H
39+
+#define MBED_PINNAMES_H
40+
+
41+
+#include "cmsis.h"
42+
+#include "nrf_gpio.h"
43+
+
44+
+#ifdef __cplusplus
45+
+extern "C" {
46+
+#endif
47+
+
48+
+typedef enum {
49+
+ PIN_INPUT,
50+
+ PIN_OUTPUT
51+
+} PinDirection;
52+
+
53+
+///> define macro producing for example Px_y = NRF_GPIO_PIN_MAP(x, y)
54+
+#define PinDef(port_num, pin_num) P##port_num##_##pin_num = NRF_GPIO_PIN_MAP(port_num, pin_num)
55+
+
56+
+
57+
+typedef enum {
58+
+ PinDef(0 , 0), // P0_0 = 0...
59+
+ PinDef(0 , 1),
60+
+ PinDef(0 , 2),
61+
+ PinDef(0 , 3),
62+
+ PinDef(0 , 4),
63+
+ PinDef(0 , 5),
64+
+ PinDef(0 , 6),
65+
+ PinDef(0 , 7),
66+
+ PinDef(0 , 8),
67+
+ PinDef(0 , 9),
68+
+ PinDef(0 , 10),
69+
+ PinDef(0 , 11),
70+
+ PinDef(0 , 12),
71+
+ PinDef(0 , 13),
72+
+ PinDef(0 , 14),
73+
+ PinDef(0 , 15),
74+
+ PinDef(0 , 16),
75+
+ PinDef(0 , 17),
76+
+ PinDef(0 , 18),
77+
+ PinDef(0 , 19),
78+
+ PinDef(0 , 20),
79+
+ PinDef(0 , 21),
80+
+ PinDef(0 , 22),
81+
+ PinDef(0 , 23),
82+
+ PinDef(0 , 24),
83+
+ PinDef(0 , 25),
84+
+ PinDef(0 , 26),
85+
+ PinDef(0 , 27),
86+
+ PinDef(0 , 28),
87+
+ PinDef(0 , 29),
88+
+ PinDef(0 , 30),
89+
+ PinDef(0 , 31),
90+
+
91+
+ PinDef(1 , 0), //P1_1 = 32...
92+
+ PinDef(1 , 1),
93+
+ PinDef(1 , 2),
94+
+ PinDef(1 , 3),
95+
+ PinDef(1 , 4),
96+
+ PinDef(1 , 5),
97+
+ PinDef(1 , 6),
98+
+ PinDef(1 , 7),
99+
+ PinDef(1 , 8),
100+
+ PinDef(1 , 9),
101+
+ PinDef(1 , 10),
102+
+ PinDef(1 , 11),
103+
+ PinDef(1 , 12),
104+
+ PinDef(1 , 13),
105+
+ PinDef(1 , 14),
106+
+ PinDef(1 , 15),
107+
+
108+
+ // Port0
109+
+ p0 = P0_0,
110+
+ p1 = P0_1,
111+
+ p2 = P0_2,
112+
+ p3 = P0_3,
113+
+ p4 = P0_4,
114+
+ p5 = P0_5,
115+
+ p6 = P0_6,
116+
+ p7 = P0_7,
117+
+ p8 = P0_8,
118+
+ p9 = P0_9,
119+
+ p10 = P0_10,
120+
+ p11 = P0_11,
121+
+ p12 = P0_12,
122+
+ p13 = P0_13,
123+
+ p14 = P0_14,
124+
+ p15 = P0_15,
125+
+ p16 = P0_16,
126+
+ p17 = P0_17,
127+
+ p18 = P0_18,
128+
+ p19 = P0_19,
129+
+ p20 = P0_20,
130+
+ p21 = P0_21,
131+
+ p22 = P0_22,
132+
+ p23 = P0_23,
133+
+ p24 = P0_24,
134+
+ p25 = P0_25,
135+
+ p26 = P0_26,
136+
+ p27 = P0_27,
137+
+ p28 = P0_28,
138+
+ p29 = P0_29,
139+
+ p30 = P0_30,
140+
+ p31 = P0_31,
141+
+
142+
+ // Port1
143+
+ p32 = P1_0,
144+
+ p33 = P1_1,
145+
+ p34 = P1_2,
146+
+ p35 = P1_3,
147+
+ p36 = P1_4,
148+
+ p37 = P1_5,
149+
+ p38 = P1_6,
150+
+ p39 = P1_7,
151+
+ p40 = P1_8,
152+
+ p41 = P1_9,
153+
+ p42 = P1_10,
154+
+ p43 = P1_11,
155+
+ p44 = P1_12,
156+
+ p45 = P1_13,
157+
+ p46 = P1_14,
158+
+ p47 = P1_15,
159+
+
160+
+ RX_PIN_NUMBER = P1_10,
161+
+ TX_PIN_NUMBER = P1_3,
162+
+
163+
+ LED_BUILTIN = P0_13,
164+
+ LED_POWER = P1_9,
165+
+
166+
+ LED_RED = p24,
167+
+ LED_GREEN = p16,
168+
+ LED_BLUE = p6,
169+
+
170+
+ LED1 = LED_BUILTIN,
171+
+ LED2 = LED_RED,
172+
+ LED3 = LED_GREEN,
173+
+ LED4 = LED_BLUE,
174+
+
175+
+ // mBed interface Pins
176+
+ CONSOLE_TX = TX_PIN_NUMBER,
177+
+ CONSOLE_RX = RX_PIN_NUMBER,
178+
+#if defined(MBED_CONF_TARGET_STDIO_UART_TX)
179+
+ STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX,
180+
+#else
181+
+ STDIO_UART_TX = CONSOLE_TX,
182+
+#endif
183+
+#if defined(MBED_CONF_TARGET_STDIO_UART_RX)
184+
+ STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX,
185+
+#else
186+
+ STDIO_UART_RX = CONSOLE_RX,
187+
+#endif
188+
+
189+
+ SPI_PSELMOSI0 = P1_1,
190+
+ SPI_PSELMISO0 = P1_8,
191+
+ SPI_PSELSS0 = P1_2,
192+
+ SPI_PSELSCK0 = P0_13,
193+
+
194+
+ SPIS_PSELMOSI = P1_1,
195+
+ SPIS_PSELMISO = P1_8,
196+
+ SPIS_PSELSS = P1_2,
197+
+ SPIS_PSELSCK = P0_13,
198+
+
199+
+ I2C_SDA0 = p31,
200+
+ I2C_SCL0 = p2,
201+
+
202+
+#ifndef ARDUINO_ARCH_MBED
203+
+ // Digital Pins
204+
+ D2 = P1_11,
205+
+ D3 = P1_12,
206+
+ D4 = P1_15,
207+
+ D5 = P1_13,
208+
+ D6 = P1_14,
209+
+ D7 = P0_23,
210+
+ D8 = P0_21,
211+
+ D9 = P0_27,
212+
+ D10 = P1_2,
213+
+ D11 = P1_1,
214+
+ D12 = P1_8,
215+
+ D13 = P0_13,
216+
+
217+
+ // Analog Pins
218+
+ A0 = p4,
219+
+ A1 = p5,
220+
+ A2 = p30,
221+
+ A3 = p29,
222+
+ A4 = p31,
223+
+ A5 = p2,
224+
+ A6 = p28,
225+
+ A7 = p3,
226+
+#endif
227+
+
228+
+ AIN0 = p4,
229+
+ AIN1 = p5,
230+
+ AIN2 = p30,
231+
+ AIN3 = p29,
232+
+ AIN6 = p28,
233+
+ AIN7 = p3,
234+
+
235+
+ // Arduino Nano 33 BLE Sense Pins
236+
+ VDD_ENV = p22,
237+
+ INT_APDS = p19,
238+
+
239+
+ I2C_SDA1 = p14,
240+
+ I2C_SCL1 = p15,
241+
+
242+
+ MIC_PWR = p17,
243+
+ PDM_CLK = p26,
244+
+ PDM_DIN = p25,
245+
+
246+
+ // Not connected
247+
+ NC = (int)0xFFFFFFFF,
248+
+
249+
+ STDIO_UART_RTS = NC,
250+
+ STDIO_UART_CTS = NC,
251+
+
252+
+} PinName;
253+
+
254+
+typedef enum {
255+
+ PullNone = 0,
256+
+ PullDown = 1,
257+
+ PullUp = 3,
258+
+ PullDefault = PullUp
259+
+} PinMode;
260+
+
261+
+#ifdef __cplusplus
262+
+}
263+
+#endif
264+
+
265+
+#endif
266+
diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/device.h b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/device.h
267+
new file mode 100644
268+
index 0000000000..a086e5b7f0
269+
--- /dev/null
270+
+++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_STELLA/device.h
271+
@@ -0,0 +1,39 @@
272+
+// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
273+
+// Check the 'features' section of the target description in 'targets.json' for more details.
274+
+/* mbed Microcontroller Library
275+
+ * Copyright (c) 2006-2013 ARM Limited
276+
+ * SPDX-License-Identifier: Apache-2.0
277+
+ *
278+
+ * Licensed under the Apache License, Version 2.0 (the "License");
279+
+ * you may not use this file except in compliance with the License.
280+
+ * You may obtain a copy of the License at
281+
+ *
282+
+ * http://www.apache.org/licenses/LICENSE-2.0
283+
+ *
284+
+ * Unless required by applicable law or agreed to in writing, software
285+
+ * distributed under the License is distributed on an "AS IS" BASIS,
286+
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
287+
+ * See the License for the specific language governing permissions and
288+
+ * limitations under the License.
289+
+ */
290+
+#ifndef MBED_DEVICE_H
291+
+#define MBED_DEVICE_H
292+
+
293+
+
294+
+
295+
+
296+
+
297+
+
298+
+
299+
+
300+
+
301+
+
302+
+
303+
+
304+
+
305+
+
306+
+
307+
+
308+
+#include "objects.h"
309+
+
310+
+#endif
311+
diff --git a/targets/targets.json b/targets/targets.json
312+
index 83fa8c930a..f69cbeef40 100644
313+
--- a/targets/targets.json
314+
+++ b/targets/targets.json
315+
@@ -7332,6 +7332,25 @@
316+
"CONFIG_GPIO_AS_PINRESET"
317+
]
318+
},
319+
+ "STELLA": {
320+
+ "inherits": [
321+
+ "MCU_NRF52840"
322+
+ ],
323+
+ "features_add": [
324+
+ "STORAGE"
325+
+ ],
326+
+ "components_remove": [
327+
+ "QSPIF"
328+
+ ],
329+
+ "device_has_add": ["WATCHDOG"],
330+
+ "device_has_remove": [
331+
+ "QSPI",
332+
+ "ITM"
333+
+ ],
334+
+ "macros_add": [
335+
+ "CONFIG_GPIO_AS_PINRESET"
336+
+ ]
337+
+ },
338+
"EDGE_CONTROL": {
339+
"inherits": ["MCU_NRF52840"],
340+
"features_add": ["STORAGE"],
341+
--
342+
2.47.2
343+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /