From 59872062e65dfd65ddc4e6bc5ee953605771d97f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 20 Mar 2023 18:47:56 -0600 Subject: [PATCH 1/5] Fix working environment name --- examples/arduino-blink/platformio.ini | 2 +- examples/cmsis-blink/platformio.ini | 2 +- examples/libopencm3-1bitsy/platformio.ini | 2 +- examples/mbed-rtos-blink-baremetal/platformio.ini | 2 +- examples/spl-blink/platformio.ini | 2 +- examples/stm32cube-hal-blink/platformio.ini | 2 +- examples/stm32cube-ll-blink/platformio.ini | 2 +- tests/arduino-blink-different-cores/platformio.ini | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index 26d3a72a..23495a9d 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -22,7 +22,7 @@ upload_protocol = dfu [env:maple] board = maple -[env:generic STM32F103RB] +[env:genericSTM32F103RB] board = genericSTM32F103RB [env:bluepill_f103c8_stm32_core] diff --git a/examples/cmsis-blink/platformio.ini b/examples/cmsis-blink/platformio.ini index af481be0..5eff9287 100644 --- a/examples/cmsis-blink/platformio.ini +++ b/examples/cmsis-blink/platformio.ini @@ -22,7 +22,7 @@ platform = ststm32 framework = cmsis board = disco_f303vc -[env:bluepill f103c8] +[env:bluepill_f103c8] platform = ststm32 framework = cmsis board = bluepill_f103c8 diff --git a/examples/libopencm3-1bitsy/platformio.ini b/examples/libopencm3-1bitsy/platformio.ini index 5c26407d..52a08632 100644 --- a/examples/libopencm3-1bitsy/platformio.ini +++ b/examples/libopencm3-1bitsy/platformio.ini @@ -8,7 +8,7 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html -[env:1bitsy stm32f415rgt] +[env:1bitsy_stm32f415rgt] platform = ststm32 board = 1bitsy_stm32f415rgt framework = libopencm3 diff --git a/examples/mbed-rtos-blink-baremetal/platformio.ini b/examples/mbed-rtos-blink-baremetal/platformio.ini index b1ab4882..5b4ed5b3 100644 --- a/examples/mbed-rtos-blink-baremetal/platformio.ini +++ b/examples/mbed-rtos-blink-baremetal/platformio.ini @@ -12,7 +12,7 @@ platform = ststm32 framework = mbed board = nucleo_f103rb -[env:nucleo f401re] +[env:nucleo_f401re] platform = ststm32 framework = mbed board = nucleo_f401re diff --git a/examples/spl-blink/platformio.ini b/examples/spl-blink/platformio.ini index f52d1991..610363d6 100644 --- a/examples/spl-blink/platformio.ini +++ b/examples/spl-blink/platformio.ini @@ -17,7 +17,7 @@ platform = ststm32 framework = spl board = disco_l152rb -[env:disco f303vc] +[env:disco_f303vc] platform = ststm32 framework = spl board = disco_f303vc diff --git a/examples/stm32cube-hal-blink/platformio.ini b/examples/stm32cube-hal-blink/platformio.ini index af5f8f75..e6dae5b3 100644 --- a/examples/stm32cube-hal-blink/platformio.ini +++ b/examples/stm32cube-hal-blink/platformio.ini @@ -73,7 +73,7 @@ framework = stm32cube board = cloud_jam build_flags = -DF4 -[env:cloud jam l4] +[env:cloud_jam_l4] platform = ststm32 framework = stm32cube board = cloud_jam_l4 diff --git a/examples/stm32cube-ll-blink/platformio.ini b/examples/stm32cube-ll-blink/platformio.ini index c8e7fa74..fad04b60 100644 --- a/examples/stm32cube-ll-blink/platformio.ini +++ b/examples/stm32cube-ll-blink/platformio.ini @@ -13,7 +13,7 @@ framework = stm32cube board = nucleo_f401re build_flags = -DSYS_CLOCK=84000000L -[env:cloud jam] +[env:cloud_jam] platform = ststm32 framework = stm32cube board = cloud_jam diff --git a/tests/arduino-blink-different-cores/platformio.ini b/tests/arduino-blink-different-cores/platformio.ini index 741da3ad..191818e2 100644 --- a/tests/arduino-blink-different-cores/platformio.ini +++ b/tests/arduino-blink-different-cores/platformio.ini @@ -105,13 +105,13 @@ platform = ststm32 framework = arduino board = genericSTM32F103ZE -[env:disco_f100rb maple] +[env:disco_f100rb_maple] platform = ststm32 framework = arduino board = disco_f100rb board_build.core = maple -[env:disco_f407vg maple] +[env:disco_f407vg_maple] platform = ststm32 framework = arduino board = disco_f407vg From 4e4e4898a759c54ef886cda1f7b8e15bc75141fe Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Wed, 22 Mar 2023 14:27:48 +0200 Subject: [PATCH 2/5] Update Arduino-mbed core to v4.0.2 --- boards/portenta_h7_m4.json | 2 +- builder/frameworks/arduino/mbed-core | 2 +- platform.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/portenta_h7_m4.json b/boards/portenta_h7_m4.json index 2e12f4aa..7ccc1ada 100644 --- a/boards/portenta_h7_m4.json +++ b/boards/portenta_h7_m4.json @@ -4,7 +4,7 @@ "ldscript": "linker_script.ld", "flash_layout": "50_50" }, - "extra_flags": "-DARDUINO_PORTENTA_H7_M4", + "extra_flags": "-DARDUINO_PORTENTA_H7_M4 -DPORTENTA_H7_PINS", "core": "arduino", "cpu": "cortex-m4", "f_cpu": "480000000L", diff --git a/builder/frameworks/arduino/mbed-core b/builder/frameworks/arduino/mbed-core index ed9a3458..6174f769 160000 --- a/builder/frameworks/arduino/mbed-core +++ b/builder/frameworks/arduino/mbed-core @@ -1 +1 @@ -Subproject commit ed9a3458e336660fdf2b1d4a4c828a2ddfd214ad +Subproject commit 6174f769bfc8610a397ed0c912cd059246e547cd diff --git a/platform.json b/platform.json index 0d3faabe..d9d018f2 100644 --- a/platform.json +++ b/platform.json @@ -216,7 +216,7 @@ "type": "framework", "optional": true, "owner": "platformio", - "version": "~3.5.4" + "version": "~4.0.2" }, "framework-stm32cubef0": { "type": "framework", From 4f5783554afd2b4d50db3eba5266dede9a9e6bf4 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Wed, 22 Mar 2023 14:28:54 +0200 Subject: [PATCH 3/5] Add support for Nicla Vision and Opta M4 core Resolves #685 --- boards/nicla_vision.json | 63 +++++++++++++++++++++++ boards/nicla_vision_m4.json | 63 +++++++++++++++++++++++ boards/opta_m4.json | 51 ++++++++++++++++++ examples/arduino-mbed-doom/platformio.ini | 9 +++- examples/arduino-mbed-rpc/platformio.ini | 9 +++- platform.py | 2 +- 6 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 boards/nicla_vision.json create mode 100644 boards/nicla_vision_m4.json create mode 100644 boards/opta_m4.json diff --git a/boards/nicla_vision.json b/boards/nicla_vision.json new file mode 100644 index 00000000..4a396ee6 --- /dev/null +++ b/boards/nicla_vision.json @@ -0,0 +1,63 @@ +{ + "build": { + "arduino": { + "ldscript": "linker_script.ld", + "flash_layout": "50_50" + }, + "extra_flags": "-DARDUINO_NICLA_VISION", + "core": "arduino", + "cpu": "cortex-m7", + "f_cpu": "480000000L", + "mcu": "stm32h747xih6", + "variant": "NICLA_VISION", + "product_line": "STM32H747xx", + "hwids": [ + [ + "0x2341", + "0x035F" + ], + [ + "0x2341", + "0x025F" + ], + [ + "0x2341", + "0x045F" + ], + [ + "0x2341", + "0x055F" + ] + ] + }, + "connectivity": [ + "bluetooth", + "wifi" + ], + "debug": { + "jlink_device": "STM32H747XI_M7", + "openocd_target": "stm32h7x_dual_bank" + }, + "frameworks": [ + "arduino" + ], + "name": "Arduino Opta", + "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://www.arduino.cc/pro/hardware-arduino-opta", + "vendor": "Arduino" +} diff --git a/boards/nicla_vision_m4.json b/boards/nicla_vision_m4.json new file mode 100644 index 00000000..c0c4195d --- /dev/null +++ b/boards/nicla_vision_m4.json @@ -0,0 +1,63 @@ +{ + "build": { + "arduino": { + "ldscript": "linker_script.ld", + "flash_layout": "50_50" + }, + "extra_flags": "-DARDUINO_PORTENTA_H7_M4 -DNVISION_PINS", + "core": "arduino", + "cpu": "cortex-m4", + "f_cpu": "480000000L", + "mcu": "stm32h747xih6", + "variant": "PORTENTA_H7_M4", + "product_line": "STM32H747xx", + "hwids": [ + [ + "0x2341", + "0x035F" + ], + [ + "0x2341", + "0x025F" + ], + [ + "0x2341", + "0x045F" + ], + [ + "0x2341", + "0x055F" + ] + ] + }, + "connectivity": [ + "bluetooth", + "wifi" + ], + "debug": { + "jlink_device": "STM32H747XI_M4", + "openocd_target": "stm32h7x_dual_bank" + }, + "frameworks": [ + "arduino" + ], + "name": "Arduino Nicla Vision (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://store.arduino.cc/products/nicla-vision", + "vendor": "Arduino" +} diff --git a/boards/opta_m4.json b/boards/opta_m4.json new file mode 100644 index 00000000..6ac18bf0 --- /dev/null +++ b/boards/opta_m4.json @@ -0,0 +1,51 @@ +{ + "build": { + "arduino": { + "ldscript": "linker_script.ld", + "flash_layout": "50_50" + }, + "extra_flags": "-DARDUINO_OPTA -DOPTA_PINS", + "core": "arduino", + "cpu": "cortex-m4", + "f_cpu": "480000000L", + "mcu": "stm32h747xih6", + "variant": "PORTENTA_H7_M4", + "product_line": "STM32H747xx", + "hwids": [ + [ + "0x2341", + "0x0364" + ] + ] + }, + "connectivity": [ + "bluetooth", + "wifi" + ], + "debug": { + "jlink_device": "STM32H747XI_M4", + "openocd_target": "stm32h7x_dual_bank" + }, + "frameworks": [ + "arduino" + ], + "name": "Arduino Opta (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://www.arduino.cc/pro/hardware-arduino-opta", + "vendor": "Arduino" +} diff --git a/examples/arduino-mbed-doom/platformio.ini b/examples/arduino-mbed-doom/platformio.ini index 860ae02b..e21c1417 100644 --- a/examples/arduino-mbed-doom/platformio.ini +++ b/examples/arduino-mbed-doom/platformio.ini @@ -12,4 +12,11 @@ platform = ststm32 framework = arduino board = portenta_h7_m7 lib_deps = - Portenta_Video \ No newline at end of file + Portenta_Video + +[env:nicla_vision] +platform = ststm32 +framework = arduino +board = nicla_vision +lib_deps = + Portenta_Video diff --git a/examples/arduino-mbed-rpc/platformio.ini b/examples/arduino-mbed-rpc/platformio.ini index a8c02dfc..7f72f2c8 100644 --- a/examples/arduino-mbed-rpc/platformio.ini +++ b/examples/arduino-mbed-rpc/platformio.ini @@ -11,4 +11,11 @@ platform = ststm32 framework = arduino board = portenta_h7_m4 -lib_compat_mode = off \ No newline at end of file +lib_compat_mode = off + +[env:nicla_vision_m4] +platform = ststm32 +framework = arduino +board = nicla_vision_m4 +lib_compat_mode = off + diff --git a/platform.py b/platform.py index f6468894..03493193 100644 --- a/platform.py +++ b/platform.py @@ -32,7 +32,7 @@ def configure_default_packages(self, variables, targets): frameworks = variables.get("pioframework", []) if "arduino" in frameworks: - if board.startswith(("portenta", "opta")): + if board.startswith(("portenta", "opta", "nicla_vision")): self.frameworks["arduino"]["package"] = "framework-arduino-mbed" self.frameworks["arduino"][ "script" From 4c9ab2d4d8227ae4b6df12a4a3017a4a4af5209f Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Wed, 22 Mar 2023 20:27:42 +0200 Subject: [PATCH 4/5] Delete unsupported board from example --- examples/arduino-mbed-doom/platformio.ini | 7 ------- 1 file changed, 7 deletions(-) diff --git a/examples/arduino-mbed-doom/platformio.ini b/examples/arduino-mbed-doom/platformio.ini index e21c1417..b6945a62 100644 --- a/examples/arduino-mbed-doom/platformio.ini +++ b/examples/arduino-mbed-doom/platformio.ini @@ -13,10 +13,3 @@ framework = arduino board = portenta_h7_m7 lib_deps = Portenta_Video - -[env:nicla_vision] -platform = ststm32 -framework = arduino -board = nicla_vision -lib_deps = - Portenta_Video From d42238b2d576d725f51e33999508406edb454695 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Tue, 28 Mar 2023 14:39:48 +0300 Subject: [PATCH 5/5] Bump version to 15.6.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index d9d018f2..d72496ae 100644 --- a/platform.json +++ b/platform.json @@ -18,7 +18,7 @@ "type": "git", "url": "https://github.com/platformio/platform-ststm32.git" }, - "version": "15.5.1", + "version": "15.6.0", "frameworks": { "mbed": { "package": "framework-mbed",