6
\$\begingroup\$

Is it possible to disable the USB Mass Storage option on the STLink hardware of the Nucleo board? I want to prevent mounting the device when I plug it into computers (while keeping the virtual com port).

I am using nucleo-32 and nucleo-64 boards by programming them with OpenOCD and then using STLink's virtual com port to handle USB comms with my target device. In this setup, having the STLink part of my board auto-mount itself every time I plug it is is distracting. In particular, I don't want the user to see the mounted disk to get a warning if it is unplugged without being unmounted.

I am working mostly in linux and there I should be able to make a udev rule to block mounting the USB Mass Storage device, which is my backup plan. However, I would like to disable this on the hardware itself, so that on Windows and Mac no mounting occurs. I guess it might be possible to reverse engineer the STLink firmware and re-flash with the USB Mass Storage device disabled. But I wonder if there is an easier way.

(I am most interested in the Nucleo-64 NUCLEO-F303RE board, but I think the answer will likely be relevant for all Nucleo boards.)

\$\endgroup\$

2 Answers 2

5
\$\begingroup\$

In the recent STLinkUpgrade 3.3.0 I can see checkbox "Change Type" offering "Debug + Mass storage + VCP" or "Debug + VCP". Seems like the way to go.

To download the latest and greatest version: https://www.st.com/en/development-tools/stsw-link007.html

Just click on the "Get Software".

\$\endgroup\$
2
  • \$\begingroup\$ Can you add a link to the software? I haven't been able to find it yet. \$\endgroup\$ Commented Mar 31, 2019 at 0:32
  • \$\begingroup\$ IIRC, I've downloaded it here: st.com/en/development-tools/stsw-link007.html Click on the "Get Software", there's a list down below. \$\endgroup\$ Commented Apr 24, 2019 at 8:32
2
\$\begingroup\$

It works only for boards with ST-Link V2. Boards with ST-Link V3 do not have this 'type' option, e.g. NUCLEO-H743ZI (V2) is fine, NUCLEO-H743ZI2 (V3) does not.

\$\endgroup\$
2
  • \$\begingroup\$ Hi, "It works only for boards with ST-Link V2 [...]" That doesn't seem to answer the question at the top of the page. Are you responding to the (currently only other) answer by Radek Šenfeld? I see you are new here (welcome!) & it seems you are using the site like a forum, with just one type of "post". Things are different here; answers (where you posted) must answer the original question (top of the page). Although you can't write a comment, if you confirm you are replying to that answer, I'll ask for it to be converted to a comment. \$\endgroup\$
    – SamGibson
    Commented Oct 8, 2020 at 20:02
  • \$\begingroup\$ You can (while this "answer" still exists) reply to me in a comment - please click the "add a comment" link below, to reply to my comment above. Thanks (Please don't write another "answer"!) \$\endgroup\$
    – SamGibson
    Commented Oct 8, 2020 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.