Libopencm3 Issue (STM32) - Page 1
Forum section: electronics / general

author: jnestor481
author_rank: Newbie
timestamp: August 04, 2019, 08:26:33 pm
content: Hello everyone,Completely new to all this. Engineering student who is trying to learn about microcontrollers. Have to confess I'm not the most computer savy person out there. In fact I think they usually turn into a huge time sink of IT issues. So here I am.I bought a book called Beginning STM32 by Warren Gay. I have followed all the instructions as best I could. I downloaded Cygwin, libopencm3, FreeRTOS (10.2.1), and the ARM cross compiler. I am stuck at this command line prompt that he gives:line 1: $ cd ~/stm32line 2: makeAt first I couldn't use the 'make' command but I fixed that by reinstalling Cygwin with it included. Then it was an issue with Python, but same fix just reinstalled Cygwin. Now I get the following error message and I'm unsure what to do. I try my best to fix my own problems but hitting my head against a brick wall on this one.make -C libopencm3 TARGETS=stm32/f1make: Entering directory '/cygdrive/c/Users/Joe/AppData/Roaming/SPB_Data/stm32/libopencm3'GENHDR include/libopencm3/stm32/f1/irq.json/bin/sh: ./scripts/irq2nvic_h: /usr/bin/env: bad interpreter: Permission deniedmake: *** [Makefile:61: include/libopencm3/stm32/f1/irq.json.genhdr] Error 126make: Leaving directory '/cygdrive/c/Users/Joe/AppData/Roaming/SPB_Data/stm32/libopencm3'make: *** [Makefile:38: libopencm3/lib/libopencm3_stm32f1.a] Error 2I have tried searching for an older version of libopencm3 like the book suggested but did not have any luck.Any help would be hugely appreciated. Thank you.

author: andersm
author_rank: Super Contributor
timestamp: August 04, 2019, 09:33:00 pm
content: I suspect that the irq2nvic_h Python script is not marked as executable, because you downloaded the libopencm3 sources outside the Cygwin environment.If you want to use Cygwin, the only way to stay sane is to stay completely within the Cygwin environment, and never try mixing it and "native" Windows. MinGW/MSYS2 provide better interoperability with Windows apps, and there's fully native versions of Python. If you're on a recent version of Windows 10, you could also go the other way and install the Windows Subsystem for Linux.

author: amiq
author_rank: Regular Contributor
timestamp: August 28, 2019, 06:02:10 am
content: libopencm3 will not build on cygwin - you'll have to compile in the msys environment.

author: grantb5
author_rank: Regular Contributor
timestamp: September 24, 2020, 07:26:49 pm
content: I bought this Beginning STM32 book by Warren Gay also and hoped to get the examples going on Windows somehow. I found the CygWin step was the most confounding and gave up there. I don't want to dual boot or use a standalone linux machine. Unless there is a decent tutorial on how to set up CygWin so that it works with the book example, I cannot proceed or recommend this to anyone wanting the same development platform (Windows) as me. I have done embedded and linux dev before, but this is beyond my skills.So I guess my options for Windows PC development are back to Keil (which is "ok" for now) or try the STMCubeIDE, I have another book, The STM32F103 ARM Microcontroller & Embedded Systems and it is OK and everything works fine. I had hoped to learn RTOS (FreeRTOS or other common one) as well, but need to find a pathway yet.

author: hansd
author_rank: Contributor
timestamp: September 25, 2020, 12:12:21 am
content: I bought the book too and was not able to build the library on Windows. I just ported it to the STM32405-H405 Olimex board. The same can be done for any other board. The libopencm3 library is not complete and not sure if there is any serious development. No error handling implemented! But other than that much faster compared to the HAL engine. I have attached a little test project for STM32CubeIDE.

author: KE5FX
author_rank: Super Contributor
timestamp: September 25, 2020, 01:22:41 am
content: It's unfortunate that people still mess around with Cygwin when all of those tools have perfectly good native arm-none-eabi-xxx versions. Authors of those books don't do their audiences any favors by dragging in all that cruft.

author: newbrain
author_rank: Super Contributor
timestamp: September 25, 2020, 05:48:07 am
content: Quote from: KE5FX on September 25, 2020, 01:22:41 amThis.And instead of messing wit cygwin, use WSL.Running Linux command line based builds has always worked for me.

