From 19d3225fd66573a2a62ece83158cd5551255f2ad Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 26 Sep 2016 20:57:10 +0000 Subject: adc-power: update makefiles with work lying around --- openocd/openocd.common.cfg | 10 ++++++++++ openocd/openocd.stm32f072disco.cfg | 14 ++++++++++++++ openocd/openocd.stm32f072disco.local.cfg | 2 ++ openocd/openocd.stm32f4-disco.cfg | 8 ++++---- openocd/openocd.stm32f4-disco.local.cfg | 2 ++ openocd/openocd.stm32l1-generic.cfg | 15 +++++++++++++++ 6 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 openocd/openocd.common.cfg create mode 100644 openocd/openocd.stm32f072disco.cfg create mode 100644 openocd/openocd.stm32f072disco.local.cfg create mode 100644 openocd/openocd.stm32f4-disco.local.cfg create mode 100644 openocd/openocd.stm32l1-generic.cfg (limited to 'openocd') diff --git a/openocd/openocd.common.cfg b/openocd/openocd.common.cfg new file mode 100644 index 0000000..b601cde --- /dev/null +++ b/openocd/openocd.common.cfg @@ -0,0 +1,10 @@ +# Shared openocd script helpers + +# put things like "hla_serial 'asdfadfa'" in openocd..local.cfg to support +# multiple simultaneously connected boards. +proc optional_local { LOCAL_FILE } { + if { [ file exists $LOCAL_FILE ] } { + puts "Loading custom local settings from $LOCAL_FILE" + source $LOCAL_FILE + } +} diff --git a/openocd/openocd.stm32f072disco.cfg b/openocd/openocd.stm32f072disco.cfg new file mode 100644 index 0000000..b7cc25b --- /dev/null +++ b/openocd/openocd.stm32f072disco.cfg @@ -0,0 +1,14 @@ +source [find interface/stlink-v2.cfg] +set WORKAREASIZE 0x4000 +source [find target/stm32f0x.cfg] + +source openocd.common.cfg +optional_local "openocd.stm32f072disco.local.cfg" + +# no trace on cm0 +#tpiu config internal swodump.stm32f4disco.log uart off 168000000 + +# Uncomment to reset on connect, for grabbing under WFI et al +reset_config srst_only srst_nogate +# reset_config srst_only srst_nogate connect_assert_srst + diff --git a/openocd/openocd.stm32f072disco.local.cfg b/openocd/openocd.stm32f072disco.local.cfg new file mode 100644 index 0000000..f81e2a3 --- /dev/null +++ b/openocd/openocd.stm32f072disco.local.cfg @@ -0,0 +1,2 @@ +# serial of my f072 disco board. +hla_serial "Q?o\x06PgHW#$\x16?" diff --git a/openocd/openocd.stm32f4-disco.cfg b/openocd/openocd.stm32f4-disco.cfg index 478fe30..a93997c 100644 --- a/openocd/openocd.stm32f4-disco.cfg +++ b/openocd/openocd.stm32f4-disco.cfg @@ -2,12 +2,12 @@ source [find interface/stlink-v2.cfg] set WORKAREASIZE 0x4000 source [find target/stm32f4x.cfg] -# serial of my f4 disco board. -hla_serial "W?k\x06IgHV0H\x10?" +source openocd.common.cfg +optional_local "openocd.stm32f4-disco.local.cfg" tpiu config internal swodump.stm32f4disco.log uart off 168000000 # Uncomment to reset on connect, for grabbing under WFI et al -reset_config srst_only srst_nogate -# reset_config srst_only srst_nogate connect_assert_srst +#reset_config srst_only srst_nogate +reset_config srst_only srst_nogate connect_assert_srst diff --git a/openocd/openocd.stm32f4-disco.local.cfg b/openocd/openocd.stm32f4-disco.local.cfg new file mode 100644 index 0000000..8cace82 --- /dev/null +++ b/openocd/openocd.stm32f4-disco.local.cfg @@ -0,0 +1,2 @@ +# serial of my f4 disco board. +hla_serial "W?k\x06IgHV0H\x10?" diff --git a/openocd/openocd.stm32l1-generic.cfg b/openocd/openocd.stm32l1-generic.cfg new file mode 100644 index 0000000..6b39750 --- /dev/null +++ b/openocd/openocd.stm32l1-generic.cfg @@ -0,0 +1,15 @@ +# l1 generic, using a l4 disco board +#source [find interface/stlink-v2-1.cfg] +# l1 disco itself or similar +source [find interface/stlink-v2.cfg] +set WORKAREASIZE 0x2000 +source [find target/stm32l1.cfg] + +#hla_serial "066DFF495351885087171826" # My l4 disco +hla_serial "S?l\x06H?WQ%\x10\x18?" # My l1 disco + +tpiu config internal swodump.stm32l1-generic.log uart off 32000000 + +# Uncomment to reset on connect, for grabbing under WFI et al +reset_config srst_only srst_nogate +# reset_config srst_only srst_nogate connect_assert_srst -- cgit