Author Topic: Is ST Cube IDE a piece of buggy crap?  (Read 227447 times)

0 Members and 6 Guests are viewing this topic.

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #600 on: August 30, 2022, 08:37:00 am »
The "refresh" doesn't work for me.

Clicking on the .map file does.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6278
  • Country: es
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #601 on: August 31, 2022, 10:42:59 am »
If the build analyzer doesn't update, just click anywhere in the project file tree window, that works for me everytime.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #602 on: August 31, 2022, 12:41:44 pm »
Not for me :) :)

Even a right-click / Refresh doesn't do it.

But a left click on the .map file does it.

I would never release a product which just tells everybody that I didn't give a s**t about little details.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #603 on: September 06, 2022, 01:46:47 pm »
Having just spent a few solid weeks on debugging code, my main criticism of "HAL" is that it has poor granularity.

All the code is basically bloated. But it shows up especially in the ISRs, which people rarely look at because by their nature they are convoluted, and interrupt generation (IP bits) behaviour is often nontrivial. ISR-driven software tends to be convoluted anyway. It is only when one starts to step through one of the ex-MX generated ISRs that one sees just how bad it is. It is stepping through a large number of possible int sources (most of which are not enabled anyway). They get away with this at 168MHz and 1 clock per cycle... You would never write ISRs that way yourself; it would do only what is needed and then gets out of there.

Also a lot of the code comments are simply wrong - probably due to the coder not speaking English.

Cube v10 is a lot less reliable than v9 or earlier. I normally have to restart it a few times a day. And the ITM debug console is rubbish; works only on Tuesdays :) The ITM enable button has two displayed states and sometimes one works, sometimes the other, and sometimes it remains enabled through a compile session.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #604 on: September 14, 2022, 02:52:17 pm »
Here is a good one.

Cube v10 does not start over RDP (remote desktop) over a "teleworker" VPN. Neither L2TP nor PPTP VPNs work. The person using it (me) is on a 3G/4G connection.

Loads of errors saying unable to initialise screen objects etc.

However it does run over RDP over a "site-site" VPN (IPSEC).

It is as if during startup and loading the various Java objects it is making online connections to fetch some stuff, and these connections work over one type of VPN but not over another type.

Completely weird.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15444
  • Country: fr
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #605 on: September 14, 2022, 05:37:53 pm »
Stop using Cube. =)
 
The following users thanked this post: eugene

Offline tellurium

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: ua
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #606 on: September 14, 2022, 07:15:21 pm »
Peter, ST won't pay you for the bug discovery ;)
Open source embedded network library https://github.com/cesanta/mongoose
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #607 on: September 15, 2022, 05:34:51 am »
Fixed it.

Instead of saying "your video system needs 24 bit colour and it has only 16 bit colour, you get this crap:





Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #608 on: September 28, 2022, 08:23:34 pm »
Does anyone know if Cube has a config for whether the program grabs Windows focus when it hits a breakpoint?

It's a real hassle when you run a build and then you go and type something and then when it finishes it suddenly starts consuming keystrokes :)  And it does this into a randomly opened file.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #609 on: October 04, 2022, 01:47:24 pm »
It's Eclipse, for god sake.

I'm surprised this is the first time you have used Eclipse.

Hate IBM, they started it.  I can't remember if it started as proprietary and was open sourced or if they open sourced it to save them developing their own IDE for webshere, but that's where Eclipse came form.

In terms of Eclipse "language adaption", it's not bad.  The IOC editor needs optimised.

Eclipse runs in Java.  So it needs MORE MEMORY.  You need the Eclipse JVM to have a minimum of 1Gb of heap space and 2 of 4 if you are running any complex Java based add ins.

As a modern heavy weight IDE, it's not meant to be run on machines with low resources or over VPNs with low bandwidth, it's mean to run on a developer workstation, so it expects LOTs of cpu, LOTs of RAM and lots of screen space.  If you want to work on more modest hardware, don't use Eclipse.

It is a primary Java IDE, a fairly poor C/C++ IDE (as it needs heavily configured to get indexing working properly in  many more complex projects), there are probably 100 different "canned/wrapped" version of Eclipse out there.  I wasn't surprised to see it being used for STM32's IDE.

Android studio, by example, uses JetBrains InteliJ platform under-neath, same as "PyCharm".  Not sure if any MCU manu's are using it for the base.

The thing is...  those two big IDE bases (Jetbrains and Eclipse) probably account for 70% of the market for IDEs (outside of Microsoft lock in).  The reason companies are using them as the base, is obviously because they don't need to write the base application, they can just write plug ins, views and panels.  Also, they retain the familiarity between the different sub species of IDE based on each.  If you use PyCharm you'll be familar with Android Studio.  If you are familir with Eclipse for JBoss you'll be familiar with CUBE_IDE.

A tip:
Don't become too attached to your IDE config and settings.  If and when Eclipse detonates and corrupts itself the fastest way to get it working again is to create a whole new workspace and import you projects across.
Better yet.  Don't create your projects in the workspace in teh first place.  Create them external to the IDE and "Import from filesystem" with the "Copy to workspace" unticked.  So even when you wipe or delete the workspace out of frustration, you can rebuild it in minutes.
« Last Edit: October 04, 2022, 01:50:30 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #610 on: October 04, 2022, 02:05:48 pm »
On code generation.  At least the STM32CubeIDE gives you choices, such that a default project starts with no peripherals configured and a minimal (debatable) amount of HAL boiler plate code.

Contrast with the Arduino IDE / Framework where it just configures everything, whether you need it or not, and makes a whole bunch of decisions to follow "Arduino conventions" and ... then hides ALL of it entirely from the user.

If you delete the comments from the default project it's actually not that bad.  If you remove the generated error handler, interrupt handlers etc. etc. etc.   it really comes down to a bit of ASM to start the chip, the memory mapping file, NVIC initialisers and not much else.

The advantage of using the HAL functions which generate a lot of that code bloat, is more simple than you expect.  Those HAL librariles compile on a large range of STM32 micros.  So in a lot of cases you can just flip the chip type, regenerate the hal boiler plate and your code still works on the new MCU.

If you had dont everything via registers directly that is unlikely to occur.  No?

It's always a trade off.  Bloat for convenience, bloat for safety, bloat for ease of use.  Hardware is cheap developers are expensive.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28111
  • Country: nl
    • NCT Developments
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #611 on: October 04, 2022, 04:28:32 pm »
The advantage of using the HAL functions which generate a lot of that code bloat, is more simple than you expect.  Those HAL librariles compile on a large range of STM32 micros.  So in a lot of cases you can just flip the chip type, regenerate the hal boiler plate and your code still works on the new MCU.
No. It won't. The API between various peripherals isn't consistent. And it can't be because peripherals with a similar-ish function are too different between STM32 controllers.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: Siwastaja

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #612 on: October 06, 2022, 12:43:42 pm »
Is there any way to stop a Windows application from grabbing focus, and thus absorbing any keystrokes intended for another application?
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #613 on: October 06, 2022, 01:56:20 pm »
Is there any way to stop a Windows application from grabbing focus, and thus absorbing any keystrokes intended for another application?

Under the default shell I don't think so.

It's exceedingly annoying and exceedingly insecure.  I had an IM client pop itself into focus while typing a password the other day and it was only by chance I looked back up before hitting enter and sending my manager my login.

I've even had pop up error boxes and the like appear under my mouse cursor just at the moment I click something else and click the error box.

Actually, last week the "Your PC needs to be restarted...." popup appeared requiring me to restart.  Except I had just typed "ls" in a terminal and when I hit enter it actually was captured by the "Restart Now" button!
« Last Edit: October 06, 2022, 01:58:07 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #614 on: October 06, 2022, 01:59:47 pm »
No. It won't. The API between various peripherals isn't consistent. And it can't be because peripherals with a similar-ish function are too different between STM32 controllers.

Well, you best tell STM that.  Because they called it a Hardware Abstraction API.  So it's obviously not abstracting any hardware and on your advice they could save a lot of money.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15444
  • Country: fr
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #615 on: October 06, 2022, 06:03:38 pm »
At some point, Windows was NOT stealing focus by default, unless you enabled it through some system setting. For any process requesting focus, that was not in the foreground, the corresponding window title bar would just flash (and in the task bar too.) Pretty cool.

IIRC it was in Win 2000 and Win 2003 (the latter was a server version but was what I used for a few years instead of XP, it was easy to configure it as workstation, and it was great.) The MS geniuses probably figured that it was too much of a "mental burden" for the idiotic masses not to have the window wanting focus to just plain pop up right in their face, so they removed this feature. Or maybe that was just to annoy users, which MS is very good at.

On a different, but equally problematic vein, the OS should never allow the screen to go blank (or screensaver) without locking the session at all times. Yes I know some people find it so hard to type their password. But thing is, you may not know whether the session is locked or not. I have been trapped once typing my password when the screen was blank out of habit, thinking the session was locked. And it wasn't. So the password I typed ended up in the application that was in the foreground. Things to think about.
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #616 on: October 08, 2022, 05:16:49 pm »
Quote
the OS should never allow the screen to go blank (or screensaver) without locking the session at all times

I think that is configurable in the screensaver config - desktop / properties etc.

You can have a screensaver without a password, which is ok for a privately used PC at home.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #617 on: October 08, 2022, 05:52:11 pm »
Coming right back to the OP again.

I've been using STM32CubdeIDE for a few weeks now and I am used to Eclipse appliance IDEs.  I'd say it was one of the better ones.

On logging in the next day and finding you project doesn't build.  This happens from time to time, it's an artefact of your build timestamps getting confused and thinking a .o file is up to date and it's not.  I had it twice recently.

In both (the usual) cases of this, I just did a "Project->Clean" and it fixed it.

This happens from time to time in Java too.  Although it's usually a lot more complicated and it's due to slightly out of date deps somewhere in the tree.  Forcing a dep update twice in a row usually sorts it.

Building off network drives or NAS etc can cause build timestamp slew, which upsets make and most build script engines.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #618 on: October 08, 2022, 09:38:51 pm »
Agree 100%. I always Clean the project if editing any files outside of Cube. Cube should spot them if they are more recent (there is a config for this IIRC, somewhere deep in) but it doesn't always work and you get weird things happen.

Cube V10 is less reliable than previous, too, especially in breakpoints etc getting screwed up. One has to exit and restart Cube.

But I have never seen a solid Java application on a PC. I've used Java apps (Windows) for years in other areas and they were crap too, sensitive to all kinds of stuff. But if you look at how many thousands of files are in this kind of application, it's not surprising.

And losing the debugger is common; every 10 or so builds I have to unplug/reconnect the USB cable. That is with STLINK V3. I think STLINK V2 was more reliable but it doesn't do the ITM console debug which is sometimes useful. It is a right PITA when working remotely, over RDP; then it happens more often still. I have to message someone on the site to do the USB cable ;) The only other way (remotely) is to reboot the PC.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6278
  • Country: es
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #619 on: October 08, 2022, 10:04:17 pm »
Peter, give EmBitz a try.
You might need some time to get used to it, but the speed is just mindblowing, just like older IDEs before the Java crap era.
It includes SPL, LL and HAL libraries, not sure if CubePukeMX importer is already done, the guy said he was working on it...
It also supports other architectures.


« Last Edit: October 08, 2022, 10:40:57 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #620 on: October 09, 2022, 09:15:58 am »
Thank you. I posted a Q on their forum:

https://embitz.org/forum/thread-138-post-638.html#pid638

I wonder what the dev's business model is in the long term. To emulate Cube is a huge amount of work. Even just writing the editor is probably a man-year, unless you can build on something else.

I don't need MX and don't need HAL libraries; AIUI all these are already imported in my project, aren't they?? Cube keeps its own stuff under c:\st and c:\users and AIUI it transfers those to your project. I have certainly made copies of my project on a laptop, but that had a Cube installation (obviously) so if the project had external links (say to c:\st and c:\user) I would not discover that.

« Last Edit: October 09, 2022, 09:18:22 am by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #621 on: October 09, 2022, 11:22:14 am »
Usually projects will import fairly easily.  You can usually find a guide on what to commit to VCS and what not to.  The project itself, ie copied from the "workspace" folder will contain absolute paths.  The actual application files remain independent and relative.

This re-iterates the point about keeping your projects outside of the workspace folder, even if you have to create them there initially, they should be decoupled from it as soon as you can.

To re-import it use the File...Import...  "Existing projects into workspace".  Do not move/copy the files.  Then all "your" files can be done with as you choose and the "workspace" metadata will be recreated for each instance.... and it stops people checking workspace files into git!

The caveats of course is the configuration of Eclipse.  You'll not have much luck importing a Cube projecting into Eclipse for JBoss obviously, but it also applies to plugins.  They will need to be installed manually, although it will probably give you a sensible or not error.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28111
  • Country: nl
    • NCT Developments
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #622 on: October 09, 2022, 12:08:42 pm »
I second the observation of peter-h. I have never seen a rock solid java application as well. I guess that is why Google wrote their own java implementation for Android.

It is a miracle Eclipse works as well as it does though. On Linux Eclipse works considerably quicker though but it seems newer versions of Eclipse are slower. For everyday use, I'm still using the version called Kepler
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4285
  • Country: gb
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #623 on: October 09, 2022, 12:48:51 pm »
The Java UI toolkits are horrible.  Java is hideously memory intensive, not just amount, but the churn.  That is far more likely to be the case in desktop applications than in enterprise.  Enterprise Java runs on Linux headless of course and memory is expansive and cheap.

If you look at various java apps (including Eclipse's) "ini" files they typically allocate 256Mb or 512Mb up front and request the option to expand to 4Gb or more!  I think eclipse defaults to 1Gb, in Java development that usually gets expanded to 4Gb.

That obviously has knock on effects on your CPU.  That memory churn is extremely CPU intensive.  So an older, weedier laptop or something on a Celery stick moving multiple gigabytes of page files around in memory takes tangible time.

Eclipse I believe uses a gtk based native accelerated UI toolkit.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4160
  • Country: gb
  • Doing electronics since the 1960s...
Re: Is ST Cube IDE a piece of buggy crap?
« Reply #624 on: October 09, 2022, 02:04:49 pm »
Quote
To re-import it use the File...Import...  "Existing projects into workspace".  Do not move/copy the files.  Then all "your" files can be done with as you choose and the "workspace" metadata will be recreated for each instance.... and it stops people checking workspace files into git!

I may be misunderstanding but when setting up a copy of a project on another machine (say, on a laptop which you are taking with you when travelling) I never found a way to use Cube to import a project, by pointing Cube to the existing location from where you want to import it to form a local copy. It never worked. Such a simple thing!

The way which works is to separately copy over the project directory, say c:\productname\project1\, where you have the whole hierarchy



(btw, I notice the .xml files are old and probably fossils from an old Cube version)

and then (or before, but separately) you install Cube on that machine and use these steps:

When a completely fresh installation of Cube on this computer is started, it shows a general information/marketing page. This should be closed. Choose Import projects then Select / General and highlight Existing Projects into Workspace. Then browse to it and eventually it discovers a valid project (not sure how it does that; probably looks for certain file(s)). Then you Import it. That "just works". Then you must do Project / Clean Project and then you can build it. I've documented the steps carefully with screenshots but the above should be obvious.

You have to import an existing working project. To create a project from zero is too complicated to even start to explain. Way too many things to configure. Looks at the days and weeks of my life spent e.g. replacing the crappy Newlib printf with its dummy mutex stubs and heap usage. Even if I had just main.c which says "hello world" I would not know how to set up Cube. But of course in an embedded context you have no "stdout" and there is no way to do "hello world" without a huge amount of supporting code, to set up the CPU, peripherals, and as a minimum configure a UART to squirt the text string to. Now that I have a solid running project I never want to do this again in the rest of my life :)

If you want to import a Cube project, you better hope everything is to be found in the project directory otherwise you will have a Cube version dependent import method. I've been using Cube since v1.3 and it has changed the usage of c:\st and c:\users\username\stm32cubeide several times.

Quote
If you look at various java apps (including Eclipse's) "ini" files they typically allocate 256Mb or 512Mb up front and request the option to expand to 4Gb or more!  I think eclipse defaults to 1Gb, in Java development that usually gets expanded to 4Gb.

I have 24GB but there are other issues :)

Java is great is you work for a company paying you by the hour. Then you have a job for life.

If/when I get a reply on the Embitz forum I will give it a try, but I won't risk it unless I am fairly sure it won't trash it.
« Last Edit: October 09, 2022, 02:24:23 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf