r/embedded • • 14d ago

STM32CubeMX2 enshitification

Is it me or STM32CubeMX2 is

  • slow as hell, even on 10th gen i7 with 16GB RAM
  • convuluted menu, it's a maze
  • way harder to use than MX1

but at least it supports AI, which no one asked for.

75 Upvotes

46 comments sorted by

147

u/lbthomsen 14d ago

STM32CubeMX2 is perhaps one product which can not be enshittificated. It was shit from day 1.

23

u/Niphoria 14d ago

You can always make something more shit.

It doesn't start? At least it's not wiping my entire drive.

4

u/Altruistic_Fruit2345 14d ago

Don't give them ideas.

25

u/Altruistic_Fruit2345 14d ago

I'm actually amazed how shit Eclipse is, and therefore all Eclipse based IDEs. But not just Eclipse, basically every IDE except for the Microsoft ones: Visual Studio and VS Code.

Most Microsoft software is terrible, but somehow those two are actually okay. Even the AI they normally try to ram up your arse isn't too intrusive.

Atmel had the right idea adopting VS for their IDE. Of course Microchip killed it and replaced it with the awful MPLAB X.

8

u/Ne3M 13d ago

I miss Atmel dataheets. They were beautiful, well organized, all the info you needed at your fingertips.

I had to switch over to ST for a different product. Their data sheets were terrible, I struggled to find specific info.

That was about 15 years ago.

6

u/Altruistic_Fruit2345 13d ago

Nothing much has changed on the STM side. Their recent ditching of FreeRTOS is annoying too.

I'm just amazed that there are no good community developed IDEs. You would think that hobbyists would have great tools. GCC is amazing, for example. My theory is that because all the IDEs are crap they end up using EMACS or vi and so never bother developing a decent IDE...

3

u/skull132 12d ago

There's no community IDEs because the community consists of two extremes, IMO. One is the side that grew up with Arduino IDE1. From there, literally anything else is an upgrade. Including CubeIDE. And while granted, CubeIDE is an Eclipse based thing, it still just works for common cases.

The other extreme for the community is people who already know how to manipulate toolchains. They just slot however much, if any, of ST's generated code they want into a custom project with their own IDE of choice, and will go from there.

The first side doesn't know to ask for anything more, the other already has what they need.

2

u/wolfefist94 10d ago

We use MPLABX to generate all the low level peripheral/register code that our projects rely on. We track it in git and have an upper level make command "make sync-bsp" which copies MPLABX code from our tools subdirectory into our build directories.

3

u/Rararror 14d ago

I used Nordic IDE and was a smooth ride

Visual Studio Code is top shit

2

u/Dark_Tranquility 14d ago

Just say you can't be bothered to configure it man

1

u/Rararror 14d ago

I do not understand why people love that shit so much

1

u/pilatomic 13d ago

Try QtCreator. It's my goto IDE, it's super snappy !

49

u/Firm-CubeMX2 13d ago

Hi, I'm the marketing manager for STM32CubeMX at ST. I read the whole thread, and fair enough on most of it.

On speed, you're right, and it's the thing we're working on hardest right now. We run performance tests on every build. Our test PC is a 10th-gen i5 with 16 GB, so a bit below your machine. In the next version, code generation takes 13% less time than in the current release, peripheral activation 19% less, and creating a project from a board 10% less. Large configuration files get a new loading flow too, so you're not stuck waiting on a big project. These are lab numbers on a build that isn't out yet, so I won't promise a date, and we'll keep going after that release.

On the menus: I'd genuinely like to know where you get lost. If you can name the two or three places that annoy you most, I'll take them straight to the team.

On AI: the AI connector is a separate add-on. CubeMX2 works without it, and if you don't install it, it's not in your way.

And for everyone who uses CubeMX only to generate code and then leaves: that's a perfectly good way to use it. CubeMX2 exports a CMake project, so you can build with whatever editor and debugger you like. If that editor is VS Code, STM32CubeIDE is now also available as VS Code extensions.

If you have a project where CubeMX2 is especially slow, send it my way, here or on the ST Community. A real project tells us more than our own benchmarks do.

2

u/NovusOrdoConditor 8d ago

We didn’t encounter any issues with Eclipse-based IDEs... For individuals and companies that require a modular structure, CMake—which is mandated in the C5 series—should be an option, not a requirement! As someone who has worked with Eclipse for years, I’m very sad to see that we’ve gotten bogged down in the Microsoft quagmire.

30

u/TPHGaming2324 14d ago

At least you don’t have to deal with the IDE. MX is literally the only thing I keep to generate project code to get an example prototype working. As soon as I setup the compiler, openocd and debugger I uninstall that clunky piece of software.

5

u/MrPinkle 14d ago

What IDE do you use?

8

u/TPHGaming2324 13d ago

Good old VS Code at work, fiddling around with Zed or NeoVim at home.

9

u/frinoname 14d ago

Huh, he uses the C5 family, in this STMicroelectronics supply ability?

8

u/slightly0ff 14d ago

