Master the fundamentals of embedded systems with these 2 must-ask questions

Tobias Aguiar
5 min readJan 26, 2023

--

Photo by Vishnu Mohanan on Unsplash

Preface

A good indicator that you have progressed and you lnow the basics is that you can do the beginner-type of embedded projects (blinking led, basic device drivers,…). However, if you want to get to next level, just having abilities to execute projects are not enough, although they are an inportant part of the process.

It’s more about the questions, than the answer it can give us

You might heard about the following quote :

questions are what move the world.

Yes, the questions are far more important than the answers. This can be explained by the fact the answers are just the ending result, whereas questions are the process. In the game of growing and progressing, the end result won’t necessarily make you get better, because it limits your critical thinking and does not push you to new limit boundaries.

Without inquiring, we would not discover new solutions, ideas, and perspectives.

It’s through the habit of being constantly asking questions that we are able to move beyond the limitations of our current understanding and push the boundaries of what’s possible.

Questions are the fuel which drives innovations. And it’s just not for embedded software, it’s for pretty much everything.

And even if they are obvious questions,that reflection can take you deeper into thoughts that are linked to other important concepts.

You don’t need much to progress your knowledge a little bit more. Here’s some examples of “simple” questions which with enough details, can give us really good reflections:

1 — Why do we need a toolchain in the context of embedded software development?

Photo by Ilya Pavlov on Unsplash

When programming, you can often use the same programming language on a desktop PC as well as on an embedded target (such as an MCU). However, why should we have different compilers?

The end goal changes everything

Let’s take the case of a MCU and a desktop PC. The difference in the end goal of each technology orders the end designs. First, we can note the difference in size, which leads to a difference in available resources.

Additionally, you’ll see that they were built to act in different contexts: embedded targets are suited for dedicated tasks, whereas a desktop PC is designed for a multi-task environment for the user.

The difference in available resources makes us suppose that they have different CPUs. And they actually use. The compiler design is also based on a CPU architecture.

Smaller in size, also smaller in other features

As a mcu’s CPU is smaller, we can deduct that they have a smaller ISA (Instruction Set Architecure), fewer registers and less memory available for use. Moreover, as they are used in different context, they have different features in their designs that needs to be take into consideration by the compiler.

For example, the x86 CPU architecure (a.k.a your PC), to run a multi-task environment for the user, needs features as task-switching, protected mode, memory management and virtual memory. These will allow the CPU to switch between multiple tasks efficiently, provide isolation between different tasks, and provide each task with its own memory space.

Also, as they act in different contexts, embedded systems often need to be submitted into harsh conditions such as extreme temperatures or vibrations, which are not present in traditional systems. Such constraints recquire the hardware to implement special features, such as implementing specific hardware protection. For example :

  1. Temperature-graded components,
  2. ESD protection,
  3. Overvoltage protection,
  4. Specialized power supply solutions,
  5. Mechanical protection, and
  6. Electromagnetic compatibility solutions

All this to ensure reliable and robust operation in harsh conditions.

2 — Why do we need to flash the software we made on the embedded target?

Photo by Kumpan Electric on Unsplash

Flashing embedded software onto an embedded target is necessary because it allows the target device to run the desired software.

The embedded target is external to your host PC

Differently from the desktop PC, where you program and execute the program in your own machine. When programming in your own PC machine, it has some built-in methods to load the program on the memory and then execute it.

When programming a MCU, for example, you are still using your PC to program your MCU, but the MCU is external to the machine, which leads us to find a method to transfer the executable program (in general in a binary form) to the non-volatile memory on the embedded target.

This is done using specialized software tools, such as a programmer or a debugger. And that’s why it is requires a connection to the target device, such as a USB or serial connection.

Flashing can have some recquirements

Additionally, there can be different requirements for flashing. For example, some embedded systems may require a bootloader to be flashed first before the main software can be flashed.

That’s because bootloaders play an essential role in embedded systems, they help in initializing the hardware, loading the main software, providing security, and enabling firmware updates.

Final thoughts

As you can see, simple questions like these can expose us to different concepts, such as computer architecture topics like ISA and bootloaders. The more you think about the “obvious,” the more you realize it’s not as obvious as it might seem.

It’s through asking questions that we identify what we don’t know, what we want to know, and how to go about finding the answers. Furthermore, questions open up new possibilities, perspectives and help us to think critically and creatively.

Keep asking yourself questions, always push your limit boundaries to get more knowledge.

Thank you for taking the time to read me! Happy reading/coding!

Other articles

  1. Topics you should learn in embedded software development
  2. You only need these 2 practices to progress as en embedded software engineer

--

--

Tobias Aguiar

Software developer | Trying to make complex concepts look easy | Want help or discuss about embedded software development? Email me! tobi.aguiar01@gmail.com