Author Topic: ST-Link V2 Virtual COM Port Not Working  (Read 1143 times)

0 Members and 1 Guest are viewing this topic.

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 18184
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
ST-Link V2 Virtual COM Port Not Working
« on: October 03, 2021, 11:24:59 am »
Anyone had this?  Windows 7, driver's installed, it's assigned a port number (as seen in Device Manager, show hidden devices) but doesn't show up (not present).  Neither standalone ST-LINK dongle nor Discovery board work.  Up to date drivers, and firmware (version V2J37S0).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #1 on: October 03, 2021, 05:29:36 pm »
Anyone had this?  Windows 7, driver's installed, it's assigned a port number (as seen in Device Manager, show hidden devices) but doesn't show up (not present).  Neither standalone ST-LINK dongle nor Discovery board work.  Up to date drivers, and firmware (version V2J37S0).

Tim

First the 2 cents disclaimer:
i do not use windooze for nothing these days..

But i just follow the comedy show their shitty products provide...

The folk here on this channel provides some interesting STM32 hints and tips..
Reason some times i enjoy listening his ideas...

One ancient one shows some bizarre tricks needed to workaround the buggy lib-usb in windooze...

Fast forward to about 8minutes.


Portugues (galicia style) spoken but youtube provides translation in english reasonable audible..

About Maple and STM32 transition he has some interesting comments

Paul
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 18184
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #2 on: October 03, 2021, 05:54:46 pm »
It is not a libusb device.

