The Arduino environment is limiting--that's the point.
Arduino attempts to keep simple things simple. Complex things may or may not be possible--but that's not what an Arduino is for.
The Arduino environment is limiting--that's the point.
Arduino attempts to keep simple things simple. Complex things may or may not be possible--but that's not what an Arduino is for.
You can speak of "hard realtime" but all of this stuff works just fine in a polled fashion, just get through your main loop quickly and don't block on anything. With nothing much to do the main loop cycles 5-10K times per second even on simple AVR328.
And then you have readable, easily maintained code without gnarly interrupt handling, realtime threads and all that.
Need microsecond level hard realtime performance? Then don't do that. Though my superficial reading is that you can partly escape from the Arduino environment to do that too, without having to give up all of it. Need microwatt level power consumption? Then definitely learn to program the bare metal. I haven't had to, yet.
Here's one of my less complex Arduino projects but the only one finished to a "show it off" quality. Realtime? Too limited by the Arduino paradigm? You be the judge..
https://github.com/MarkusWandel/battery-tester
I have to say, to get practical use out of the Arduino, you have to unlearn the "delay" function. If you never block on the main loop, you can do anything.
Erm, hard real time quite often is purely polled.
Interrupts introduce a lot of non-determinism that polling completely sidesteps.
the majority of the arduino environment has literally nothing to do with the complexity of getting your program onto the device itself.
you can have a very complex environment while still maintaining a very simple upload functionality for the device itself. there isn't any reason it can't be as simple as `dd if=/myprog.elf.bin of=/dev/arduinoserial`