On Mon, Jan 02, 2017 at 10:29:55PM +0100, Åke Rehnman wrote: > What I've done is for .assert_srst I implement this as "drive external srst" > from the stlink dongle e.g if the parameter srst is "0" i drive the reset > line "0" and wise verse. > > For .reset I do nothing for the moment but that is probably not correct.
According to [1] this reset callback is used only from adapter_assert_reset() from hla_target.c. What this adapter_assert_reset() function basically does is it uses hardware SRST line if user has used "reset_config" command to tell OpenOCD that it's available; then it resets (unconditionally, why, that's probably a bug! but a harmless one) the target by using hla_adapter's reset() method which in case of stlink and cortex-m leads to setting SYSRESETREQ bit that should be equivalent to full hardware reset on proper Cortex-M devices. Is there a reliable nice way to reset stm8 without hardware srst line? Then you should most likely add the relevant code to .reset() and since you're writing your own hla_target implementation you should only call it if reset config says SRST is not available. [1] http://openocd.org/doc-release/doxygen/structhl__layout__api__s.html -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:[email protected] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