(I do have a libusb device, which works fine, namely via avrdude.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #3 on: October 03, 2021, 09:49:26 pm »
Fast forward to about  13 minutes when he presents the solution by device itself

It is written on the board.. and spoken

In case of trouble drop a note may i can translate the board to help

Paul
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 7788
  • Country: fr
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #4 on: October 03, 2021, 11:05:12 pm »
What happens when you plug the dongle in? Does Windows enumerate it? Does it show a message about the device having malfunctioned?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 18184
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #5 on: October 04, 2021, 06:57:09 am »
Fast forward to about  13 minutes when he presents the solution by device itself

It is written on the board.. and spoken

In case of trouble drop a note may i can translate the board to help

Paul

Unfortunately the translation doesn't cover onscreen content, and the CC translation is far too spotty to find something so specific.  Could you summarize the video's situation and resolution?


What happens when you plug the dongle in? Does Windows enumerate it? Does it show a message about the device having malfunctioned?

The Link part works as normal.  The VCOM doesn't seem to show up at all, like it's not enumerating it.  I don't see anything about settings to activate it or anything, I assume it should Just Work(TM).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #6 on: October 04, 2021, 08:53:57 am »
Give me some hours i will see if i can post a  suitable translation
...
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #7 on: October 04, 2021, 12:16:09 pm »
I will not enter details on how to display SUBs (in particular the ASS style here)

IN *NIX any decent player will open the SUB as long as it has the same name as the video selected.. VLC MPlayer and a dozen others..

Hence you need to download the video locally (youtubedl) and do that

Code: [Select]
[Script Info]
Title: MapleMiniHack
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.601
PlayResX: 1280
PlayResY: 720

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:07:07.38,0:07:10.02,Default,,0,0,0,,{\fscx297\fscy246}... Arduino IDE installation ...
Dialogue: 0,0:07:10.25,0:07:14.18,Default,,0,0,0,,{\fscx297\fscy246}....which is an important issue...\Nconsidering many could not install it
Dialogue: 0,0:07:14.18,0:07:16.18,Default,,0,0,0,,{\fscx297\fscy246}... and then I would like to consider....
Dialogue: 0,0:07:16.18,0:07:18.18,Default,,0,0,0,,{\fscx297\fscy246} I would like to make a consideration...
Dialogue: 0,0:07:18.18,0:07:24.01,Default,,0,0,0,,{\fscx297\fscy246}This type of installation considered here
Dialogue: 0,0:07:24.01,0:07:26.01,Default,,0,0,0,,{\fscx297\fscy246}.. is more or less the standard default installation...
Dialogue: 0,0:07:26.01,0:07:30.53,Default,,0,0,0,,{\fscx297\fscy246} but there are cases where you can buy a CHIP...
Dialogue: 0,0:07:30.53,0:07:33.57,Default,,0,0,0,,{\fscx297\fscy246}that will be easier to install than this one here.
Dialogue: 0,0:07:33.57,0:07:39.44,Default,,0,0,0,,{\fscx297\fscy246}Why? Because depending on the manufacturer it can have a different boot loader
Dialogue: 0,0:07:39.56,0:07:48.00,Default,,0,0,0,,{\fscx297\fscy246}It happens, and I myself  own an STM32 which did not required this.
Dialogue: 0,0:07:48.00,0:07:51.92,Default,,0,0,0,,{\fscx297\fscy246}The button press procedure explained here will not be necessary...ok?
Dialogue: 0,0:07:51.92,0:07:55.17,Default,,0,0,0,,{\fscx297\fscy246}Before starting, it is even noted here...
Dialogue: 0,0:07:55.17,0:07:58.49,Default,,0,0,0,,{\fscx297\fscy246}Make sure that all drivers are installed...
Dialogue: 0,0:07:58.49,0:08:04.29,Default,,0,0,0,,{\fscx297\fscy246}...and if not...we need to install the Serial Upload and DFU drivers
Dialogue: 0,0:08:04.29,0:08:08.24,Default,,0,0,0,,{\fscx297\fscy246}Here I left the URL to Windows drivers installation
Dialogue: 0,0:08:08.24,0:08:15.40,Default,,0,0,0,,{\fscx297\fscy246}and here when you insert Maple Mini into USB....
Dialogue: 0,0:08:15.40,0:08:18.38,Default,,0,0,0,,{\fscx297\fscy246}You should see Maple DFU here...
Dialogue: 0,0:08:18.38,0:08:24.80,Default,,0,0,0,,{\fscx297\fscy246}So you open Device Manager and see device has been recognized
Dialogue: 0,0:08:24.80,0:08:33.68,Default,,0,0,0,,{\fscx297\fscy246}I can tell just for Windows 10..  may be some odds are found on previous versions...
Dialogue: 0,0:08:33.68,0:08:43.02,Default,,0,0,0,,{\fscx297\fscy246}More updated Windows versions can recognize a weider range of devices
Dialogue: 0,0:08:43.02,0:08:45.97,Default,,0,0,0,,{\fscx297\fscy246}... and some devices are even built in pre installed. ok?
Dialogue: 0,0:08:45.97,0:08:53.34,Default,,0,0,0,,{\fscx297\fscy246}Then we have a pitfall and lot of people make a mistake.. when you will compile Maple Mini
Dialogue: 0,0:08:53.34,0:09:09.88,Default,,0,0,0,,{\fscx297\fscy246}even though MapleMini comes from ST, it is kinda genetic brother of Arduino Due
Dialogue: 0,0:09:09.88,0:09:16.80,Default,,0,0,0,,{\fscx297\fscy246}Hence, you need here in Arduino IDE select Due
Dialogue: 0,0:09:16.88,0:09:28.20,Default,,0,0,0,,{\fscx297\fscy246}Select Board Manager, Select Due and make sure to install it
Dialogue: 0,0:09:28.20,0:09:37.02,Default,,0,0,0,,{\fscx297\fscy246}If you don't do this it will not work. This a very common mistake made by many
Dialogue: 0,0:09:37.02,0:09:52.17,Default,,0,0,0,,{\fscx297\fscy246}It will not compile, gcc will only use the proper instruction set when it is installed
Dialogue: 0,0:09:52.17,0:10:03.42,Default,,0,0,0,,{\fscx297\fscy246}I know that for many this is overwhelming and some day I will explain the Arduino IDE under the hood details
Dialogue: 0,0:10:03.42,0:10:08.94,Default,,0,0,0,,{\fscx297\fscy246}We will speak the truth about Arduino IDE - not bad at all  - just the facts
Dialogue: 0,0:10:08.94,0:10:15.17,Default,,0,0,0,,{\fscx297\fscy246}Arduino is gcc underneath and we are required to install Due.
Dialogue: 0,0:10:15.17,0:10:17.17,Default,,0,0,0,,{\fscx297\fscy246}shall we continue...
Dialogue: 0,0:10:17.17,0:10:44.20,Default,,0,0,0,,{\fscx297\fscy246}Acess Github download this file here and put it on this folder
Dialogue: 0,0:10:44.20,0:11:01.15,Default,,0,0,0,,{\fscx297\fscy246}Those who installed the IDE using MS defaults..should desinstall it
Dialogue: 0,0:11:01.15,0:11:16.50,Default,,0,0,0,,{\fscx297\fscy246}Because the folders used have unadequate properties, may cause issues
Dialogue: 0,0:11:16.50,0:11:33.14,Default,,0,0,0,,{\fscx297\fscy246}The point is Arduino has it's own defaults and is better to use them than MS defaults
Dialogue: 0,0:11:33.14,0:11:44.62,Default,,0,0,0,,{\fscx297\fscy246}Hence it is better to download and install it directly instead MS methods
Dialogue: 0,0:11:44.62,0:11:55.85,Default,,0,0,0,,{\fscx297\fscy246}If needed we create a new STM32 folder and install it. No troubles.
Dialogue: 0,0:11:55.85,0:12:07.48,Default,,0,0,0,,{\fscx297\fscy246}We get used to the folder Arduino hardware, like Heltek. WTF is Heltek?
Dialogue: 0,0:12:07.48,0:12:18.42,Default,,0,0,0,,{\fscx297\fscy246}.. I have spoken about it in other videos.. so we create folders here and drop new hardware...
Dialogue: 0,0:12:19.92,0:12:30.12,Default,,0,0,0,,{\fscx297\fscy246}Then we should restart the IDE and select MapleMini as shown here
Dialogue: 0,0:12:30.12,0:12:37.98,Default,,0,0,0,,{\fscx297\fscy246}or others like ... blah blahh
Dialogue: 0,0:12:37.98,0:12:51.94,Default,,0,0,0,,{\fscx297\fscy246}then we adjust the parameters here...blah blah blah
Dialogue: 0,0:12:51.94,0:13:01.62,Default,,0,0,0,,{\fscx297\fscy246}so here you choose our board...
Dialogue: 0,0:13:01.62,0:13:13.12,Default,,0,0,0,,{\fscx297\fscy246}Now we should talk about an issue - we live in an imperfect world
Dialogue: 0,0:13:13.12,0:13:26.36,Default,,0,0,0,,{\fscx297\fscy246}If the MapleMini does not show up on the COM port you should do the following
Dialogue: 0,0:13:26.36,0:13:38.92,Default,,0,0,0,,{\fscx297\fscy246}This issue is here because I received tons of this issue upon STM flashing
Dialogue: 0,0:13:38.92,0:13:54.62,Default,,0,0,0,,{\fscx297\fscy246}And to complicate further this issue appears on some chips but not others.
Dialogue: 0,0:13:54.62,0:14:00.10,Default,,0,0,0,,{\fscx297\fscy246}But several batches purchased required this hack...
Dialogue: 0,0:14:00.10,0:14:19.92,Default,,0,0,0,,{\fscx297\fscy246}Open a program sketch (any one fits even blink) then click upload WITHOUT  even setting the COM port
Dialogue: 0,0:14:19.92,0:14:41.40,Default,,0,0,0,,{\fscx297\fscy246}Don't even bother .. and this messages should appear  blah blahh
Dialogue: 0,0:14:41.40,0:14:52.38,Default,,0,0,0,,{\fscx297\fscy246}This would be done JUST A SINGLE TIME - not every time
Dialogue: 0,0:14:52.38,0:15:04.82,Default,,0,0,0,,{\fscx297\fscy246}This board has 2 buttons - one is USER
Dialogue: 0,0:15:04.82,0:15:24.18,Default,,0,0,0,,{\fscx297\fscy246}If each fab respected the names... but sometimes they change names...
Dialogue: 0,0:15:24.18,0:15:35.44,Default,,0,0,0,,{\fscx297\fscy246}But the button itself is the same across boards regardless names and I call the external USER and the other RESET
Dialogue: 0,0:15:35.44,0:15:45.30,Default,,0,0,0,,{\fscx297\fscy246}Then **WHILE** we are **LOADING** we hold USER button... this is the HACK!!!
Dialogue: 0,0:15:45.30,0:15:59.55,Default,,0,0,0,,{\fscx297\fscy246}Important note in red - the USER button is used to initialize the board in proper mode
Dialogue: 0,0:15:59.55,0:16:07.75,Default,,0,0,0,,{\fscx297\fscy246}may be handy when installing drivers or on a complete freezed core
Dialogue: 0,0:16:07.75,0:16:21.84,Default,,0,0,0,,{\fscx297\fscy246}After finishing this procedure we must press RESET and the COM port should appear as usual...


Save the script as the same name of the video with ( .ass ) extension (substation subs)

Did that in 10 minutes do not expect perfection

The hack presented may worth the time wasted learning it

Paul
« Last Edit: October 08, 2021, 11:30:06 am by PKTKS »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 18184
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #8 on: October 04, 2021, 02:01:30 pm »
Thanks, that was quite an effort!

I don't see where he's doing anything that applies here though... it looks like he's working with a Maple board, using Arduino IDE or something like that?  And you suppose the tools might be similar enough to ST-Link stuff that there's a procedure that might work?

I don't need a DFU, that appears to be a USB bootloader thing.  I guess that would be okay for updating the ST-Link, but I can already do that with the updater tool, at least with whatever firmware version it detects I should have.  Maybe that's the problem, it doesn't know I can put a more functional version on here?  (Can I?)


The best I can figure right now, -- and I have no fucking clue how this isn't made clear anywhere in the documentation -- it seems that ONLY the ST-LINK V2.1, NOT the -A or -B, NOT the ST-LINK/V2 that's sold, NOT the STM32F429I-DISCO (but yes the -DISC1?), and probably so on with other boards (Nucleo etc.), support VCP and DFU (or some combination anyways).  According to one hack, the difference is (also, apparently a couple pins got swapped around?) down to one singular character: the STM32F103C8T6 substituted by a STM32F103CBT6 (which happens to be double the Flash, a rather important difference).

I'd understand if the random old "DISCO" board I have, doesn't support certain features, but I also have a brand new ST-LINK/V2, there isn't a /V2.1, and everyone seems to just be using whatever the new thing is that enables VCP.  Which, somehow, isn't any of these things?

Also the possibility that I'm trying too hard to avoid installing CubeIDE, and it Just Does Something Magical(TM) that happens to activate this functionality.  I don't see any hint of that, no tools laying around to activate or serve or connect that up, even the incredibly terse (in comparison to most of the tools) CubeProgrammer_CLI doesn't seem to have any way to do that (but, god knows what kind of functionality is hidden inside that thing, maybe that's the trick after all).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #9 on: October 04, 2021, 02:08:46 pm »
Thanks, that was quite an effort!