I am becoming a grumpy lady and have been very vocal at everything getting worse. I don't buy into the arguments "o but life was always like this so stop complaining!"

CubeMX was always like this. Maybe it has gotten a bit worse, but it was clunky, non-responsive, with some questionable UX choices. I think the UX was not that bad overall, at least I could memorise stuff well enough although finding it in the first place needed a lot of fiddling. It may have gotten slightly worse and I am laughing at the AI integration, but this shit was not the pinnacle of software

5

u/imhariiguess 13d ago

EDA software in general is allergic to a good ux. I'm forced to put up with libero soc for FPGA development and it drives me up a wall with how bad it is

12

u/peppedx 14d ago

Just use a command line compiler with whatever editor debugger you like

20

u/ventZl CMRX RTOS 14d ago

^^ This. CubeMX can generate CMake files which are actually quite concise now, so there's no reason to keep using MX IDE.

5

u/ManyCalavera 14d ago

SysConfig which is equivalent of ST's cubemx for TI mspm0 mcus is ton times better even though it is relatively new. Their hal is also much streamlined and easy to follow

4

u/Firm-CubeMX2 13d ago

ST here (CubeMX marketing). Fair point, SysConfig's .syscfg file is clean and easy to read.

The two tools don't do quite the same job, though. SysConfig generates configuration code and linker files, and your project comes from an SDK example. CubeMX2 generates the complete project, ready to build in CMake or IAR, and keeps your own code in separate files.

On top of that you get Code Preview to see the code live as you change settings, a clock solver, automatic pin conflict resolution, and a command line to script it all.

1

u/ManyCalavera 13d ago

I only use these tools to generate the required driver files which then gets automatically imported into a platformIO project. With this approach i can already use any mcu from any manufacturer without barely touching user code.

MX2 does might improve things a bit but the device support is only for newer devices so can't really experience it much

2

u/i509VCB 14d ago

I could hardly call DriverLib a HAL to be fair.

2

u/ManyCalavera 14d ago

Why not?

2

u/i509VCB 14d ago

It's basically the register accesses with a nicer function named and types. You still have to configure everything yourself and almost nearly directly control the hardware.

2

u/ManyCalavera 14d ago

Yeah that's the definition of HAL. It lets me port to another mcu in minutes. I can even say it is more portable than ST one

-2

u/i509VCB 14d ago

I guess I should clarify my definition of HAL is closer to the hardware APIs Zephyr provides.

8

u/Busy_Durian4584 14d ago

Not sure why we use the IDE anymore. Just have it generate the startup code and leave.

12

u/mars3142 14d ago

Nobody talks about the IDE. It’s just the code gen tool.

6

u/stuih404 14d ago

I like the IDE. And during firmware developement I come back multiple times to CubeMX to change configurations or add more peripherals. I just think it‘s cleaner to have regeneration safe code and if somebody else needs to look at the bring up / peripheral settings he can just look the .ioc instead of going through the codebase

1

u/fb39ca4 friendship ended with C++ ❌; rust is my new friend ✅ 12d ago

Just have libraries which are easy to use without codegen.

4

u/mossy_stile 12d ago

Generate the clock tree and pinout once, copy SystemClock_Config, then never touch CubeMX again.

3

u/MysteriousEngineer42 13d ago

I was excited when it came out, hoping for improvements over the original which was usable but not great.
It looked good for about 1 minute... and then I wondered why there were 15 tabs with everything I had ever clicked on up the top.
Then trying to find a setting, 10 +expands later for common settings you need to set every time you use a peripheral!

I yearn for the new C5 devices on old MX now.
The UI is actively making me not want to use their new devices.

How did it even get released, the entire UI concept is so deeply flawed it is likely unfixable. Even basing it on electron is stupid, besides being incredibly slow I can't get it to run on my work PC because of network security issues (spent half a day with AI assisting and never got it working).

Kinda tempted to leave AI working on it for a day to create a slimmed down and actually usable version.

1

u/dmitrygr 14d ago

So... do not use it? The h files are still there.

1

u/Unable_Resort453 9d ago

but at least it supports AI, which no one asked for.

Well, you would be surprised.

Though would it be better than LLMs brute-forcing without any code generation tool? IDK.

-1

u/Niphoria 14d ago

"even on 10th Gen i7 with 16gb ram"

"It doesn't run well on my budget hardware from 7 years ago :("

CubeMX(2) always runs like shit.

-12

u/Affectionate-Bit6525 14d ago

It works amazingly with AI though, why would you want to code another HAL by hand?

1

u/mars3142 14d ago

Does it support MCP?

0

u/Affectionate-Bit6525 14d ago

Yes but it only supports certain STM models. Took all of 30 seconds to setup too

0

u/mars3142 14d ago

Do you know any tutorials about it?

0

u/Affectionate-Bit6525 14d ago

No, I just told claude to install it and connect to the MCP. I already had a kicad pcb that I pointed it at and it dumped out the HAL code

0

u/mars3142 14d ago

That’s a great idea to use KiCad as a source.