author: krish2487
author_rank: Frequent Contributor
timestamp: September 25, 2020, 07:32:48 am
content: Or you know... sping up a linux machine / VM and compile there.. :-DStill a lot less hair pulling than trying to get this to work on windows. FWIW, I use libopencm3 for my learning with STM32, and I have resorted to keeping things simple, salvaging the core peripherals code from the authors github repo without the freertos stuff thrown in. The additional variables and complexity it(freertos) brings in does not help a beginner trying to learn the framework.Quote from: newbrain on September 25, 2020, 05:48:07 am

author: Kjelt
author_rank: Super Contributor
timestamp: September 25, 2020, 07:55:49 am
content: I just bought an external ssd and installed Ubuntu, works great.

author: newbrain
author_rank: Super Contributor
timestamp: September 25, 2020, 08:04:16 am
content: Quote from: krish2487 on September 25, 2020, 07:32:48 amWhich, with WSL2, is what is happening, transparently and with better Windows integration than a pure VM.But with libopencm3 I had no problems whatsoever even in WSL1.No hair pulling at all (not that I would be able to do a lot of it in any case...).Of course, going completely Linux is still a good alternative.

author: Kjelt
author_rank: Super Contributor
timestamp: September 25, 2020, 08:15:01 am
content: I can really recommend it.Use clonezilla to make a clonefile of the drive , only 25GB, put those files on the NAS if anything happens, restore and up and running. I was never a big Linux fan but this is easy peasy, in four years you restore the file and you can rebuild your program. I used ST Cube two years ago, MX and studio have been moved to IDE or something, the libraries per processor are 800MB upto 1.2GB and they change continuously. Still try to experiment with it but I do like the libopencm3 with the arm gcc compiler.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 25, 2020, 09:25:58 am
content: I love the book, but haven't touched a Windoze PC for years, know nothing about the Cygwin stuff.Isn't that microsoft company supposed to have some "sub system for unix" built in these day's, or is that also a part of their FUD?https://en.wikipedia.org/wiki/Fear,_uncertainty,_and_doubtThey've purposefully botched so many things in the past that I just quit counting, and using it. I suspect that problems with Python or Cygwin have little to do with those programs but are a result of microsofts endless quest of trying to frustrate their competitors and their users.

author: cheeseit
author_rank: Regular Contributor
timestamp: September 25, 2020, 09:42:16 am
content: @Doctorandus_P: nice rant but I'm surprised that you forgot to throw in a M$ or two, or the classic embrace extend extinguish. The past is the past but if you researched it open mindedly you'd discover that Microsoft is a different company today.Technically you're the one spreading FUD but enjoy your (I'm guessing) Linux, perhaps next year will be the year of Linux on the desktop?

author: grantb5
author_rank: Regular Contributor
timestamp: September 25, 2020, 05:14:42 pm
content: EDIT: Nevermind. WSL only works on Win10. I won't be getting my next PC until the new year. Back to the drawing board.Thanks all. I will look at WSL ("Windows Subsystem for Linux" I just learned). Do I need to install a particular linux OS afterward in order to run this book's code? Recommendations? I also want the debugger to work!? I'm not printf-ing my way through life.Note: I am work-from-home for the time being and don't have room for another PC and need my Windows box available at all times. So, I can Alt-Tab to another "OS" but not dual boot or set up another PC.(I remember setting up Windows Hyper-V a long time ago, because I needed to run older MS OS toolset, but it was so-so and fortunately that project is done.)

author: krish2487
author_rank: Frequent Contributor
timestamp: September 25, 2020, 07:11:31 pm
content: You dont need a particularly beefy PC to run a lightweight distro. One of the mini PC intel celeron boxes will work just fine for this. And they arent too expensive or a large footprint either. You can just use it to do the development work and use as a lightweight general purpose PC as well. A ubuntu XFCE or a manjaro I3 will work just fine for code compiling. It will not be fastest PC around, but then it doesnt need to be. The difference in compilation time might be a couple of seconds. You can always have a KVM switch to switch between you windows PC and the code compilation box.Just throwing some ideas around. :-DQuote from: grantb5 on September 25, 2020, 05:14:42 pm

