Skip to content

Commit 1692024

Browse files
authored
Add Giga R1 board (#747)
1 parent f4972c5 commit 1692024

File tree

4 files changed

+123
-5
lines changed

4 files changed

+123
-5
lines changed

boards/giga_r1_m4.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "linker_script.ld",
5+
"flash_layout": "50_50"
6+
},
7+
"extra_flags": "-DARDUINO_GIGA -DARDUINO_GIGA_M4 -DGIGA_PINS",
8+
"core": "arduino",
9+
"cpu": "cortex-m4",
10+
"f_cpu": "480000000L",
11+
"mcu": "stm32h747xih6",
12+
"variant": "GENERIC_STM32H747_M4",
13+
"product_line": "STM32H747xx",
14+
"hwids": [
15+
[
16+
"0x2341",
17+
"0x0366"
18+
],
19+
[
20+
"0x2341",
21+
"0x0266"
22+
],
23+
[
24+
"0x2341",
25+
"0x0466"
26+
]
27+
]
28+
},
29+
"connectivity": [
30+
"bluetooth",
31+
"wifi"
32+
],
33+
"debug": {
34+
"jlink_device": "STM32H747XI_M4",
35+
"openocd_target": "stm32h7x_dual_bank"
36+
},
37+
"frameworks": [
38+
"arduino"
39+
],
40+
"name": "Arduino Giga R1 (M4 core)",
41+
"upload": {
42+
"maximum_ram_size": 294248,
43+
"maximum_size": 1048576,
44+
"protocol": "dfu",
45+
"protocols": [
46+
"cmsis-dap",
47+
"dfu",
48+
"jlink",
49+
"stlink",
50+
"mbed"
51+
],
52+
"require_upload_port": true,
53+
"use_1200bps_touch": true,
54+
"wait_for_upload_port": true,
55+
"offset_address": "0x08100000"
56+
},
57+
"url": "https://docs.arduino.cc/hardware/giga-r1-wifi",
58+
"vendor": "Arduino"
59+
}

boards/giga_r1_m7.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "linker_script.ld",
5+
"flash_layout": "50_50"
6+
},
7+
"extra_flags": "-DARDUINO_GIGA -DARDUINO_GIGA_M7 -DGIGA_PINS",
8+
"core": "arduino",
9+
"cpu": "cortex-m7",
10+
"f_cpu": "480000000L",
11+
"mcu": "stm32h747xih6",
12+
"variant": "GIGA",
13+
"product_line": "STM32H747xx",
14+
"hwids": [
15+
[
16+
"0x2341",
17+
"0x0366"
18+
],
19+
[
20+
"0x2341",
21+
"0x0266"
22+
],
23+
[
24+
"0x2341",
25+
"0x0466"
26+
]
27+
]
28+
},
29+
"connectivity": [
30+
"bluetooth",
31+
"wifi"
32+
],
33+
"debug": {
34+
"jlink_device": "STM32H747XI_M7",
35+
"openocd_target": "stm32h7x_dual_bank"
36+
},
37+
"frameworks": [
38+
"arduino"
39+
],
40+
"name": "Arduino Giga R1 (M7 core)",
41+
"upload": {
42+
"maximum_ram_size": 523624,
43+
"maximum_size": 786432,
44+
"protocol": "dfu",
45+
"protocols": [
46+
"cmsis-dap",
47+
"dfu",
48+
"jlink",
49+
"stlink",
50+
"mbed"
51+
],
52+
"require_upload_port": true,
53+
"use_1200bps_touch": true,
54+
"wait_for_upload_port": true,
55+
"offset_address": "0x08040000"
56+
},
57+
"url": "https://docs.arduino.cc/hardware/giga-r1-wifi",
58+
"vendor": "Arduino"
59+
}

builder/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _jlink_cmd_script(env, source):
213213
vid = hwids[0][0]
214214
pid = hwids[0][1]
215215

216-
if env.subst("$BOARD").startswith(("portenta", "opta", "nicla")):
216+
if env.subst("$BOARD").startswith(("portenta", "opta", "nicla", "giga")):
217217
_upload_tool = '"%s"' % join(platform.get_package_dir(
218218
"tool-dfuutil-arduino") or "", "dfu-util")
219219
else:
@@ -230,7 +230,7 @@ def _jlink_cmd_script(env, source):
230230
upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]
231231

232232
if "arduino" in frameworks:
233-
if env.subst("$BOARD").startswith(("portenta", "opta", "nicla")):
233+
if env.subst("$BOARD").startswith(("portenta", "opta", "nicla", "giga")):
234234
upload_actions.insert(
235235
0,
236236
env.VerboseAction(BeforeUpload, "Looking for upload port...")
@@ -255,7 +255,7 @@ def __configure_upload_port(env):
255255
"Looking for upload port..."))
256256

257257
if "dfu-util" in _upload_tool:
258-
if not env.subst("$BOARD").startswith(("portenta", "opta", "nicla")):
258+
if not env.subst("$BOARD").startswith(("portenta", "opta", "nicla", "giga")):
259259
# Add special DFU header to the binary image
260260
env.AddPostAction(
261261
join("$BUILD_DIR", "${PROGNAME}.bin"),

platform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def configure_default_packages(self, variables, targets):
3333

3434
frameworks = variables.get("pioframework", [])
3535
if "arduino" in frameworks:
36-
if board.startswith(("portenta", "opta", "nicla_vision")):
36+
if board.startswith(("portenta", "opta", "nicla_vision", "giga")):
3737
self.frameworks["arduino"]["package"] = "framework-arduino-mbed"
3838
self.frameworks["arduino"][
3939
"script"
@@ -72,7 +72,7 @@ def configure_default_packages(self, variables, targets):
7272
default_protocol = board_config.get("upload.protocol") or ""
7373
if variables.get("upload_protocol", default_protocol) == "dfu":
7474
dfu_package = "tool-dfuutil"
75-
if board.startswith(("portenta", "opta", "nicla")):
75+
if board.startswith(("portenta", "opta", "nicla", "giga")):
7676
dfu_package = "tool-dfuutil-arduino"
7777
self.packages.pop("tool-dfuutil")
7878
else:

0 commit comments

Comments
 (0)