I don't see where he's doing anything that applies here though... it looks like he's working with a Maple board, using Arduino IDE or something like that?  And you suppose the tools might be similar enough to ST-Link stuff that there's a procedure that might work?

I don't need a DFU, that appears to be a USB bootloader thing.  I guess that would be okay for updating the ST-Link, but I can already do that with the updater tool, at least with whatever firmware version it detects I should have.  Maybe that's the problem, it doesn't know I can put a more functional version on here?  (Can I?)

(..)
Tim



Welcome it just took me rough 10 minutes...  ^-^

He is using the so called BluePill  generic vanilla STM32F103

Using the arduino extensions for that board it is integrated along side all Atmel and etc others.

Regarding the other comments I do use the ST-LIKN V2 clone using usb2ttl adapter
on LINUX (STMVLINK works native on linux) (ST provide a UDEV script as well)

Their comments hold as long as the chip refuses to enumerate..

Regarding don't need an alternate bootloader DFU  this is not true..
You do have an alternate method to upload a customized boot loader and Arduino IDE would not even bother to do that anymore

There are 2 methods indeed.. STVLINK and SERIAL
they differ

both depend on the chip maker to be recognized though..

Kinda adhoc thing

the HACK works and improve chances when chip is not enumerated by USB drivers..

particular problem on windooze.. brain damaged products..

