Skip to content

Commit fd5b987

Browse files
Also add Portenta H7 upload method
1 parent 6b20efa commit fd5b987

File tree

5 files changed

+89
-6
lines changed

5 files changed

+89
-6
lines changed

connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if("DISCO_H747I" IN_LIST MBED_TARGET_LABELS)
55
add_subdirectory(TARGET_DISCO_H747I)
6-
elseif("PORTENTA_H7" IN_LIST MBED_TARGET_LABELS)
6+
elseif("ARDUINO_PORTENTA_H7" IN_LIST MBED_TARGET_LABELS)
77
add_subdirectory(TARGET_PORTENTA_H7)
88
elseif("NUCLEO_H743ZI2" IN_LIST MBED_TARGET_LABELS)
99
add_subdirectory(TARGET_NUCLEO_H743ZI2)

connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/TARGET_STM32H7/TARGET_STM32H747_ARDUINO/minimal_cyhal_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#define BSP_LED1 PI_12
6060
#define BSP_LED2 PE_3
6161
#define BSP_LED3 PJ_13
62-
#elif TARGET_ARDUINO_PORTENTA
62+
#elif TARGET_ARDUINO_PORTENTA_H7
6363
#define WIFI_SDIO_OOB_IRQ PJ_5
6464
#define WIFI_WL_REG_ON PJ_1
6565
#define BSP_LED1 PK_5

targets/targets.json5

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,16 +3706,34 @@ mode is recommended for target MCUs with small amounts of flash and RAM.",
37063706
"hse_value": 25000000,
37073707
// Can use overdrive because LDO is regulating core voltage (even though
37083708
// the LDO power comes from the SMPS).
3709-
"enable-overdrive-mode": 1
3709+
"enable-overdrive-mode": 1,
3710+
"console-usb": true,
3711+
"console-uart": false
37103712
},
37113713
"device_name": "STM32H747XIHx",
37123714
"image_url": "https://store.arduino.cc/cdn/shop/products/ABX00042_00.iso_1200x900.jpg?v=1675840144"
37133715
},
37143716
"ARDUINO_PORTENTA_H7_M7": {
3715-
"inherits": ["MCU_STM32H747xI_CM7", "ARDUINO_PORTENTA_H7"]
3717+
"inherits": ["MCU_STM32H747xI_CM7", "ARDUINO_PORTENTA_H7"],
3718+
3719+
// Leave room for the Arduino bootloader, using the next 1M of space
3720+
"memory_bank_config": {
3721+
"IROM1": {
3722+
"start": 0x08040000,
3723+
"size": 0x100000
3724+
},
3725+
}
37163726
},
37173727
"ARDUINO_PORTENTA_H7_M4": {
3718-
"inherits": ["MCU_STM32H747xI_CM4", "ARDUINO_PORTENTA_H7"]
3728+
"inherits": ["MCU_STM32H747xI_CM4", "ARDUINO_PORTENTA_H7"],
3729+
3730+
// Leave room for the Arduino bootloader and the CM7 application, using the next 768k of space
3731+
"memory_bank_config": {
3732+
"IROM1": {
3733+
"start": 0x08140000,
3734+
"size": 0xC0000
3735+
},
3736+
}
37193737
},
37203738
"MCU_STM32H750xB": {
37213739
"inherits": [

targets/upload_method_cfg/ARDUINO_GIGA_CM7.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set(MBED_RESET_BAUDRATE 115200)
2020
# -------------------------------------------------------------
2121

2222
set(JLINK_UPLOAD_ENABLED FALSE)
23-
set(JLINK_CPU_NAME STM32H743ZI)
23+
set(JLINK_CPU_NAME STM32H747XI)
2424
set(JLINK_CLOCK_SPEED 4000)
2525
set(JLINK_UPLOAD_INTERFACE SWD)
2626

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Mbed OS upload method configuration file for target ARDUINO_PORTENTA_H7_M7.
2+
# To change any of these parameters from their default values, set them in your build script between where you
3+
# include app.cmake and where you add mbed os as a subdirectory.
4+
5+
# Notes:
6+
# 1. To use this target with PyOCD, you need to install a pack: `pyocd pack install STM32H747XIHx`.
7+
# You might also need to run `pyocd pack update` first.
8+
9+
# General config parameters
10+
# -------------------------------------------------------------
11+
set(UPLOAD_METHOD_DEFAULT MBED)
12+
13+
# Config options for MBED
14+
# -------------------------------------------------------------
15+
16+
set(MBED_UPLOAD_ENABLED TRUE)
17+
set(MBED_RESET_BAUDRATE 115200)
18+
19+
# Config options for JLINK
20+
# -------------------------------------------------------------
21+
22+
set(JLINK_UPLOAD_ENABLED FALSE)
23+
set(JLINK_CPU_NAME STM32H747XI)
24+
set(JLINK_CLOCK_SPEED 4000)
25+
set(JLINK_UPLOAD_INTERFACE SWD)
26+
27+
# Config options for PYOCD
28+
# -------------------------------------------------------------
29+
30+
set(PYOCD_UPLOAD_ENABLED TRUE)
31+
set(PYOCD_TARGET_NAME STM32H747XIHx)
32+
set(PYOCD_CLOCK_SPEED 4000k)
33+
34+
# Config options for OPENOCD
35+
# -------------------------------------------------------------
36+
37+
set(OPENOCD_UPLOAD_ENABLED TRUE)
38+
set(OPENOCD_CHIP_CONFIG_COMMANDS
39+
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/stm32h747.cfg)
40+
41+
# Config options for STM32Cube
42+
# -------------------------------------------------------------
43+
44+
set(STM32CUBE_UPLOAD_ENABLED TRUE)
45+
set(STM32CUBE_CONNECT_COMMAND -c port=SWD reset=HWrst)
46+
set(STM32CUBE_GDBSERVER_ARGS --swd --initialize-reset --apid 0)
47+
48+
# Config options for STM32Cube DFU
49+
# -------------------------------------------------------------
50+
51+
set(STM32CUBE_DFU_UPLOAD_ENABLED TRUE)
52+
set(STM32CUBE_CONNECT_COMMAND -c port=USB vid=0x2341 pid=0x035b)
53+
54+
# Config options for stlink
55+
# -------------------------------------------------------------
56+
57+
set(STLINK_UPLOAD_ENABLED TRUE)
58+
set(STLINK_ARGS --connect-under-reset)
59+
60+
# Config options for dfu-util
61+
# -------------------------------------------------------------
62+
63+
set(DFU_UTIL_UPLOAD_ENABLED TRUE)
64+
set(DFU_UTIL_TARGET_VID_PID 2341:035b)
65+
set(DFU_UTIL_TARGET_INTERFACE 0)

0 commit comments

Comments
 (0)