From d82838212bb696fc0980df15f80808271c402d27 Mon Sep 17 00:00:00 2001 From: JohnK1987 Date: Thu, 8 Sep 2022 22:39:18 +0200 Subject: [PATCH] Summary of changes: This PR adds the cmake config for upload method of Nucleo-F446RE All methods have been tested (only for flash), but for soem reason ST-link metho is not stable. --- targets/upload_method_cfg/NUCLEO_F446RE.cmake | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 targets/upload_method_cfg/NUCLEO_F446RE.cmake diff --git a/targets/upload_method_cfg/NUCLEO_F446RE.cmake b/targets/upload_method_cfg/NUCLEO_F446RE.cmake new file mode 100644 index 0000000000..5705048a93 --- /dev/null +++ b/targets/upload_method_cfg/NUCLEO_F446RE.cmake @@ -0,0 +1,56 @@ +# Mbed OS upload method configuration file for target NUCLEO_F446RE. +# To change any of these parameters from their default values, set them in your build script between where you +# include app.cmake and where you add mbed os as a subdirectory. + +# Notes: +# 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/ + +# General config parameters +# ------------------------------------------------------------- +set(UPLOAD_METHOD_DEFAULT MBED) + +# Config options for MBED +# ------------------------------------------------------------- + +set(MBED_UPLOAD_ENABLED TRUE) +set(MBED_RESET_BAUDRATE 115200) + +# Config options for JLINK +# ------------------------------------------------------------- + +set(JLINK_UPLOAD_ENABLED TRUE) +set(JLINK_CPU_NAME STM32F446RE) +set(JLINK_CLOCK_SPEED 4000) +set(JLINK_UPLOAD_INTERFACE SWD) + +# Config options for PYOCD +# ------------------------------------------------------------- +# 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. +# If any package for your family is not on the list, then you need install them via command "pyocd pack install stm32f4". +# Then just type "pyocd pack find STM32f4" or "pyocd pack find STM32f446" or "pyocd pack find STM32f446RE" and you will see the part name of your target. + +set(PYOCD_UPLOAD_ENABLED TRUE) +set(PYOCD_TARGET_NAME STM32F446RETx) +set(PYOCD_CLOCK_SPEED 4000k) + +# Config options for OPENOCD +# ------------------------------------------------------------- + +set(OPENOCD_UPLOAD_ENABLED TRUE) +set(OPENOCD_CHIP_CONFIG_COMMANDS + -f ${OpenOCD_SCRIPT_DIR}/board/st_nucleo_f4.cfg) + +# Config options for STM32Cube +# ------------------------------------------------------------- + +set(STM32CUBE_UPLOAD_ENABLED TRUE) +set(STM32CUBE_CONNECT_COMMAND -c port=SWD reset=HWrst) +set(STM32CUBE_GDBSERVER_ARGS --swd) + +# Config options for stlink +# ------------------------------------------------------------- +# It is working, but for some reason is no much stable and I do not know why! + +set(STLINK_UPLOAD_ENABLED TRUE) +set(STLINK_LOAD_ADDRESS 0x8000000)