Skip to content

Commit

Permalink
Merge branch 'release/v19.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Jan 30, 2025
2 parents 3b68dfb + cb066e2 commit 754cda5
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 27 deletions.
50 changes: 50 additions & 0 deletions boards/blues_cygnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"variant_h": "variant_CYGNET.h"
},
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32L4 -DSTM32L4xx -DSTM32L433xx",
"f_cpu": "80000000L",
"framework_extra_flags": {
"arduino": "-DARDUINO_CYGNET -DCUSTOM_PERIPHERAL_PINS"
},
"mcu": "stm32l433cct6",
"product_line": "STM32L433xx",
"variant": "STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)"
},
"connectivity": [
"can"
],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32L433CC",
"openocd_target": "stm32l4x",
"svd_path": "STM32L4x3.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube",
"libopencm3"
],
"name": "Blues Cygnet",
"upload": {
"maximum_ram_size": 65536,
"maximum_size": 262144,
"protocol": "stlink",
"protocols": [
"dfu",
"blackmagic",
"cmsis-dap",
"jlink",
"stlink",
"mbed"
]
},
"url": "https://blues.com/feather-mcu/",
"vendor": "Blues"
}
51 changes: 51 additions & 0 deletions boards/blues_swan_r5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"build": {
"arduino": {
"variant_h": "variant_SWAN_R5.h"
},
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32L4 -DSTM32L4xx -DSTM32L4R5xx",
"f_cpu": "120000000L",
"framework_extra_flags": {
"arduino": "-DARDUINO_SWAN_R5 -DCUSTOM_PERIPHERAL_PINS"
},
"mcu": "stm32l4r5ziy6",
"product_line": "STM32L4R5xx",
"variant": "STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY"
},
"connectivity": [
"can"
],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32L4R5ZI",
"openocd_target": "stm32l4x",
"svd_path": "STM32L4R5.svd"
},
"frameworks": [
"arduino",
"cmsis",
"stm32cube",
"libopencm3"
],
"name": "Blues Swan R5",
"upload": {
"maximum_ram_size": 655360,
"maximum_size": 2097152,
"protocol": "stlink",
"protocols": [
"dfu",
"blackmagic",
"cmsis-dap",
"jlink",
"serial",
"stlink",
"mbed"
]
},
"url": "https://blues.com/products/swan/",
"vendor": "Blues"
}
5 changes: 4 additions & 1 deletion boards/bw_swan_r5.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"build": {
"arduino": {
"variant_h": "variant_SWAN_R5.h"
},
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32L4 -DSTM32L4xx -DSTM32L4R5xx",
"extra_flags": "-DARDUINO_SWAN_R5 -DSTM32L4 -DSTM32L4xx -DSTM32L4R5xx",
"f_cpu": "120000000L",
"framework_extra_flags": {
"arduino": "-DCUSTOM_PERIPHERAL_PINS"
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo_f446ze.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"f_cpu": "180000000L",
"mcu": "stm32f446zet6",
"product_line": "STM32F446xx",
"variant": "STM32F4XX/F446Z(C-E)(H-J-T)"
"variant": "STM32F4xx/F446Z(C-E)(H-J-T)"
},
"connectivity": [
"can"
Expand Down
24 changes: 24 additions & 0 deletions examples/stm32cube-hal-blink/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ framework = stm32cube
board = nucleo_f746zg
build_flags = -DF7

[env:nucleo_g071rb]
platform = ststm32
framework = stm32cube
board = nucleo_g071rb
build_flags = -DG0

[env:nucleo_g474re]
platform = ststm32
framework = stm32cube
board = nucleo_g474re
build_flags = -DG4

[env:nucleo_h743zi]
platform = ststm32
framework = stm32cube
board = nucleo_h743zi
build_flags = -DH7

[env:nucleo_l053r8]
platform = ststm32
framework = stm32cube
Expand Down Expand Up @@ -78,3 +96,9 @@ platform = ststm32
framework = stm32cube
board = cloud_jam_l4
build_flags = -DL4

[env:nucleo_l552ze_q]
platform = ststm32
framework = stm32cube
board = nucleo_l552ze_q
build_flags = -DL5
10 changes: 10 additions & 0 deletions examples/stm32cube-hal-blink/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@
#include "stm32f4xx_hal.h"
#elif F7
#include "stm32f7xx_hal.h"
#elif H7
#include "stm32h7xx_hal.h"
#elif G0
#include "stm32g0xx_hal.h"
#elif G4
#include "stm32g4xx_hal.h"
#elif H7
#include "stm32f7xx_hal.h"
#elif L0
#include "stm32l0xx_hal.h"
#elif L1
#include "stm32l1xx_hal.h"
#elif L4
#include "stm32l4xx_hal.h"
#elif L5
#include "stm32l5xx_hal.h"
#else
#error "Unsupported STM32 Family"
#endif
Expand Down
30 changes: 15 additions & 15 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-ststm32.git"
},
"version": "18.0.0",
"version": "19.0.0",
"frameworks": {
"mbed": {
"package": "framework-mbed",
Expand Down Expand Up @@ -220,85 +220,85 @@
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.11.0"
"version": "~1.11.5"
},
"framework-stm32cubef1": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.8.0"
"version": "~1.8.6"
},
"framework-stm32cubef2": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.9.0"
"version": "~1.9.5"
},
"framework-stm32cubef3": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.11.0"
"version": "~1.11.5"
},
"framework-stm32cubef4": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.26.0"
"version": "~1.28.1"
},
"framework-stm32cubef7": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.16.0"
"version": "~1.17.2"
},
"framework-stm32cubeg0": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.5.0"
"version": "~1.6.2"
},
"framework-stm32cubeg4": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.4.0"
"version": "~1.6.1"
},
"framework-stm32cubeh7": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.9.0"
"version": "~1.12.1"
},
"framework-stm32cubel0": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.12.0"
"version": "~1.12.2"
},
"framework-stm32cubel1": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.10.0"
"version": "~1.10.4"
},
"framework-stm32cubel4": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.17.0"
"version": "~1.18.1"
},
"framework-stm32cubel5": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~1.4.0"
"version": "~1.5.1"
},
"framework-zephyr": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~2.40000.0"
"version": "~3.40000.0"
},
"tool-stm32duino": {
"type": "uploader",
Expand Down
31 changes: 21 additions & 10 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import subprocess

from platformio.managers.platform import PlatformBase
from platformio.project.helpers import get_project_dir


IS_WINDOWS = sys.platform.startswith("win")
Expand Down Expand Up @@ -116,16 +117,26 @@ def install_package(self, name, *args, **kwargs):
if name != "framework-zephyr":
return pkg

if not os.path.isfile(os.path.join(pkg.path, "_pio", "state.json")):
self.pm.log.info("Installing Zephyr project dependencies...")
try:
subprocess.run([
os.path.normpath(sys.executable),
os.path.join(pkg.path, "scripts", "platformio", "install-deps.py"),
"--platform", self.name
])
except subprocess.CalledProcessError:
self.pm.log.info("Failed to install Zephyr dependencies!")
prj_west_manifest = os.path.join(get_project_dir(), "west.yml")
try:
(
subprocess.run(
[
os.path.normpath(sys.executable),
os.path.join(
pkg.path, "scripts", "platformio", "install-deps.py"
),
"--platform",
self.name,
] + (
["--manifest", prj_west_manifest]
if os.path.isfile(prj_west_manifest)
else []
)
)
)
except subprocess.CalledProcessError:
self.pm.log.info("Failed to install Zephyr dependencies!")

return pkg

Expand Down

0 comments on commit 754cda5

Please sign in to comment.