My VSCode setup is already crowded with Development tools for other platforms and the Arduino IDE reliably works, with the libraries. I’ve been using the 2.0 beta for awhile And it is really nice. I’m pleased it’s made it out of beta.
My VSCode setup is already crowded with Development tools for other platforms and the Arduino IDE reliably works, with the libraries. I’ve been using the 2.0 beta for awhile And it is really nice. I’m pleased it’s made it out of beta.
It literally recompiles all code on every verify or upload (because "we don't want lots of machine objects littering hard disks")
So on any of the mbed based boards compiles are like a minute or two for anything. On platformio and other compatible ways, it is instant.
So even for basic messing around I don't use the Arduino ide because it makes it not fun
This alone was reason for me to move to PlatformIO. It's infuriating.
A main.cpp that includes all other .cpp files and a build.bat that recompile everything, it's always been instant.
And I do use a some amount of template and constexpr for peripheral setup code (computing all the constant values for GPIO config registers with a nice "DSL" of sort for example).
It all compiles nearly instantly. So you can have large apps that work fine in that space and time.
I haven't debugged the differences in compile options, etc. I suspect it is related to constant data handling differences (they both have the same RTTI, exceptions settings. They both use the same GCC version). But IMHO there can be very wide variation in the size of literally the same code.
In the case of arduino, they don't provide you anything that could be used to flamegraph it, but i suspect it's just recompiling a significant part of mbed each time or something.
The non-Mbed based ones are faster to compile for sure.
[1] The one thing Zephyr does not yet support is std::thread/std::mutex, but it's really easy to make it work in your app because the build system functions properly, so i did and sent them patches as an example. They are working on proper support in the toolchain. Just need to rebuild it with some different config flags and twiddle a few files. MBed fully supports std::thread/etc if i remember right.
What did you do to your computer? My 5 year old Ryzen desktop opens the Arduino IDE in ~1.5 seconds.
I blame windows stuff I guess, it's definitely not just CPU power
My top of the line macbook, with a fresh arduino 2.0 ide install on MacOS, is the same way.
Meanwhile, literally everything else works great.
This is absolutely an Arduino problem. avr-gcc for a small program often compiles faster than the time it takes to upload with avrdude. And the IDE uses both underneath. Or compared to Atmel Studio, which is surprisingly not bad.
I really think that professional software engineers are trolling "normal people" with stuff like this. Oh, you want to be a programmer? Jump through these 8 million flaming hoops suspended over man-eating sharks, and you'll see just how hard it is to make an LED blink. After failing, you will dedicate a new national holiday to our sacrifices; we do this for a living and you should be grateful that literal human garbage like you are even allowed to THINK about monitoring the water level of your potted plants. But behind the scenes, we don't do this for a living. When we press TAB, our IDE knows exactly which level to indent the text too. When we want to reflash our microcontroller, it does a diff of the last binary we pushed and updates only the 3 flash cells that actually changed and updates it in microseconds. When we want the documentation for some library function, it pops up in a web browser hovering above our cursor. Our life is nothing like this. We just use our skills to give you tools to make you think programming sucks.
It's all a scam.
It's like the legal system where emails are converted to fax when sent and then back to email when received.
That said, I think Mbed should have eaten Arduino's lunch but they kept making loads of different terrible build systems, and there are still a load of old boards available that need firmware updates to work properly. I have a couple of K22F's that have been bricked just by plugging them into a Windows machine. Never happened with Arduino.
So yeah, Arduino have sat still at the "it's rubbish but it works pretty reliably" stage while Mbed has failed to get beyond "it's great... when it works".
Not every tool is for everyone, and that's fine :)