Paul
« Last Edit: October 04, 2021, 02:11:38 pm by PKTKS »
 

Online Bassman59

  • Super Contributor
  • ***
  • Posts: 2172
  • Country: us
  • Yes, I do this for a living
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #10 on: October 04, 2021, 04:57:58 pm »
Fast forward to about  13 minutes when he presents the solution by device itself

Who the hell wants to watch a video and wait for 13 minutes for what might be the solution?

A web page one can scroll through is better in all respects: most of us can read faster than the person speaks on the video. We can print the relevant sections, or copy them to a text file.

This fascination with everything being a YooToob video has to end.

Yes, some things are best demonstrated with a video, like how to pull the side panel off of your car door to get to the window mechanism.  But for the most part, gimme text and some useful screen shots or photos.
 
The following users thanked this post: dunkemhigh, cfbsoftware, SiliconWizard

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #11 on: October 04, 2021, 05:44:32 pm »
indeed special long ones..

But that was my best shot on this issue.. thanks to my memory..
watched that months ago...

The only other reference heard about this weird issue of NO COM PORT..
is by not having the so called .INF windooze weirdos.

On UNIX my STLINK  clone works fine.
Never failed using a USBtoTTL dongle.

I have no other reference
Paul

 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3846
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #12 on: October 04, 2021, 06:06:37 pm »
Just by way of a data point, though sadly, not a solution: I've been using the ST-Link V2 and various COM port adapters for years and, until I read this thread, had no idea at all that the ST-link itself could potentially support a virtual COM port.