author: grantb5
author_rank: Regular Contributor
timestamp: September 25, 2020, 07:36:01 pm
content: Thanks, I appreciate it. My most recent linux project was for small TinyCore boxes, in the form factor you describe. I did most of the preliminary development on a regular Ubuntu box. That hardware is available, but at the office. I'm really hoping to dive into STM32 on my Win8 laptop here at home, in cramped quarters. I have room for the laptop and an EVB.So my options look likeKeil (using either the limited free license or one of the STM full free licenses for F0 L0 G0),Rowley Crossworks (which I am intrigued about (GCC)), orI guess STMCubeIDE.I do want to throw an RTOS on top as well. So I just need time to experiment with these.

author: janoc
author_rank: Super Contributor
timestamp: September 25, 2020, 07:47:40 pm
content: What about actually following the instructions on the libopencm3 website/Github instead of messing with unsupported configurations, whether Cygwin or WSL?https://github.com/libopencm3/libopencm3The original compilation failure came because Cygwin "convinced" the build you have a Linux-like system and the script was looking for /usr/bin/env tool - which you are unlikely to have in Windows.Moreover, if you don't want to mess with compiling this library yourself (it is not that hard but you need to know you way around the GNU toolchain and how to build things, not just click buttons in an IDE), install it through PlatformIO. There is a pre-built version there.

author: grantb5
author_rank: Regular Contributor
timestamp: September 28, 2020, 08:53:41 pm
content: Thanks. I'm sure there is a way forward, for this and the future issues that pop up. Recall that the book is titled Beginning STM32 (not Beginning STM32 for Linux), so to have each Windows reader embark on this journey of discovery is a bit unlikely. Maybe someone less Beginner will come along and put a tutorial together to drag all of us unwitting purchasers by the hand. For now I will set the book aside as there are other texts I can use. This is a large topic area with a new microcontroller (for the reader), new tools, new hardware and new rtos, so I'm guessing it will be a while before I come back around.

author: janoc
author_rank: Super Contributor
timestamp: September 29, 2020, 09:00:47 am
content: How old is that book? Even if it came out today, the text would be at least 2 years old due to how long it takes to get things published, which is eternity. The book has a copyright 2018 - so the content is probably 4 years old at least. It also focuses on STM32F103 - which is the oldest STM32 family and has been largely superseded, even though it is still popular with hobbyists thanks to the cheap "Bluepill" boards from China.Also, if you buy a book that refers to Windows XP, would you be trying to follow it to the letter in Windows 10 and wondering why things don't work?I understand your frustration but one needs to be reasonable. Cygwin is not a proper Unix/Posix environment even though it makes a pretty solid effort. I am pretty sure the author has mentioned that the instructions in the book apply to Linux and not Windows. I saw him mentioning that "you may want to download Cygwin if you are on Windows because the demos assume Posix" or something to that effect. Which likely means that he didn't really test his examples with it - libopencm3 has never supported Cygwin build, AFAIK (a bit of googling shows problems with Cygwin and OpenCM3 going back to 2015!). That is unfortunate and feel free to complain to the author and leave a matching review on Amazon (or where did you buy the book from).As a final note - if you are going to develop for ARM, getting at least some familiarity with Linux is a good idea. Both because the toolset is mostly GNU based and it works a lot better in an Unix-like environment and also because Linux is a common OS on the higher end ARM processors. You don't need to reinstall your PC for that, virtual machine with something like Ubuntu is largely sufficient. Raspberry Pi also cost few bucks - and could literally become your development and debugging platform thanks to its accessible GPIO.

