Menu

OpenIOCD on STM8S003F3P6: stlink_swim_enter_failed

Eludias
2017-11-18
2017-11-18
  • Eludias

    Eludias - 2017-11-18

    Hi all,

    After building the patched OpenOCD, I cannot get OpenOCD to connect to my STM8S003F3P6 via a ST-LINK v2 (on a $1.30 thermostate, real fun: https://github.com/TG9541/stm8ef/wiki/Board-W1209 )

    $ openocd -f interface/stlink-v2.cfg -f target/stm8s003.cfg -c "init" -c "reset halt"
    Open On-Chip Debugger 0.10.0
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    adapter speed: RCLK - adaptive
    srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
    Info : Unable to match requested speed 0 kHz, using 5 kHz
    Info : Unable to match requested speed 0 kHz, using 5 kHz
    Info : RCLK (adaptive clock speed) not supported - fallback to 5 kHz
    Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
    Info : using stlink api v2
    Info : Target voltage: 3.241270
    Error: stlink_swim_enter_failed (unable to connect to the target)
    in procedure 'init'
    in procedure 'ocd_bouncer'

    stm8flash does work on the device, that's how I do my development right now (debugging via LEDs ;-) .

    Any ideas?

    Regards,
    Rutger.

     
    • akre

      akre - 2017-11-18

      Hello and thanks for your interest in the stm8 gdb project.

      It is usually a reset problem. Or the swim port pin is reconfigured during early startup code. Difficult to say, you should provide a debug dump with -d3 flag. You might also try editing stm8.cfg and enable connect under reset (look at the end of the stm8.cfg). Or use soft reset by changing reset config to none with 'reset_config none'.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.