I think that means it's nothing specific to you or your PC, but maybe instead it's a feature that requires a driver to be explicitly installed - if, indeed, the V2 does actually support VCP.

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 18184
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #13 on: October 04, 2021, 07:52:39 pm »
I've certainly seen similar functionality before (i.e., in most relevant IDEs, getting a console along with your debug session), though those might be using ARM core debug/IO functions via SWD/JTAG, not a USART.  But I noticed an example program using USART1 on this particular chip, which on this particular board, I noticed is routed to... the ST-LINK chip, almost as if... but wait, if it just...

...But no, it seems.  |O  But then why even bother!?

There also seems to be a variant with RX/TX pins tossed into the 20-pin JTAG header (replacing a couple GNDs), but it also doesn't exist, or something.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 2755
  • Country: dk
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #14 on: October 04, 2021, 10:11:27 pm »
I've certainly seen similar functionality before (i.e., in most relevant IDEs, getting a console along with your debug session), though those might be using ARM core debug/IO functions via SWD/JTAG, not a USART.  But I noticed an example program using USART1 on this particular chip, which on this particular board, I noticed is routed to... the ST-LINK chip, almost as if... but wait, if it just...

...But no, it seems.  |O  But then why even bother!?

There also seems to be a variant with RX/TX pins tossed into the 20-pin JTAG header (replacing a couple GNDs), but it also doesn't exist, or something.

Tim

there's varius version of the software for stm32f103 that's used, the nucleo boards have swd +comport+mass storage, some are swd only and there is swd+comport

when running the tool to update the software you can sometimes choose which on you want




 

