I am running into limitations in the design of the arduino ide, but I am not sure where to go from there.
I have seen code-blocks mentioned and wondered if anyone had any experience with it.
Janus.
A sometimes customer uses it for arm compiling, but I have not studied it in depth.
I have little experience with actual compilers, 99% of what I do is find the choke points or fill in missing bits for programs or machines.
Setting compilers up is something new for me, and not much fun.
I am finding getting the stm32 arduino stuff to work to be detail ridden.
Worse, I am having trouble finding the pattern to how things are configured.
It feels a lot like someone set off a freon horn full spaghetti.
Though since it works, I know there is an underlying order of some sort.
It would be nice to have a more workable IDE, most especially one with some form intellisense, a feature I like very much.
The arduino IDE is fine for the simplest of things, but it lacks many features that I use in other settings.
Janus.
Code::Blocks has some of the desired features and is lightweight, but don’t expect good support for beginners.
If you are familiar with more advanced IDEs, I would suggest you to look at Sloeber, which is Eclipse-based and has good support, including from some users in this forum:
http://www.baeyens.it/eclipse/
http://arduinodev.com/codeblocks/
because there is a simple emulator that sometimes helps, but there are no updates since 2012.
Do the official version has an emulator?
I have tried sloeber as recommended above, and found it to be far less annoying than the arduino ide.
It also has more of the features that one needs in navigating unfamiliar code.
It took the added json for the stmduino libraries just fine, and accepted my greenview_f107 variant without a problem.
The only issue I am having is it isn’t sending the bin file to the board.
Says stlink not found.
Janus.
I only use the Arduino IDE to compile & upload sketches and currently do all my code writing using Notepad++ as it runs in a portable version so I can take it with me and no need to install.
Allegedly VSCode can be made portable but not sure about the Platform.io plugin.
[Janus – Thu Sep 13, 2018 8:40 pm] –
…
The only issue I am having is it isn’t sending the bin file to the board.
Says stlink not found.
…
… in my opinion, that pretty much makes it useless.
I must confess that I simply do not understand all of the discussion around alternative IDEs. All of the code completion this & that features are OK, but I envision this kind of thing like training-wheels on a bicycle. I certainly would not hire a programmer that required such a crutch. If you know the language, you can write and be productive in the native Arduino IDE. Pencil and paper were given to prospective job seekers to demonstrate their ability to write code snippets.
Yes, I have used those fancy environments in a previous life and managed ten Java programers who used such toys because that was the development environment provided as standard for the team. But anyone of that team could have written good Java on an Etch `n Sketch.
I believe that if you find something that works for you, great, but the level of expertise in this forum spans from newly-birthed newbie to senior developer. One tool will not fit the needs of all forum members. That is why the forum must have a common IDE that can reach across all forum members; Arduino IDE is free and simple enough for all members.
For the sophisticated (and self-supported), use what you want.
For newbies, forget the fancy and problematic IDEs and just learn to write good code. The time wasted with installing and configuring an advanced IDE is better spent learning the basics of C/C++. A fancy IDE will not make one a better programmer.
Ray
In past, I was using it with the native support for SPL. Recently, I have switched to MxCube and used those libraries for F1, F4, F7, to H7 development. I am using Arduino IDE only for Teensy and ESP32 development.
Bottom line is that EmBitz is highly recommended.
The problem with sloeber sending the bin was because I had not specified a com port.
Which I did not believe was needed since I am using an stlink clone.
I traced the compile and send chain to see what was happening.
The stm32 package always sends the com port regardless how the data is sent.
I believe this was done to align parameters being sent to batch files and scripts, so the same parm number always does the same function.
The arduino ide defaults to the first com port so there is always a baseline.
Sloeber does not, once I specified a com port even though I am not using one, it worked.
It did this because an unchosen com port is a blank string, which lower the parameter count by one.
I see this sort of thing a lot in my work.
The stm32 addon for arduino was designed for arduino.
Built with the features and design of that environment in mind.
Intended to expand on that particular thing to do one particular job.
Yet there is also a lack of sanity checking parameters.
In this case, because arduino always has a com port set, there was no need seen to check if one had been chosen, or if the string was blank.
As for the discussion of alternative ide’s, try taking a step back for a moment, see from another perspective.
Nearly all of my work is inspecting other peoples projects and work.
I work in several languages, on several architectures, and various types of hardware.
Normally it is in 8/16/32 bit assembly for various subsystems, or some version of basic, or a version of pascal, or a version/type of shell scripting.
Ladder programming, sequence/relay controls, electrical signal conversion, protocol conversion.
Lately I have had to add C & C++ to that pile, of which the latter has been as much hassle as the rest combined, including the former.
Yet I do not claim to have any real depth of knowledge of any of them.
Then there is the hardware side, which is a different mess.
Do you know what they have in common?
Patterns.
A good ide will help you see the patterns, without trying to show everything at once.
That is what I do, look at the patterns.
So anything that helps me find/see the patterns without flooding me with irrelevant at the moment garbage, is good.
Especially if I can keep a visual theme on the screen that visually demarks what things are.
I can use those horrid dark theme things, but it is hard.
By the time I turn my monitor up far enough to see with them, it is like my monitor is set for optical weapons research.
That level of bright also gives me headaches very quickly, so a nice pleasant win2k type theme that works at low monitor brightness is appreciated.
My customers can be broken into two over all categories, those with a good project index, and the other 99% of them.
One customer even claimed to have made their firmware smaller by reducing the number of source lines, their bin wasn’t nearly so compact though.
Yet had these last few little bugs that needed to go away, and they just couldn’t find them.
Their code looked like someone had snuck some assembly language into an obfuscated C contest.
It compiled great, but wasn’t designed for humans to read.
Once I fixed that, one line one job, the number of lines had gone up, dramatically.
Then I had to unwrap dense logic in convoluted code written in nothing but C shorthand.
Once I got that done, I found an alarming number of places where parentheses were misplaced.
Only once I started getting them straightened out, did I find the war of | vs ||, & vs &&, = vs ==, and some more, real C/C++ programmers are likely shaking their heads having seen the same many times.
A quarter of their dense code was to make up for mystypes, and the resultant faulty logic.
They actually fixed their own code, once I showed their programmers their own code formatted for humans rather than compilers.
Turned out they actually knew their own stuff well, but had gotten so hung up one reducing the number of lines to make it more compact, that it was no longer readable.
I didn’t ask who started the mania with reducing line counts, but their management did have a shake up a short while later.
I can agree that in some ways an ide can be training wheels.
Those are not always a bad thing though.
Your job as a programmer is to communicate.
With the machine through programming, and with other people through the program and machine functioning.
There is no need to carry the entire thing on your head, that is what reference material is for.
That way you can be familiar with the structure, without having to memorize every detail, just have them there to check.
The arduino ide is designed as a side door, not a garage door, and certainly not a freight door.
Its design and features reflect that.
I bumped into its intentional limitations rather quickly because it is designed to hide the things that I actually use.
Hiding those things though, is a help for a lot people getting started.
The largest problem I had to overcome when I started, was thinking there is only one answer, only one way to do a thing.
The differences between people are where new things come from.
Celebrate those differences, use them.
Now I am off to test out the ide mentioned while I was preview/editing this comment.
Janus.
For the sophisticated (and self-supported), use what you want.
Your well articulated argument does not change my mind or any of my post since you are exempt from the newbie classification. And while it may sound crude, you are not the audience I was targeting.
But all of the forum talk about how great the fancy IDEs are and all the rave reviews being bestowed upon these products make newbies and joe-user think they need the same. Fact is, they do not need a fancy IDE… Arduino is more than adequate. Putting a newbie in front of a fancy IDE is no different than putting an aeropilot want-to-be in the cockpit of an Airbus A320. It takes time to develop the skills to work a fancy IDE in an efficient manner … time a new user can better apply to programming knowledge and techniques.
Ray
I have been told more than once that I tend get wordy, sorry.
My intent was exactly the opposite, but it and I may have lost track of each other once I got to typing.
You are entirely correct that a true beginner/newbie does not need a fancy ide, not do most projects in fact.
This is the market the arduino ide is aimed at.
Exactly enough to blink lights, read some things, write to some lcds or serial ports, training wheels is as good a description as any.
How most people get enough knowledge or speed to keep going on their own.
Just for laughs, if you want nightmares, you can have them, just look at this.
Should provide plenty of sleepless nights thinking about all those lights and readouts and buzzers and blinky stuff.
What I should have ended with is a simple rule.
Use the appropriate tool for the job.
Sledgehammers are bad at putting in finishing nails, and tack or cobbler’s hammers are useless for structural rivets.
You don’t need to know pentle release characteristics for fuel injectors/servos to get an engine started, bit it will be hard to make a dynamic fine tune without them.
Use the ide that provides just a little more information than really needed by the programmer.
This gives them everything they really need, without overloading them, while providing a chance to expand their horizons at their own pace.
Sloeber is not very portable.
It interacts with your user profile, so even if you have multiple copies, what you do on one, affects the others.
A fact I discovered the hard way.
I would have tried to fix it to be truly portable, but that wuld mean recompiling all the way back to eclipse, which it is an addon for.
Compiling eclipse is horific, so no.
I am currently trying to recompile codeblocks to use a local directory the same way the arduino ide can be configured.
I can share my changes if anyone cares after I have it working.
Janus.
