My nomination for worst code generator would be MPLab Harmony. I was unfortunate enough to be one of the first victims of the PIC32MZ line, which didn’t have a middleware library, or non-harmony code examples. It was autogenerated code, or read the data sheet and figure out every peripheral yourself. The code generator was so broken even the most basic modifications to get example code running on a custom board would result in non-compilable code. The experience was so frustrating I just respun the board with a different micro.
I’ll never touch any MCU that uses MPLabX again. Bonus points to Microchip for destroying atmel studio in favour of MPLab, now I have yet another family of microcontrollers I will not touch.
One thing I can say about STCube is the code it generates works, and you can always use it as a jumping off point for tweaking the generators code for your exact use case.
One genuine complaint is that the catch all interrupt handling is often too slow actually use, so you end up overwriting the default handlers, or becoming very proficient with DMA.
Another very important thing is to never intertwine your code with the autogenerated code. Keep the application code and the hardware code seperate, and have an actual “HAL” layer in your code. It’s an easy way to prevent your code from getting nuked when you reconfigure, and if you’re not happy with the autogenerated code just sub in your own functions. Best of both worlds.
I would like to cast a vote for IAR Embedded Workbench being worse.
If nothing else the vendor-specific crappy toolchains do support the vendor’s HW well, so that’s something they need to do so that devs don’t have to start their projects with implementing the low-level support by themself.
Cube is still useful for clock trees, pinout visualizations etc.
Default free tools are great for students, hobbyists or selling low volume widgets without warranty to other hobbyists, but if your livelihood depends on it, you pay for IAR, Keil or Lauterbach tools, no questions asked.
The stability, technical support and timely bug fixes, compiler documentation (especially along the undefined edge-cases of the C language), testing, debug and trace capabilities, are worth their weight in gold.
I would use VScode for everything if I could. But for the life of me, I can't get debugging working in VS Code, using the IAR plugins and a j-Trace/j-Link. Works fine with ST-Link though, go figure.
Have you reached out to IAR regarding these issues. Normally they reply and give you workarounds or fixes if the issue is reproducible.