Posts

Showing posts from November, 2024

Bare metal vs. RTOS?

Image
  With limited processor power, random-access memory, and flash memory, embedded systems are resource-constrained. In light of this, memory-optimized code is one of the primary objectives of firmware development. And what could be more effective than executing your code in a bare-metal application—that is, without any intermediary layers like an operating system—directly on hardware? As a developer, you have direct access to and control over all of the system's resources, including the processor, memory, and peripherals. Junior embedded developers—but not just juniors—share this viewpoint. Baremetal vs RTOS Working on bare-metal or RTOS-only projects for extended periods of time can prevent you from seeing all aspects of an issue, depending on the organization and the duties involved. I will examine the distinctions between the two strategies in this blog post. 1. What is RTOS? The acronym for Real-Time Operating System is RTOS. I'll give a brief explanation of what an RT...

What does "real time" mean?

Image
  These days, "real time" is a commonly used term. Despite being a technical term, it is frequently used in everyday speech. When I say, "I do not watch much real-time TV," I'm implying that I use streaming services to watch the shows I want to watch at the times I want. Therefore, "immediate" or "occurring now" are colloquial terms for "real time." For instance, how does this fit with its exact definition when we talk about a real-time operating system? … A rather outdated computer dictionary's definition of "real-time system" is as follows:   “Any system in which the processing of data input to the system to obtain a result occurs virtually simultaneously with the event generating that data.” It uses airline reservation systems as an example. It is obvious that this definition does not meet our needs. Here is a better definition: “A real-time system is one in which the accuracy of the calculations is depend...

Selection of your embedded system’s software architecture

Image
  In an earlier blog post, we discussed the benefits and drawbacks of both RTOS and bare-metal architectures. Bare metal is simply defined as firmware development that takes place directly on your hardware, without any intermediary layers. However, does this imply that bare metal exclusively refers to firmware development in assembly? How about using memory-mapped registers directly in C development, with the aid of header files that contain macros for such addresses? Is that metal exposed? We can't always be certain how a C compiler will convert our code to machine code because C is a high-level language. Why do vendor-provided HALs appear in C? That is an additional layer of abstraction. Why do schedulers have sequencers? Although the notion of bare metal is frequently ambiguous, many developers consider firmware development in C utilizing HAL to be bare metal. job preemptiness, or the capacity to allocate resources to a job with a higher priority, is the primary distinction be...