Online Cerebus

  • Super Contributor
  • ***
  • Posts: 8742
  • Country: gb
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #15 on: October 04, 2021, 11:27:22 pm »
On ST-LINK/V2-B and later the virtual com port shows up on the host as a standard USB serial port (using the CDC USB profile). You shouldn't need a driver on any platform that supports the CDC serial port USB profile. And yes, the VCP is just a connection to a real pukka serial port on the MCU made via Tx and RX lines from the ST-LINK's own MCU.

Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).

A useful document may be ST's Technical Note "TN1235 Overview of ST-LINK derivatives" to get to grips with which variant you are using.

Also, ST provide the "STM32CubeProgrammer", a standalone application available for Linux, Mac, Win32 and Win64. What's useful here is that it will confirm that you can talk to the ST-LINK properly, find out what version you've got, and if necessary update the software on the ST-LINK.

STM32 Cube Programmer here: https://www.st.com/en/development-tools/stm32cubeprog.html
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 3846
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #16 on: October 05, 2021, 06:03:49 am »
Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).

I thought that feature relied on a bootloader being installed in the target MCU? I've seen it on one or two Nucleo boards, but IIRC it stops working if the device is erased.

Online langwadt

  • Super Contributor
  • ***
  • Posts: 2755
  • Country: dk
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #17 on: October 05, 2021, 09:03:13 am »
Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).

I thought that feature relied on a bootloader being installed in the target MCU? I've seen it on one or two Nucleo boards, but IIRC it stops working if the device is erased.

nope, dump a bin file on the drive and it programs the flash on the target via swd
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 18184
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #18 on: October 05, 2021, 10:58:03 am »
The trick is, the dev boards have two chips, one for LINK, one for target.  So, if everything fits (and, it seems it doesn't sometimes, hence needing the 128k chip), the programmer can enumerate as a composite device with LINK, VCP and MSD functions.  Pretty neat, almost feels too easy to reprogram that way honestly.

And obviously, it takes some code to initialize and enumerate USB that way, and to implement the flashing function (which for the programmer, is SWD/JTAG/serial), so yeah, you need a bootloader to handle that with a single chip, but that is indeed a possible configuration.

And it sounds like that's maybe the sort of configuration the above mentioned Maple device can use, so I can see the similarity.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #19 on: October 05, 2021, 12:14:41 pm »
Yes it does hold true..

And you can get rid of that for Chips with such problem..

The STMduino installation also provides a Github bootloader image repository.

By following those steps you can install your own bootloader and never ever again will fail

Paul

 

Online Cerebus

  • Super Contributor
  • ***
  • Posts: 8742
  • Country: gb
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #20 on: October 05, 2021, 01:40:25 pm »
Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).

I thought that feature relied on a bootloader being installed in the target MCU? I've seen it on one or two Nucleo boards, but IIRC it stops working if the device is erased.

Nope, all part of the ST-LINK. It accesses the target MCU over the hardware debug interface so the target can be as blank as my expression when my other half asks if it was her or me who left the toilet roll in the holder with only 2 sheets left.
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #21 on: October 08, 2021, 11:31:26 am »

Fixed mistyped word on SUB translation

Not Holtek ( iam a veteran  ^-^ )  is Heltec https://heltec.org/

and can even be mistyped again..  in 2 secs

sorry
Paul
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1810
  • Country: es
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #22 on: November 11, 2021, 05:52:48 pm »
STlink v2 doesn't have serial port. Only v2.1.
V2.1 uses 128KB stm32, while v2 uses 64KB only, so there wasn't enough space.
Check the reported stlink version in stlink utility or similar.
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1324
  • Country: br
Re: ST-Link V2 Virtual COM Port Not Working
« Reply #23 on: November 12, 2021, 05:02:10 pm »
this folk also published a hack to workaround such odd error in windoooze...



Never tried 'caus not using windooze w/my stlink..

but the "solution" resembles the other..
press reset push again.... etc etc..

Paul
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf