2024-05-22 06:01 AM
Is there a way to configure the STM32CubeIDE to, when trying to run, silently not "launch" when the build fails?
It's nice to have an edit/build/run cycle where, if the build succeeds, it runs and if it fails, it just shows me errors without requiring me to click anything. However, the STM Cube presents the below dialog when trying to run and the build fails. I'm looking for opposite choice: "Never launch without asking on build failures"...
Thanks!
2024-05-22 06:11 AM - edited 2024-05-22 06:15 AM
Maybe you want just compile and not start debug ... so compile first, until no errors and warnings in your program.
use the hammer..
And read a little bit :
https://wiki.st.com/stm32mpu/wiki/How_to_get_started_with_STM32CubeIDE_from_scratch
2024-05-22 06:42 AM - edited 2024-05-22 06:44 AM
Thanks so much, but that's not what I was asking for. That's two steps, and the question is about doing it in one. Also, FYI, that "getting started" link doesn't cover anything relevant to my question or even your suggestion.
Any idea how to address the question?
If it helps to make my question clearer, assuming you're familiar with make, once I convert this to a command line build environment, the equivalent command will be on_change make run, where on_change executes the make run command every time I save my work to disk. The Makefile's run target is a .PHONY target that depends on a flash target, that depends on a build target... etc.
This makes for an extremely lightweight (and far faster) edit/build/test cycle. I'm taking this project over from a dev who doesn't know how to do that sort of thing, and I don't have time this week to do the conversion, or I'd just cut away from the STM32CubeIDE except for its cromulent config and remote debugging capabilities.
Let me know if you have any questions about that, it really does speed things, or at least me, up.
2024-05-22 07:05 AM - edited 2024-05-22 07:08 AM
So i dont understand, what you expect.
We agree on this : (write program) -> compile -> flash to target -> start debugger (or just run , no debug) -- right ?
And in this IDE you can start compiler only or compiler+flash+debug then, or compiler+flash+run . ok ?
And if compiler+flash+debug , but compiler finds errors, it ask : really debug this...?
But you want : ... ? Explain, what should be different.
+
> but that's not what I was asking for
Manual etc . see :
https://www.st.com/en/development-tools/stm32cubeide.html#documentation
2024-05-22 08:44 AM - edited 2024-05-22 08:45 AM
I want to hit "Run" and, when the build fails, have it stop without the popup. Don't make me Alt-Tab back to the IDE, read the dialog to make sure it's the usual one instead of some other, more important / informive one like "Disk Full", lol, then press a button, then Alt-Tab to my editor...
I've looked in the manual, thanks. However, this is such a complicated app that I don't trust the manual to cover every little setting... or my ability to search for the right keywords...
2024-05-22 08:58 AM
>However, this is such a complicated app
Right . So one mouse click more or less is NOT the problem - believe me.
btw
How many programs (> 1000 lines or so) you made already ?
And which IDE did you use that is the way you want?
2024-05-22 09:14 AM
Lol. I've been writing embedded code since 1984 or '85, in Pascal (no, really!), C, C++, etc. on everything from eight bit machines with external RAM and UVEPROM (8051 FTW!) on wire wrap boards, through 16 bit and, now, 32 bit MCUs, yada yada...
I generally cut away from the IDE ASAP (see prior message) because they're slow and bloated, and will do that here when I have a sec to breath (or, more likely, ask an intern to do it), but back before Eclipse took over everything, some IDEs worked this way--no need for a popup when the "console" has all the info--build, flash, target stdout output, all of it--in it. And having two consoles (one for build output and a different one for flashing & debugging tool output) is also just excess complexity... anyway, it's been too long to recall, lol.
2024-05-22 10:28 AM
Ok, so your two or tree years more than me on this "business" :) (and 8051 was also my first cpu ) :) :)
Anyway, if you dont like this Eclipse monster, i can understand. (I dont like it so much .)
Beside using Keil or IAR , you can write your own script on this IDE also, but dont ask me, how to do...
maybe here, see:
For me , its just the integration of CubeMx, compiler, debug what i like, it makes the time from an idea to connect on a new cpu something until you have the basic setup and can make the first test really short, maybe 30 minutes.
So i have no problem with one mouse click more, if its working fine.
If its not working, maybe Eclipse/IDE crash , i am not so happy (wording -> to avoid the forbidden words), but i didnt find something really better in every respect. Tell me, if know something. :)
2024-05-22 10:55 AM - edited 2024-05-22 10:56 AM
Yes, that bootstrapping & configuration, and the debugger, are the huge wins. Also the discoverability.
However, the slow-on-Windows build times and clunky 1990's Eclipse "so complicated it hurts" UI (an aside: I tried to dig into Eclipse's codebase a couple of decades ago and it was like a horror film written in Java inspired by "Design Patterns: Elements of Reusable Object-Oriented Software"...), but at least modern machines have made Eclipse not so sluggish, and its stability has improved a lot in the intervening decades.
These days, I try to containerize the dev envs so I can mothball them and bring them out of hibernation later without having to re-install or, worse, have some silly auto upgrade change the toolchain or libs on me, and I use neovim (I used emacs, decades ago) and make if I can--when your edit/build/test cycle is in the seconds, and dominated by the time to flash, it's very freeing. And, with a few settings changes, make gets surprisingly fast and useful.
There is no silver bullet. The IDEs (and ST has done a really good job w/ this one) are great for bootstrapping, as you point out.
2024-05-23 04:35 AM - edited 2024-05-23 04:37 AM
Btw - if you like to work with make...try: menu: File ->new-> STm32 Cmake project->