Embedded Systems Interview Questions

In this moderately long page, I’ll list down the most common embedded systems interview questions. I’ve been answering too many questions over the past few years and many readers have asked for a compiled list of questions and answers for embedded systems and embedded c interview questions. So here it is!

Whether you’re a student searching for an embedded systems internship, a graduate seeking an embedded software position, or a full-time embedded systems engineer seeking to switch your position or the company. In all cases, you’ll need to go through one or more technical interviews to get where you want.

+150 Embedded systems interview questions

Please, be advised that the interview questions depend heavily on the specialty of the company you’re going after (automotive, security, robotics, etc), the position you’re applying for (internship, testing, embedded software, tooling, etc), and also your CV. Yea, your CV somehow dictates some of the interview questions. For me personally, I was asked in (USB, CapTouch, etc) just because it’s all written in my CV, however, these topics are not mandatory at all for most embedded systems positions. So, only write in your CV what you can actually demonstrate and be ready to get questions about it.

Regardless of the position you’re seeking, the company specialty, or your previous experience, there are many general questions that you’ll most probably get. And this is what I’m going to mainly focus on this page. To help you quickly revise and get ready for your next embedded systems interview.

We can categorize these questions as follows.

Embedded Systems Interview Questions

Embedded C Interview Questions

[expand title=”What’s The Startup Code?” trigclass=”arrowright” ]

The Startup Code in embedded systems is used to set up data memory sections such as global data variables. It also zero initializes part of the data memory for variables that are uninitialized at load time. The startup code copies 5 from flash to variable y in the RAM as it’s an initialized global. And it also initialized the x variable with 0 value.

Embedded C Memory Sections

For applications that use dynamic memory allocation C functions like malloc, the C startup code also needs to initialize the data variables controlling the heap memory.

After this initialization, the C startup code branches to the beginning of the main program, and your application starts running. The C startup code is inserted by the compiler at the linker stage automatically and is toolchain specific.[/expand]

[expand title=”What’s The Bootloader?” trigclass=”arrowright” ]

A Bootloader in embedded systems is a standalone application that gets developed, if needed, aside from the target application itself to provide the following functionalities. The bootloader is the first software that runs after board power up and it does hardware check, and initializations for the processor, peripherals, and the OS if used. Then it starts to run your main application.

The bootloader application can also be used to upgrade the firmware on the target microcontroller via serial communication ports like UART, SPI, I2C, USB. So, it does control the hardware peripherals to do this task. Then, it does release everything and initializes the peripherals to be used by your main application after the bootloader has done its work.[/expand]

Local, Static, Global variables in C

[expand title=”Global Vs Static Global In C” trigclass=”arrowright” ]

A Global variable in C has a global scope across your whole project files. Not only the .c file in which this variable is declared. For any source code .c file to be able to use that variable it’ll only need to extern it and it has access to it.

However, on the other hand, if a global variable is declared to be static, it’ll be only global across the source code .c file it’s been declared into. No other files in the project can extern and access this variable.[/expand]

[expand title=”What’s a CallBack Function? Usage Examples?” trigclass=”arrowright” ]

A Callback Function is a reference to executable code that is passed as an argument to other code that allows a lower-level software layer to call a function defined in a higher-level layer. A callback allows a driver or library developer to specify a behavior at a lower layer but leave the implementation definition to the application layer. Which makes the software easily reusable and more portable.

For example, if you’re developing a driver code for a Timer module and it has a function to do whenever an overflow interrupt is fired. The functionality doesn’t need to be fixed but it has to be defined by the application higher-level. So, you can use a call back function that points to nothing. And in the application code, the user will write the interrupt handler function’s code and set the timer call back to point to this handler routine. So, whenever an interrupt is fired, the ISR will call the call back function which points to the user handler code and it’ll get executed.

And yes, this means that you as a driver developer will have to provide the call back registering “setting” function that the user can use to set the call back function and make it point to the implementation in the higher-level software layer.[/expand]

[expand title=”What’s Void Pointer in C?” trigclass=”arrowright” ]

A Void Pointer is a pointer that has no associated data type with it. A void pointer can hold the address of any type and can be type-casted to any type. This means you can use it to point to any variable type you want as shown in the code snippet below.