On 2017-11-02 11:14, Tomas Vanek wrote:
So I propose for #3952 (the real code should check errors of course):

Were you able to have a look at the implementation I cooked up in the latest change set? Basically I just emit a mode enter before stlink_usb_assert_srst() if we are about to go swimming. Then the rest of the original code mode_enter etc etc.

    if (connect_under_reset) {
        /* if we are going to use swim we need to switch mode early */
        if (emode == STLINK_MODE_DEBUG_SWIM) {
            res = stlink_usb_mode_enter(handle, emode);
            if (res != ERROR_OK)
                return res;
        }
        res = stlink_usb_assert_srst(handle, 0);
        if (res != ERROR_OK)
            return res;
    }

    res = stlink_usb_mode_enter(handle, emode);

    if (res != ERROR_OK)
        return res;

    res = stlink_usb_current_mode(handle, &mode);



BTW Thanks for a huge contribution

Well, lets see if it gets merged eventually maybe....

/Ake
------------------------------------------------------------------------------
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

Reply via email to