Skip to content

Commit 810bb31

Browse files
authored
Add Cmake config for Nucleo-L152RE and Nucleo-F303K8 into upload methods (ARMmbed#46)
1 parent 2131c7d commit 810bb31

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Mbed OS upload method configuration file for target NUCLEO_F303K8.
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. 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+
# 2. If your target is not natively supported by the pyOCD, then you need install a keil package for family of your target by hands. Type "pyocd pack show" to console and you will see a list of already installed packages.
8+
# If any package for your family is not on the list, then you need install them via command "pyocd pack install stm32f3".Then just type "pyocd pack find STM32f3" or "pyocd pack find STM32f303" and you will see the part name of your target.
9+
# Alternqativly you can type command "pyocd list" whne your board is connected. You will see state of your board.
10+
11+
# General config parameters
12+
# -------------------------------------------------------------
13+
set(UPLOAD_METHOD_DEFAULT MBED)
14+
15+
# Config options for MBED
16+
# -------------------------------------------------------------
17+
18+
set(MBED_UPLOAD_ENABLED TRUE)
19+
set(MBED_RESET_BAUDRATE 115200)
20+
21+
# Config options for JLINK
22+
# -------------------------------------------------------------
23+
24+
set(JLINK_UPLOAD_ENABLED TRUE)
25+
set(JLINK_CPU_NAME STM32F303K8)
26+
set(JLINK_CLOCK_SPEED 4000)
27+
set(JLINK_UPLOAD_INTERFACE SWD)
28+
29+
# Config options for PYOCD
30+
# -------------------------------------------------------------
31+
32+
set(PYOCD_UPLOAD_ENABLED TRUE)
33+
set(PYOCD_TARGET_NAME STM32F303K8Ux)
34+
set(PYOCD_CLOCK_SPEED 4000k)
35+
36+
# Config options for OPENOCD
37+
# -------------------------------------------------------------
38+
39+
set(OPENOCD_UPLOAD_ENABLED TRUE)
40+
set(OPENOCD_CHIP_CONFIG_COMMANDS
41+
-f ${OpenOCD_SCRIPT_DIR}/board/st_nucleo_f3.cfg)
42+
43+
# Config options for STM32Cube
44+
# -------------------------------------------------------------
45+
46+
set(STM32CUBE_UPLOAD_ENABLED TRUE)
47+
set(STM32CUBE_CONNECT_COMMAND -c port=SWD reset=HWrst)
48+
set(STM32CUBE_GDBSERVER_ARGS --swd)
49+
50+
# Config options for stlink
51+
# -------------------------------------------------------------
52+
53+
set(STLINK_UPLOAD_ENABLED TRUE)
54+
set(STLINK_LOAD_ADDRESS 0x8000000)
55+
set(STLINK_ARGS --connect-under-reset)
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_L152RE.
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. 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+
# 2. If your target is not natively supported by the pyOCD, then you need install a keil package for family of your target by hands. Type "pyocd pack show" to console and you will see a list of already installed packages.
8+
# If any package for your family is not on the list, then you need install them via command "pyocd pack install stm32l1".Then just type "pyocd pack find STM32l1" or "pyocd pack find STM32l152" and you will see the part name of your target.
9+
# Alternqativly you can type command "pyocd list" whne your board is connected. You will see state of your board.
10+
# 3. The STLINK upload method is disabled by default, because it is not usable on this target. ST-link keeps flashing and never stops.
11+
12+
# General config parameters
13+
# -------------------------------------------------------------
14+
set(UPLOAD_METHOD_DEFAULT MBED)
15+
16+
# Config options for MBED
17+
# -------------------------------------------------------------
18+
19+
set(MBED_UPLOAD_ENABLED TRUE)
20+
set(MBED_RESET_BAUDRATE 115200)
21+
22+
# Config options for JLINK
23+
# -------------------------------------------------------------
24+
25+
set(JLINK_UPLOAD_ENABLED TRUE)
26+
set(JLINK_CPU_NAME STM32L152RE)
27+
set(JLINK_CLOCK_SPEED 4000)
28+
set(JLINK_UPLOAD_INTERFACE SWD)
29+
30+
# Config options for PYOCD
31+
# -------------------------------------------------------------
32+
33+
set(PYOCD_UPLOAD_ENABLED TRUE)
34+
set(PYOCD_TARGET_NAME STM32L152RETx)
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_l1.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 FALSE)
55+
set(STLINK_LOAD_ADDRESS 0x8000000)
56+
set(STLINK_ARGS --connect-under-reset)

0 commit comments

Comments
 (0)