From 53e776666fa4b16eda508689160adc5d0fb091a1 Mon Sep 17 00:00:00 2001 From: Asuki Kono Date: Mon, 1 Jul 2024 22:26:44 +0900 Subject: [PATCH 01/11] Enable Arduino support for Nucleo H753ZI (#748) - Fixed RAM size value Resolves #762 --- boards/nucleo_h753zi.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/boards/nucleo_h753zi.json b/boards/nucleo_h753zi.json index 6eef662a..33b79f7b 100644 --- a/boards/nucleo_h753zi.json +++ b/boards/nucleo_h753zi.json @@ -5,7 +5,8 @@ "extra_flags": "-DSTM32H7 -DSTM32H7xx -DSTM32H753xx", "f_cpu": "400000000L", "mcu": "stm32h753zit6", - "product_line": "STM32H753xx" + "product_line": "STM32H753xx", + "variant": "STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT" }, "connectivity": [ "can", @@ -23,13 +24,14 @@ "svd_path": "STM32H753.svd" }, "frameworks": [ + "arduino", "cmsis", "stm32cube", "zephyr" ], "name": "ST Nucleo H753ZI", "upload": { - "maximum_ram_size": 884736, + "maximum_ram_size": 524288, "maximum_size": 2097152, "protocol": "stlink", "protocols": [ From 1fb3db005ed3b495b7a3aa5c6207c058675e2df1 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 29 Jul 2024 14:30:02 +0300 Subject: [PATCH 02/11] Update Arduino core to v2.8.1 Resolves #790 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 2271e2e3..bdaf0d89 100644 --- a/platform.json +++ b/platform.json @@ -190,7 +190,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~4.20701.0" + "version": "~4.20801.0" }, "framework-arduinoststm32-maple": { "type": "framework", From bfd86e976638e66721220bad41f52c4f89aa7cc3 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 29 Jul 2024 14:43:34 +0300 Subject: [PATCH 03/11] Update libOpenCM3 package Issue #775 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index bdaf0d89..5057a3b9 100644 --- a/platform.json +++ b/platform.json @@ -184,7 +184,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~1.10000.0" + "version": "~1.10000.240729" }, "framework-arduinoststm32": { "type": "framework", From b6273d385019091d1c9696cc3d4ebabe0242ae9d Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 29 Jul 2024 14:44:38 +0300 Subject: [PATCH 04/11] Enable libOpenCM3 for nucleo_h723zg Resolves #775 --- boards/nucleo_h723zg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/boards/nucleo_h723zg.json b/boards/nucleo_h723zg.json index 0ea4b216..52c1ad20 100644 --- a/boards/nucleo_h723zg.json +++ b/boards/nucleo_h723zg.json @@ -27,6 +27,7 @@ "arduino", "stm32cube", "mbed", + "libopencm3", "zephyr" ], "name": "ST Nucleo H723ZG", From 51a83dcfdf982bbc330f0d21478b650bfd632d9f Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 29 Jul 2024 15:17:08 +0300 Subject: [PATCH 05/11] Fix libOpenCM3 package version --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 5057a3b9..592d7411 100644 --- a/platform.json +++ b/platform.json @@ -184,7 +184,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~1.10000.240729" + "version": "~1.10000.240622" }, "framework-arduinoststm32": { "type": "framework", From f4972c557531260046bcaf2c01bcbf7268e7602c Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 29 Jul 2024 16:21:36 +0300 Subject: [PATCH 06/11] Add specific variant header for nucleo_f439zi --- boards/nucleo_f429zi.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boards/nucleo_f429zi.json b/boards/nucleo_f429zi.json index 47b9f0d1..976e9d5c 100644 --- a/boards/nucleo_f429zi.json +++ b/boards/nucleo_f429zi.json @@ -1,5 +1,8 @@ { "build": { + "arduino": { + "variant_h": "variant_NUCLEO_F4x9ZI.h" + }, "core": "stm32", "cpu": "cortex-m4", "extra_flags": "-DSTM32F4 -DSTM32F429xx", From 1692024057c30d6296cc828f417c1fb6661c6aea Mon Sep 17 00:00:00 2001 From: AndrewCapon Date: Tue, 30 Jul 2024 11:20:23 +0100 Subject: [PATCH 07/11] Add Giga R1 board (#747) --- boards/giga_r1_m4.json | 59 ++++++++++++++++++++++++++++++++++++++++++ boards/giga_r1_m7.json | 59 ++++++++++++++++++++++++++++++++++++++++++ builder/main.py | 6 ++--- platform.py | 4 +-- 4 files changed, 123 insertions(+), 5 deletions(-) create mode 100644 boards/giga_r1_m4.json create mode 100644 boards/giga_r1_m7.json diff --git a/boards/giga_r1_m4.json b/boards/giga_r1_m4.json new file mode 100644 index 00000000..b4c86526 --- /dev/null +++ b/boards/giga_r1_m4.json @@ -0,0 +1,59 @@ +{ + "build": { + "arduino":{ + "ldscript": "linker_script.ld", + "flash_layout": "50_50" + }, + "extra_flags": "-DARDUINO_GIGA -DARDUINO_GIGA_M4 -DGIGA_PINS", + "core": "arduino", + "cpu": "cortex-m4", + "f_cpu": "480000000L", + "mcu": "stm32h747xih6", + "variant": "GENERIC_STM32H747_M4", + "product_line": "STM32H747xx", + "hwids": [ + [ + "0x2341", + "0x0366" + ], + [ + "0x2341", + "0x0266" + ], + [ + "0x2341", + "0x0466" + ] + ] + }, + "connectivity": [ + "bluetooth", + "wifi" + ], + "debug": { + "jlink_device": "STM32H747XI_M4", + "openocd_target": "stm32h7x_dual_bank" + }, + "frameworks": [ + "arduino" + ], + "name": "Arduino Giga R1 (M4 core)", + "upload": { + "maximum_ram_size": 294248, + "maximum_size": 1048576, + "protocol": "dfu", + "protocols": [ + "cmsis-dap", + "dfu", + "jlink", + "stlink", + "mbed" + ], + "require_upload_port": true, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "offset_address": "0x08100000" + }, + "url": "https://docs.arduino.cc/hardware/giga-r1-wifi", + "vendor": "Arduino" +} diff --git a/boards/giga_r1_m7.json b/boards/giga_r1_m7.json new file mode 100644 index 00000000..06f6ad11 --- /dev/null +++ b/boards/giga_r1_m7.json @@ -0,0 +1,59 @@ +{ + "build": { + "arduino":{ + "ldscript": "linker_script.ld", + "flash_layout": "50_50" + }, + "extra_flags": "-DARDUINO_GIGA -DARDUINO_GIGA_M7 -DGIGA_PINS", + "core": "arduino", + "cpu": "cortex-m7", + "f_cpu": "480000000L", + "mcu": "stm32h747xih6", + "variant": "GIGA", + "product_line": "STM32H747xx", + "hwids": [ + [ + "0x2341", + "0x0366" + ], + [ + "0x2341", + "0x0266" + ], + [ + "0x2341", + "0x0466" + ] + ] + }, + "connectivity": [ + "bluetooth", + "wifi" + ], + "debug": { + "jlink_device": "STM32H747XI_M7", + "openocd_target": "stm32h7x_dual_bank" + }, + "frameworks": [ + "arduino" + ], + "name": "Arduino Giga R1 (M7 core)", + "upload": { + "maximum_ram_size": 523624, + "maximum_size": 786432, + "protocol": "dfu", + "protocols": [ + "cmsis-dap", + "dfu", + "jlink", + "stlink", + "mbed" + ], + "require_upload_port": true, + "use_1200bps_touch": true, + "wait_for_upload_port": true, + "offset_address": "0x08040000" + }, + "url": "https://docs.arduino.cc/hardware/giga-r1-wifi", + "vendor": "Arduino" +} diff --git a/builder/main.py b/builder/main.py index 8df00252..8c5cf03c 100644 --- a/builder/main.py +++ b/builder/main.py @@ -213,7 +213,7 @@ def _jlink_cmd_script(env, source): vid = hwids[0][0] pid = hwids[0][1] - if env.subst("$BOARD").startswith(("portenta", "opta", "nicla")): + if env.subst("$BOARD").startswith(("portenta", "opta", "nicla", "giga")): _upload_tool = '"%s"' % join(platform.get_package_dir( "tool-dfuutil-arduino") or "", "dfu-util") else: @@ -230,7 +230,7 @@ def _jlink_cmd_script(env, source): upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")] if "arduino" in frameworks: - if env.subst("$BOARD").startswith(("portenta", "opta", "nicla")): + if env.subst("$BOARD").startswith(("portenta", "opta", "nicla", "giga")): upload_actions.insert( 0, env.VerboseAction(BeforeUpload, "Looking for upload port...") @@ -255,7 +255,7 @@ def __configure_upload_port(env): "Looking for upload port...")) if "dfu-util" in _upload_tool: - if not env.subst("$BOARD").startswith(("portenta", "opta", "nicla")): + if not env.subst("$BOARD").startswith(("portenta", "opta", "nicla", "giga")): # Add special DFU header to the binary image env.AddPostAction( join("$BUILD_DIR", "${PROGNAME}.bin"), diff --git a/platform.py b/platform.py index e7af216a..662cc33e 100644 --- a/platform.py +++ b/platform.py @@ -33,7 +33,7 @@ def configure_default_packages(self, variables, targets): frameworks = variables.get("pioframework", []) if "arduino" in frameworks: - if board.startswith(("portenta", "opta", "nicla_vision")): + if board.startswith(("portenta", "opta", "nicla_vision", "giga")): self.frameworks["arduino"]["package"] = "framework-arduino-mbed" self.frameworks["arduino"][ "script" @@ -72,7 +72,7 @@ def configure_default_packages(self, variables, targets): default_protocol = board_config.get("upload.protocol") or "" if variables.get("upload_protocol", default_protocol) == "dfu": dfu_package = "tool-dfuutil" - if board.startswith(("portenta", "opta", "nicla")): + if board.startswith(("portenta", "opta", "nicla", "giga")): dfu_package = "tool-dfuutil-arduino" self.packages.pop("tool-dfuutil") else: From b0b1f1e7429be1e2ae47a09b34bffc91579e72f9 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 30 Jul 2024 13:22:43 +0300 Subject: [PATCH 08/11] Add Giga R1 board to CI --- examples/arduino-blink/platformio.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index 23495a9d..16b1960e 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -84,3 +84,6 @@ build_flags = board = econode_l082cz build_flags = -DPIO_FRAMEWORK_ARDUINO_FS_SFLASH + +[env:giga_r1_m7] +board = giga_r1_m7 From 40694064135ddc6aeeef0803710fb677092b0960 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 30 Jul 2024 13:23:18 +0300 Subject: [PATCH 09/11] Update Arduino-mbed core to v4.1.5 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 592d7411..fe4ac181 100644 --- a/platform.json +++ b/platform.json @@ -214,7 +214,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~4.1.3" + "version": "~4.1.5" }, "framework-stm32cubef0": { "type": "framework", From 00bc31b28a4a88255c727dfa3a96e5b667fbc933 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 30 Jul 2024 13:23:31 +0300 Subject: [PATCH 10/11] Sync Arduino-mbed build script --- builder/frameworks/arduino/mbed-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/frameworks/arduino/mbed-core b/builder/frameworks/arduino/mbed-core index 66ff9c5e..029e576c 160000 --- a/builder/frameworks/arduino/mbed-core +++ b/builder/frameworks/arduino/mbed-core @@ -1 +1 @@ -Subproject commit 66ff9c5ecf64e0ce6360cbf2d8769228bb1294b4 +Subproject commit 029e576c57331f1baa41802b7684710a587f3ef8 From 29d5474758589b9ab0ad6466108064fe459e6f48 Mon Sep 17 00:00:00 2001 From: valeros Date: Tue, 30 Jul 2024 14:09:03 +0300 Subject: [PATCH 11/11] Bump version to 17.5.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index fe4ac181..cfbefd1f 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-ststm32.git" }, - "version": "17.4.0", + "version": "17.5.0", "frameworks": { "mbed": { "package": "framework-mbed",