How can I reflash FST-01 with SWD port?

Q: I got FST-01 with Gnuk 1.0.1. I want to reflash it to replace firmware with my own one (newer development version of Gnuk, or NeuG). How can I reflash with SWD port? Any recommendation for SWD debugger?

Answers

Connection of ST-Link/V2 compatible to FST-01
  • ST-Link/V2 compatible

    Diego Marciano kindly shared an article.

  • ST-Link/V2 -- gniibe

    I am using ST-Link/V2, as its availability is good.

    Please see SWD connection to FST-01 for pictures of connection.

    Note that I connect USB Hub to feed power from USB Hub to FST-01 (while the examples above feed power from ST-Link/V2 compatible).

    Note that the wire should be short enough to keep good signal.

    You need setting for ST-Link/V2, say, in a file /etc/udev/rules.d/10-stlink.rules (on GNU/Linux):

    ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0483", \
    ATTR{idProduct}=="3748", GROUP="tape", MODE="664", SYMLINK+="stlink"
    

    Then, you can unprotect flash ROM of FST-01 by:

    $ ./tool/stlinkv2.py -u
    

    and let the board power off and power on (this is needed procedure for unprotection).

    After that, you can program by:

    $ ./tool/stlinkv2.py <BINARY>.bin
    

    and again power off and power on (this is needed for protection).

    The tool is available within the Gnuk source code distribution under the directory tool/.