Skip to content

Commit 811291c

Browse files
Add NUCLEO_F401RE.cmake (#506)
1 parent b9180e7 commit 811291c

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Mbed OS upload method configuration file for target NUCLEO_F401RE.
2+
# To change any of these parameters from their default values, set them in your build script between where you
3+
# include mbed_toolchain_setup and where you add mbed os as a subdirectory.
4+
5+
# Notes:
6+
# 1. Using the JLINK upload method with your dev board requires converting its ST-LINK into a J-Link. See here for details: https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
7+
8+
# General config parameters
9+
# -------------------------------------------------------------
10+
set(UPLOAD_METHOD_DEFAULT MBED)
11+
12+
# Config options for MBED
13+
# -------------------------------------------------------------
14+
15+
set(MBED_UPLOAD_ENABLED TRUE)
16+
set(MBED_RESET_BAUDRATE 115200)
17+
18+
# Config options for JLINK
19+
# -------------------------------------------------------------
20+
21+
set(JLINK_UPLOAD_ENABLED TRUE)
22+
set(JLINK_CPU_NAME STM32F401RE)
23+
set(JLINK_CLOCK_SPEED 4000)
24+
set(JLINK_UPLOAD_INTERFACE SWD)
25+
26+
# Config options for PYOCD
27+
# -------------------------------------------------------------
28+
# If your target is not natively supported by the pyOCD, then you need install a keil package for family of your target by hands.
29+
# Type "pyocd pack show" to console and you will see a list of already installed packages.
30+
# If any package for your family is not on the list, then you need install them via command "pyocd pack install stm32f4".
31+
# Then just type "pyocd pack find STM32f4" or "pyocd pack find STM32F401" or "pyocd pack find STM32F401RE" and you will see the part name of your target.
32+
33+
set(PYOCD_UPLOAD_ENABLED TRUE)
34+
set(PYOCD_TARGET_NAME STM32F401RETx)
35+
set(PYOCD_CLOCK_SPEED 4000k)
36+
37+
# Config options for OPENOCD
38+
# -------------------------------------------------------------
39+
40+
set(OPENOCD_UPLOAD_ENABLED TRUE)
41+
set(OPENOCD_CHIP_CONFIG_COMMANDS
42+
-f ${OpenOCD_SCRIPT_DIR}/board/st_nucleo_f4.cfg)
43+
44+
# Config options for STM32Cube
45+
# -------------------------------------------------------------
46+
47+
set(STM32CUBE_UPLOAD_ENABLED TRUE)
48+
set(STM32CUBE_CONNECT_COMMAND -c port=SWD reset=HWrst)
49+
set(STM32CUBE_GDBSERVER_ARGS --swd)
50+
51+
# Config options for stlink
52+
# -------------------------------------------------------------
53+
54+
set(STLINK_UPLOAD_ENABLED TRUE)
55+
set(STLINK_LOAD_ADDRESS 0x8000000)
56+
set(STLINK_ARGS --connect-under-reset)

0 commit comments

Comments
 (0)