4 ms·
not tied to the processor architecture and thus can switch to a better/cheaper cpu easily. The core processor arch yes, but for many (most?) of these small emb
by StillBored 4y ago
not tied to the processor architecture and thus can switch to a better/cheaper cpu easily.
The core processor arch yes, but for many (most?) of these small embedded systems, a large part of the code is basically device drivers used to communicate with GPIO, a plethera of serial buses, and any number of other devices which vary from microcontroller to microcontroller. So unless you offload all that to a RTOS of some kind (which your then limited to devices the RTOS supports) switching devices isn't easy. And for many things, the RTOS overhead will be the largest consumer of CPU+RAM. That is sorta the beauty of the ardunio ecosystem were much of this has been abstracted into common libraries across a number of device families.
- alfor 4y agoState machines in C work great when you don’t want a preemptive RTOS. I did a embedded project on 8051 like that, we had the legacy code 100% in asm and we moved to C. In the end I think we had about 10-20 lines of asm and everything else in C. You are right switching cpu and thus all the peripheral is major headache, not something to take lightly.
- deleted 4y ago[deleted]
- Johnythree 4y agoIs relatively trivial. Have done it countless times since the early '80's. In fact I find that learning new high level packages much harder.