From da804b5b05c9cb7a72e016e9ae0b5f72a9ab0705 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 26 Aug 2017 19:02:38 -0400 Subject: [PATCH] debugging older boards --- misc/install/openocd/stlink-v2.cfg | 16 ++++++++++++++++ misc/install/openocd/stm32f4discovery.cfg | 10 ++++++++++ misc/install/run_openocd_original.bat | 5 +++++ 3 files changed, 31 insertions(+) create mode 100644 misc/install/openocd/stlink-v2.cfg create mode 100644 misc/install/openocd/stm32f4discovery.cfg create mode 100644 misc/install/run_openocd_original.bat diff --git a/misc/install/openocd/stlink-v2.cfg b/misc/install/openocd/stlink-v2.cfg new file mode 100644 index 0000000000..ae545a1187 --- /dev/null +++ b/misc/install/openocd/stlink-v2.cfg @@ -0,0 +1,16 @@ +# +# STMicroelectronics ST-LINK/V2 in-circuit debugger/programmer +# + +interface hla +hla_layout stlink +hla_device_desc "ST-LINK/V2" +hla_vid_pid 0x0483 0x3748 + +# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2 +# devices seem to have serial numbers with unreadable characters. ST-LINK/V2 +# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial +# number reset issues. +# eg. +#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f" + diff --git a/misc/install/openocd/stm32f4discovery.cfg b/misc/install/openocd/stm32f4discovery.cfg new file mode 100644 index 0000000000..bbbab5b400 --- /dev/null +++ b/misc/install/openocd/stm32f4discovery.cfg @@ -0,0 +1,10 @@ +# This is an STM32F4 discovery board with a single STM32F407VGT6 chip. +# http://www.st.com/internet/evalboard/product/252419.jsp + +source [find openocd/stlink-v2.cfg] + +transport select hla_swd + +source [find openocd/stm32f4x.cfg] + +reset_config srst_only diff --git a/misc/install/run_openocd_original.bat b/misc/install/run_openocd_original.bat new file mode 100644 index 0000000000..73f9de75c3 --- /dev/null +++ b/misc/install/run_openocd_original.bat @@ -0,0 +1,5 @@ +rem if you have an older Rev C discovery please update to latest Rev D firmware + +rem As of March 2017 this enabled GDB debugging using ARM Eclipse plug-in + +openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c reset