I'm learning that slowly. Also ST HAL is a pile of shit.
Ack. I use HAL only to route / initialize the pins, clock system and some other basics. Often basic initialization of a peripheral through HAL does the job good enough so I don't need to cope with all the details. For the real stuff (anything after basic initialization) I access the HW directly where it is needed or write my own basic driver layer.
I suppose the question is: is there a series of microcontrollers with some grunt that isn't a pile of shit? Needs to run FreeRTOS or something as I need multiple tasks.
There are many series of microcontrollers with some grunt available, but you'll find you pile of shit with them too, maybe at some other place.
HW wise the STM32 aren't too bad, for some peripherals the others are better, for some other peripherals STM32 is better. CortexM and it's typical associated toolchains is all over the place anyway and no need to switch to another architecture.
Edit: I suppose at least the ST Link has half decent debugger built in
Works for me. The ST Link debugger exists long enough to evolute from absolute crap to a decent useful level, the modern ones also incorporate a working USB CDC for printf() debugging onboard (nearly all nucleo boards have that).