+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 64bit
tbh I'm not even sure what benefits I get from λ cmder, I just followed a recommendation that came with no justification
I 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).