author: grantb5
author_rank: Regular Contributor
timestamp: September 29, 2020, 02:11:35 pm
content: Thanks for the comments. As an aside, I was drawn to the STM32F103 for the reasons you mention, can you recommend a newer replacement? At the moment all I need are the USB device, 3 UARTS and 64K or flash or more. And a pretty low price (I don't need any more horsepower really). This is to replace an SILabs C8051F with 64K of flash and is around $2 in 1K quantities. I don't mind spending a bit more, like ~ $3 (@ 1k).Or I start a new thread perhaps.... I did try the ST MCU Selector, but the drop-down boxes don't work on my phone and it was even less functional on my PC.

author: janoc
author_rank: Super Contributor
timestamp: September 29, 2020, 08:06:28 pm
content: If you need a USB device then maybe STM32F072 could be an option (not sure how many UARTs it has). That's Cortex M0. Or you could use one of the newer Cortex M4 series chips - e.g. STM32F4xx series. Even STM32F10x could work, just keep in mind that the chips have some known issues, such as the infamous I2C bugs. However, the newer series have had a lot of improvements, including stuff like USB DFU bootloader (F10x has only serial bootloader), etc.The product selector on their website works but it is a bit of a pain to use - select the MCU family you want and then on the left side activate only the filters you want. Or use Octopart.com and set the filters there - there you can search across all families at once which the ST's site doesn't allow. Or download CubeMX from ST - I believe there is a parametric search/browser in that too.

author: Joku
author_rank: Contributor
timestamp: September 30, 2020, 12:09:29 am
content: +1 download CubeMX to use the product selector, it isn't perfect but it's far better than the website.If you need to install Java JRE, get the 64bit version, 32bit works for most things but CubeMX has a popup whinging about it on startup.If you don't care about CPU performance than Cortex M3/M4 is generally going to prove to be a bit of a rip off. If this isn't an urgent project then keep in mind that the newish STM32G0x1 line (Cortex-M0+) will supposedly get new models with USB peripheral sometime very soon, supposedly next few months but such timelines shouldn't be relied upon. If you're interested in this, don't get confused with the USB PD peripheral that already exists on some current STM32G0x1 models, that is for power delivery only (usb voltage / power negotiation). It looks like the STM32G0's with USB peripheral are (initially) only going to come with more Flash & RAM than current STM32G0x1's, cost wise the concern is mainly that it will be 144KB RAM, so you can expect them to be more expensive than current STM32G0x1's but at the same time this is the new budget oriented cortex M0+ on 90nm process so there's some reason to be optimistic.As for your toolchain, I just started on STM32 and went with a Windows solution but I'm not using libopencm3 so I'm not sure what implications that has. My setup includes the following stuff:- GNU ARM Embedded Toolchain for win32- Make for Windows- CoreUtils for Windows- VS Code- λ cmder- STM32CubeMX & Java JRE 64bittbh I'm not even sure what benefits I get from λ cmder, I just followed a recommendation that came with no justificationI think the typical way to use this setup is to start a basic skeleton project in STM32CubeMX to get the basic project framework - mainly the startup and makefile.Personally I've written "my own" makefile and startup code, heavily helped by online references, in order to become more independent. But that was a pretty big step for someone as clueless as I was about startup code and makefiles going into it.I'm loving this setup btw, easily the best embedded dev setup I've ever had. Takes a bit to get familiar with VS Code, lots of configurability but most of it isn't obvious or GUI based so need to refer to doco and search internet for "how to" a fair bit when you start out if you're as fussy as I am about optimising your workspace.One thing I haven't done is setup debug inside VS Code so I can't comment on that. I have a Segger j-link and am using Segger Ozone in the rare occasions that I use that level of debugging, and I'm happy with Ozone so far. Should note that some combination of J-Link / USB driver / VMware / Windows10 managed to get my STM32G071 into a state after a flashing failure that j-link couldn't recover from, possibly because the chip is too new for Segger to have implement better recovery methods (there is a recovery specific app which didn't yet support STM32G0 last I checked). Thankfully had a brand new ST-Link/V2 collecting dust in my cupboard for the last decade or so that worked first go without any fuss and then the J-Link was happy again (the J-link does more things and various things better than ST-Link/V2 so happy to have both).

author: janoc
author_rank: Super Contributor
timestamp: September 30, 2020, 04:18:54 pm
content: If you just want to start and not mess with toolchains, build scripts and what not and don't have big money for Keil and such, then PlatformIO is a good choice. They have decent STM32 support, including libOpenCM3, ChibiOS, FreeRTOS, even including the Arduino libraries port if that's what you want. The IDE is based on VS Code (including now free debugger!) but you don't have to use PlatformIO with it.Otherwise I am using CMake based build system for STM32 which manages all the dependencies, programming and all the idiosyncracies (there is a set of pre-made CMake scripts for this on Github if you want to try it), but then I am also doing software dev. professionally and I know the ins and outs of that tooling. Probably not the best choice for a beginner - if y ou are only starting out with ARM you would be overwhelmed pretty quickly.

author: grantb5
author_rank: Regular Contributor
timestamp: October 02, 2020, 06:28:26 pm
content: Wow thanks guys, lots to chew on here.QuoteI don't know what that means. I need at least 48Mhz, but more would be "nice". No FP needed. I want an inexpensive micro. Say, $3 USD at 1k quantities (just for price comparison). I don't really know what the difference is between those cores.I installed STM32CubeMX & Java JRE 64bit and had already installed GNU ARM Embedded Toolchain for win32. I had the STM32CubeIDE installed already too, but didn't realize it was a different tool altogether. I'm assuming I have multiple installs of gcc now as a result. No matter.I used the MX Cross-Selector (was just poking around) and looked for an STM32 replacement for my current C8051F380-GQ-QFP48, which is a single-cycle 48MHz 8051 that is surprisingly fast. In playing around with the STM32F103 I had to get creative to get the F103 to match the C8051F380's bit-banging abilities. Anyway the STM32 outshines the C8051F380 is almost all other ways. Anyway, the cross-selector gives me 500 possible replacements.Among the top hits were the STM32F070 and 072. Overall I don't get why those are better than the F103 (thanks janoc for some pointers there though). Newer I can see, but...One thing of note, I believe the Keil tools are free for the STM32F0 G0 and L0 parts. Not just a 32k limited eval. I was using the Keil uVision compiler/IDE for 8051 work so this would be an "easy" move tool-wise. The editor is horrible, but the compiler itself is good.I will still look into other tools (I've used VSCode before, but I'm not a huge fan of PlatformIO, but just because of how it's constantly updating).

author: janoc
author_rank: Super Contributor
timestamp: October 02, 2020, 06:37:53 pm
content: Just use the official ARM GCC toolchain with whichever IDE you prefer - no need to deal with the crippled Keil crap. The basic tooling for ARM is completely open source, you only pay for conveniences (e.g. Segger J-Link) that are nice to have but not necessary.Quote from: grantb5 on October 02, 2020, 06:28:26 pmCheaper, newer, easier to use peripherals. However, slower/simpler core (Cortex M0 vs Cortex M3) and usually less memory - which could be an issue if you want to do anything complex with USB.Quote from: grantb5 on October 02, 2020, 06:28:26 pmYou don't need to update it. It is in active development and support, that's why there are updates but they aren't mandatory, you know.

author: Joku
author_rank: Contributor
timestamp: October 03, 2020, 03:56:27 am
content: Quote from: grantb5 on October 02, 2020, 06:28:26 pmBy rip off I was already adjusting for your $3 in 1K qty target. There are Cortex M3/M4 chips that come under that but not a whole lot are well under it. I guess I'm a bit biased because my target is usually under AUD$2 or AUD$3 which is significantly less. You might find yourself restrained to using popular chips that LCSC and similar budget suppliers move in decent enough quantity that they can give you a good price. From what I can tell, for LCSC to offer an mcu cheap, it needs to be buying reasonably large qty and then it passes on the bulk pricing fairly generously to smaller orders unlike Western distributors. You will find a lot more Cortex M0/M0+ options under $3 per 1k qty even at normal market rates through western distributors. Anyway this is just a matter of DYO research and don't trust ST's indicative pricing at 5k or 10k qty or whatever it is because it's not a good reference for small volume from what I've found. (ie it seems you can't just assume you'll reliably pay a fairly constant % more for 1k qty through a distributor).Quote from: grantb5 on October 02, 2020, 06:28:26 pmPersonally I like to use fresh virtual machines until I'm settled on a toolchain, lets me see exactly what is and isn't needed and avoids any compatibility issues, it's not really needed but I think I psych myself out a lot with that stuff worrying what I might break and worrying if it's only working because of some other thing I previously installed. Quite inefficient though so not for everyone, these days since I don't have much in the way of high performance PC needs I find my excessive use of VM's is dictating the minimum cost of my PC. I really like having my old dev stuff from 5, 10, 15 yrs ago hiding in an offline VM though where it's out of the way, safe from OS etc updates, where I know it's instantly good to go if I need to revisit it for a minor firmware fix, and where it's easy to transfer the VM over to a new PC build.Quote from: grantb5 on October 02, 2020, 06:28:26 pmBit banging is a "weakness" of the original old STM32F1 line. Don't quote me on it but I'm pretty sure it's improved on every other STM32 line. The major limitation might be related to where the GPIO peripheral sits in the MCU architecture, in STM32F1 it's accessed via a relatively slow peripheral bus or something.. maybe contention issue. The way GPIO is handled in code is also different on STM32F1. Personally as someone who's only just started on STM32 I choose to avoid STM32F1 for these and other reasons, but then it kinda sucks that the community is still heavily invested in that family (especially STM32F103Cx) for its low cost STM32 option. The STM32F0 & STM32L0 never really gained much open source community traction. Hopefully the new G0 can change that once the USB versions come out, but like I said it looks like we're only getting high memory versions with USB for now and those won't offer much incentive to switch away from STM32F103 for people with basic needs other than USB.Quote from: grantb5 on October 02, 2020, 06:28:26 pmThe editor is a bit of a productivity killer IMO. Good to get a 1st easy project out the door ASAP since it will get you up and running quickly even without your prior experience. But when it comes to longer term development and dealing with larger projects I find it's really not for me.Quote from: grantb5 on October 02, 2020, 06:28:26 pmPlatformIO is pretty neat but I agree it can be a bit annoying, it's versioning control is one of its strong points though. My issue with it is more that I just don't want that extra party dependence, it looks like it's going to be hanging around a long while but you'd still wind up depending on it to add (reliable) support for new mcu's and other updates promptly-enough for what you want to do.

author: janoc
author_rank: Super Contributor
timestamp: October 03, 2020, 10:11:29 am
content: Quote from: Joku on October 03, 2020, 03:56:27 amGiven that it only wraps (well, packages) existing projects - GCC, VSCode, Scons (for building), etc. I wouldn't be too worried about this - if those tools don't support a new MCU family then everyone will be screwed, not just PlatformIO users. And when it comes to the majority of the libraries those are actually handled by thirdparties, PlatformIO only gives you a convenient tool to find and install them.Think of PlatformIO as Arduino on steroids - easy to get started with, with everything in place - and easy to migrate away from once you outgrow it. Certainly much easier than from a proprietary toolchain like Keil.Of course, if you don't like the IDE or something else, fair enough.

author: grantb5
author_rank: Regular Contributor
timestamp: October 03, 2020, 03:43:19 pm
content: Thanks again you guys! Hopefully I can keep all your tips front and center in my brain.QuoteThis interests me a lot. Is there just one way of setting up VMs or options? Would love to know how you are setting up your VM (I don't even know where to start on that). Once I used Hyper-V on Win8 for something, ... I think it was either some old XP software or maybe even something older that wouldn't run on Win8. Anyway I'd be starting from scratch probably.

author: grantb5
author_rank: Regular Contributor
timestamp: October 06, 2020, 04:07:03 pm
content: Back on the original topic of Libopencm3, I haven't delved into real virtualization yet, but I did take a wack at Windows Subsystem for Linux WSL1 and Ubuntu since it seemed easy enough to try. TLDR; you can compile the example code from Beginning STM32 this way, but for actual debugging you need to use regular Windows.Enable Microsoft WSL1 (step 1 only):https://docs.microsoft.com/en-us/windows/wsl/install-win10Install Ubuntu 20.04 LTS from the MS App Store (step 6 only):https://docs.microsoft.com/en-us/windows/wsl/install-win10Here are the book steps (chapter 2):Install Book Software examples using git (as explained in the text)install libopencm3 using git (as explained in the text)For the next step (FreeRTOS) I had to install unzipCode:sudo apt-get install zip unzipInstall FreeRTOS (as explained in the text)In Project.mk, change the version of FREERTOS (as explaind in the text)Install and test the ARM Cross Compiler (as explained in the text)For the next step I needed to install make and then create a symbolic link for pythonCode:sudo apt install makeCode:sudo ln -s /usr/bin/python3 /usr/bin/pythonBuild the book software (as explaind in the text)Test ST-Link Tool - this is the dead end. No can do.I guess USB support in WSL1 (and WSL2) is super limited to non-existent. ST-Link required usblib, which doesn't exist. So as far as I know, that's the end of that story for now. Using a better virtualization I'm guessing provides better results?

author: janoc
author_rank: Super Contributor
timestamp: October 06, 2020, 09:07:46 pm
content: Quote from: grantb5 on October 06, 2020, 04:07:03 pmUSBlib is a library you can install inside of Ubuntu but I don't think WSL actually makes USB accessible for the Linux system.Install that Ubuntu in VirtualBox instead and configure VirtualBox to pass ST Link to the VM. That will certainly work.