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/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", 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", 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": [ 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 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/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 diff --git a/platform.json b/platform.json index 2271e2e3..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", @@ -184,13 +184,13 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~1.10000.0" + "version": "~1.10000.240622" }, "framework-arduinoststm32": { "type": "framework", "optional": true, "owner": "platformio", - "version": "~4.20701.0" + "version": "~4.20801.0" }, "framework-arduinoststm32-maple": { "type": "framework", @@ -214,7 +214,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~4.1.3" + "version": "~4.1.5" }, "framework-stm32cubef0": { "type": "framework", 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: