5 exercises on embedded memory terminology: flash, SRAM, linker script, .bss section, and .data section. Advanced
0 / 37 completed
1 / 37
A firmware engineer reports: "The firmware image is 96 KB and fits comfortably in flash — we have 128 KB total."
What is flash memory in an embedded system?
Correct: B.Flash memory is non-volatile — it holds data without power. On most microcontrollers the firmware image (text section + read-only data) is stored in on-chip flash and executed in-place (XIP) or copied to SRAM for faster access. Writing to flash requires erase-before-write at page granularity, making it unsuitable for frequent runtime writes.
Memory type
Volatile?
Typical use
Flash
No
Firmware image, const data
SRAM
Yes
Stack, heap, runtime variables
EEPROM
No
Config, calibration, counters
2 / 37
During a memory audit your lead comments: "The task stacks and the heap are both allocated in SRAM — make sure we have enough for all tasks plus the FreeRTOS heap."
What is SRAM in an embedded context?
Correct: B.SRAM (Static Random-Access Memory) is the main runtime memory on a microcontroller. Unlike DRAM it requires no refresh, making it suitable for real-time systems. It holds the call stack for every task, the FreeRTOS heap (from which task stacks and kernel objects are allocated), and all read-write global variables. SRAM is typically 10–100× smaller than flash on the same MCU.
SRAM consumer
Notes
Task stacks
Each RTOS task needs its own stack
Heap
Dynamic allocations; fragmentation risk
.data section
Initialized globals copied from flash at startup
.bss section
Zero-initialized globals cleared at startup
3 / 37
Your team needs to place the bootloader in the first 32 KB of flash and the application at 0x08008000. The senior engineer says: "Edit the linker script to define those regions."
What is a linker script?
Correct: B. A linker script (also called a scatter file on ARM RVDS/Keil) is a text file — usually with a .ld extension for GNU ld — that tells the linker the memory layout of the target hardware and how to map object file sections into that layout. Every embedded project must have one; without it the linker cannot produce a correctly addressed binary.
Linker script concept
Purpose
MEMORY block
Declares available memory regions and their addresses
SECTIONS block
Maps .text, .data, .bss, etc. to memory regions
Symbols (e.g. _edata)
Provide addresses to startup code for copy/clear loops
4 / 37
A code reviewer comments: "This large uninitialized array will go in .bss — make sure the startup code clears it before main() runs."
What is the .bss section?
Correct: B. The .bss section (Block Started by Symbol) holds global and static variables declared without an explicit initializer (C guarantees they are zero). Because they are all zero, there is no need to store initialization data in flash — the startup code simply does memset(bss_start, 0, bss_size) before calling main(), saving flash space.
Section
Initial value
Stored in flash?
In SRAM?
.bss
Zero
No (size only)
Yes
.data
Non-zero
Yes (init values)
Yes (copy)
.rodata
Constant
Yes (in place)
No
5 / 37
Your startup code review notes say: "After zeroing .bss, copy the .data initializers from flash to SRAM before calling main()."
What is the .data section?
Correct: B. The .data section contains global and static variables with non-zero initial values (e.g., int baud_rate = 115200;). The initial values are stored in flash (in a load region sometimes called .data_init), and the startup code copies them into SRAM before main() runs. This copy loop is typically generated by the linker script symbols _sdata / _edata / _sidata.
Startup step
Action
1. Stack pointer
Set SP to top of SRAM
2. Copy .data
Flash → SRAM for initialized globals
3. Clear .bss
Zero uninitialized globals in SRAM
4. Clock init
Configure PLL and system clocks
5. Call main()
Hand off to application code
6 / 37
PR Description:
"Implementing the new sensor data processing pipeline. Allocating a large buffer in RTEMS memory for incoming readings. Initial tests show no immediate issues, but monitoring is crucial."
During a code review discussion with your team lead, you notice they're using the term 'DMA burst.' What does DMA burst typically refer to within an embedded RTOS context?
DMA (Direct Memory Access) burst transfers are crucial for performance in embedded systems. They allow peripherals to access memory directly without CPU intervention, significantly reducing processing overhead and latency. The key is that the peripheral *initiates* the transfer – the CPU doesn't manage it step-by-step; this contrasts with options A and B which misinterpret DMA's role. Option D is unrelated to DMA bursts.
7 / 37
Your team is optimizing the performance of a sensor data acquisition routine. The lead engineer says: 'Let's use DMA burst to transfer the raw sensor data directly from the peripheral into SRAM.' What does 'DMA burst' typically refer to within an embedded RTOS context?
The correct answer is A. 'DMA burst' refers specifically to Direct Memory Access (DMA), a hardware capability that allows peripherals to transfer data directly to and from system memory without constant CPU intervention. This significantly improves performance by offloading the data transfer task from the processor core, reducing latency and freeing up processing cycles. Options B and C misrepresent DMA's function; it's not a FreeRTOS configuration or a specific command sequence, respectively, but rather a fundamental hardware mechanism.
8 / 37
During a code review with your team lead, you hear them mention 'DMA burst.' You want to understand what this means in the context of your embedded RTOS system. The lead explains: 'Using DMA burst will allow us to transfer data directly from the sensor peripheral into SRAM without involving the CPU for each individual byte.' Which of the following best describes what DMA burst typically refers to in this scenario?
DMA burst is a crucial concept for embedded systems performance. It leverages Direct Memory Access (DMA) to transfer data directly between peripheral devices and SRAM without constantly involving the CPU. This significantly reduces CPU load and latency, making it ideal for high-speed data acquisition like sensor readings. Option B incorrectly describes CPU overhead; DMA *avoids* CPU intervention, while options A and D relate to different aspects of memory management.
9 / 37
PR Description:
"Implementing the new sensor data processing pipeline. Allocating a large buffer in RTEMS memory for incoming readings. Initial tests show no immediate issues, but monitoring is crucial."
During a code review discussion with your team lead, you notice they're using the term 'DMA burst.' What does DMA burst typically refer to within an embedded RTOS context?
DMA (Direct Memory Access) burst transfers are crucial for performance in embedded systems. They allow peripherals to access memory directly without CPU intervention, significantly reducing processing overhead and latency. The key is that the peripheral *initiates* the transfer – the CPU doesn't manage it step-by-step; this contrasts with options A and B which misinterpret DMA's role. Option D is unrelated to DMA bursts.
10 / 37
Your team is optimizing the performance of a sensor data acquisition routine. The lead engineer says: 'Let's use DMA burst to transfer the raw sensor data directly from the peripheral into SRAM.' What does 'DMA burst' typically refer to within an embedded RTOS context?
The correct answer is A. 'DMA burst' refers specifically to Direct Memory Access (DMA), a hardware capability that allows peripherals to transfer data directly to and from system memory without constant CPU intervention. This significantly improves performance by offloading the data transfer task from the processor core, reducing latency and freeing up processing cycles. Options B and C misrepresent DMA's function; it's not a FreeRTOS configuration or a specific command sequence, respectively, but rather a fundamental hardware mechanism.
11 / 37
During a code review with your team lead, you hear them mention 'DMA burst.' You want to understand what this means in the context of your embedded RTOS system. The lead explains: 'Using DMA burst will allow us to transfer data directly from the sensor peripheral into SRAM without involving the CPU for each individual byte.' Which of the following best describes what DMA burst typically refers to in this scenario?
DMA burst is a crucial concept for embedded systems performance. It leverages Direct Memory Access (DMA) to transfer data directly between peripheral devices and SRAM without constantly involving the CPU. This significantly reduces CPU load and latency, making it ideal for high-speed data acquisition like sensor readings. Option B incorrectly describes CPU overhead; DMA *avoids* CPU intervention, while options A and D relate to different aspects of memory management.
12 / 37
PR Description:
"Implementing the new sensor data processing pipeline. Allocating a large buffer in RTEMS memory for incoming readings. Initial tests show no immediate issues, but monitoring is crucial."
During a code review discussion with your team lead, you notice they're using the term 'DMA burst.' What does DMA burst typically refer to within an embedded RTOS context?
DMA (Direct Memory Access) burst transfers are crucial for performance in embedded systems. They allow peripherals to access memory directly without CPU intervention, significantly reducing processing overhead and latency. The key is that the peripheral *initiates* the transfer – the CPU doesn't manage it step-by-step; this contrasts with options A and B which misinterpret DMA's role. Option D is unrelated to DMA bursts.
13 / 37
Your team is optimizing the performance of a sensor data acquisition routine. The lead engineer says: 'Let's use DMA burst to transfer the raw sensor data directly from the peripheral into SRAM.' What does 'DMA burst' typically refer to within an embedded RTOS context?
The correct answer is A. 'DMA burst' refers specifically to Direct Memory Access (DMA), a hardware capability that allows peripherals to transfer data directly to and from system memory without constant CPU intervention. This significantly improves performance by offloading the data transfer task from the processor core, reducing latency and freeing up processing cycles. Options B and C misrepresent DMA's function; it's not a FreeRTOS configuration or a specific command sequence, respectively, but rather a fundamental hardware mechanism.
14 / 37
During a code review with your team lead, you hear them mention 'DMA burst.' You want to understand what this means in the context of your embedded RTOS system. The lead explains: 'Using DMA burst will allow us to transfer data directly from the sensor peripheral into SRAM without involving the CPU for each individual byte.' Which of the following best describes what DMA burst typically refers to in this scenario?
DMA burst is a crucial concept for embedded systems performance. It leverages Direct Memory Access (DMA) to transfer data directly between peripheral devices and SRAM without constantly involving the CPU. This significantly reduces CPU load and latency, making it ideal for high-speed data acquisition like sensor readings. Option B incorrectly describes CPU overhead; DMA *avoids* CPU intervention, while options A and D relate to different aspects of memory management.
15 / 37
PR Description:
"Implementing the new sensor data processing pipeline. Allocating a large buffer in RTEMS memory for incoming readings. Initial tests show no immediate issues, but monitoring is crucial."
During a code review discussion with your team lead, you notice they're using the term 'DMA burst.' What does DMA burst typically refer to within an embedded RTOS context?
DMA (Direct Memory Access) burst transfers are crucial for performance in embedded systems. They allow peripherals to access memory directly without CPU intervention, significantly reducing processing overhead and latency. The key is that the peripheral *initiates* the transfer – the CPU doesn't manage it step-by-step; this contrasts with options A and B which misinterpret DMA's role. Option D is unrelated to DMA bursts.
16 / 37
Your team is optimizing the performance of a sensor data acquisition routine. The lead engineer says: 'Let's use DMA burst to transfer the raw sensor data directly from the peripheral into SRAM.' What does 'DMA burst' typically refer to within an embedded RTOS context?
The correct answer is A. 'DMA burst' refers specifically to Direct Memory Access (DMA), a hardware capability that allows peripherals to transfer data directly to and from system memory without constant CPU intervention. This significantly improves performance by offloading the data transfer task from the processor core, reducing latency and freeing up processing cycles. Options B and C misrepresent DMA's function; it's not a FreeRTOS configuration or a specific command sequence, respectively, but rather a fundamental hardware mechanism.
17 / 37
During a code review with your team lead, you hear them mention 'DMA burst.' You want to understand what this means in the context of your embedded RTOS system. The lead explains: 'Using DMA burst will allow us to transfer data directly from the sensor peripheral into SRAM without involving the CPU for each individual byte.' Which of the following best describes what DMA burst typically refers to in this scenario?
DMA burst is a crucial concept for embedded systems performance. It leverages Direct Memory Access (DMA) to transfer data directly between peripheral devices and SRAM without constantly involving the CPU. This significantly reduces CPU load and latency, making it ideal for high-speed data acquisition like sensor readings. Option B incorrectly describes CPU overhead; DMA *avoids* CPU intervention, while options A and D relate to different aspects of memory management.
18 / 37
During a daily standup meeting, the project manager asks: "Can you elaborate on why we're using 'embedded memory' versus standard RAM for this sensor data?" What is the primary benefit of utilizing embedded memory in this context?
Embedded memory refers to memory regions within an embedded system that are specifically managed and optimized for real-time performance. Unlike standard RAM which relies on a general-purpose operating system's memory management, embedded memory offers deterministic access times – vital when dealing with time-critical sensor data acquisition where predictable latency is paramount. The key benefit lies in its speed and predictability, not cost or garbage collection.
19 / 37
```
// Example RTEMS API call (simplified)
rtems_malloc(sizeof(sensor_reading));
```
What does the `rtems_malloc()` function typically do in an RTOS environment related to embedded memory?
The `rtems_malloc()` function is a core part of an RTOS's memory management. It requests a dynamic block of RAM from the RTEMS heap (a region of available memory). This heap is carefully managed to track which blocks are allocated and free, ensuring that memory is efficiently utilized and prevents fragmentation. Flash memory is typically used for persistent data like configuration or calibration values.
20 / 37
A colleague sends a Slack message: 'I'm seeing some high latency when processing the incoming sensor readings. Should we consider moving the data buffers to an area in flash?' What's the *most* relevant consideration regarding this suggestion?
The suggestion highlights the difference between SRAM (Static RAM) and Flash memory. SRAM offers significantly faster access times – crucial for real-time data processing. However, SRAM is volatile; it loses its contents when power is lost. Flash provides persistent storage, allowing data to be retained even after power loss, but transferring data *to* flash introduces a write cycle delay that can cause latency issues if not handled carefully with DMA and proper buffering strategies.
21 / 37
```
// Example Code Review Comment
"This buffer is statically allocated. Consider a dynamically sized buffer to handle varying sensor data rates."
What is the primary reason behind this comment regarding embedded memory?
The comment addresses the limitations of statically allocated memory. Static allocation requires defining a fixed-size buffer at compile time. This can lead to inefficiencies if the sensor data rate fluctuates significantly – wasting RAM if the buffer is oversized or causing overflow errors if it's undersized. Dynamic allocation allows for allocating only the necessary amount of memory, improving resource utilization.
22 / 37
You are reviewing a PR that implements a new feature using DMA. The developer has used 'DMA burst.' What does this term primarily describe in the context of embedded memory access?
'DMA burst' is a technique where the Direct Memory Access (DMA) controller transfers multiple blocks of data in a single operation without needing to be re-addressed with each transfer. This significantly increases throughput – the amount of data transferred per unit time – making it ideal for high-speed data acquisition from sensors like temperature or pressure, directly into SRAM, bypassing the CPU for many of the operations.
23 / 37
During a daily standup meeting, the project manager asks: "Can you elaborate on why we're using 'embedded memory' versus standard RAM for this sensor data?" What is the primary benefit of utilizing embedded memory in this context?
Embedded memory refers to memory regions within an embedded system that are specifically managed and optimized for real-time performance. Unlike standard RAM which relies on a general-purpose operating system's memory management, embedded memory offers deterministic access times – vital when dealing with time-critical sensor data acquisition where predictable latency is paramount. The key benefit lies in its speed and predictability, not cost or garbage collection.
24 / 37
```
// Example RTEMS API call (simplified)
rtems_malloc(sizeof(sensor_reading));
```
What does the `rtems_malloc()` function typically do in an RTOS environment related to embedded memory?
The `rtems_malloc()` function is a core part of an RTOS's memory management. It requests a dynamic block of RAM from the RTEMS heap (a region of available memory). This heap is carefully managed to track which blocks are allocated and free, ensuring that memory is efficiently utilized and prevents fragmentation. Flash memory is typically used for persistent data like configuration or calibration values.
25 / 37
A colleague sends a Slack message: 'I'm seeing some high latency when processing the incoming sensor readings. Should we consider moving the data buffers to an area in flash?' What's the *most* relevant consideration regarding this suggestion?
The suggestion highlights the difference between SRAM (Static RAM) and Flash memory. SRAM offers significantly faster access times – crucial for real-time data processing. However, SRAM is volatile; it loses its contents when power is lost. Flash provides persistent storage, allowing data to be retained even after power loss, but transferring data *to* flash introduces a write cycle delay that can cause latency issues if not handled carefully with DMA and proper buffering strategies.
26 / 37
```
// Example Code Review Comment
"This buffer is statically allocated. Consider a dynamically sized buffer to handle varying sensor data rates."
What is the primary reason behind this comment regarding embedded memory?
The comment addresses the limitations of statically allocated memory. Static allocation requires defining a fixed-size buffer at compile time. This can lead to inefficiencies if the sensor data rate fluctuates significantly – wasting RAM if the buffer is oversized or causing overflow errors if it's undersized. Dynamic allocation allows for allocating only the necessary amount of memory, improving resource utilization.
27 / 37
You are reviewing a PR that implements a new feature using DMA. The developer has used 'DMA burst.' What does this term primarily describe in the context of embedded memory access?
'DMA burst' is a technique where the Direct Memory Access (DMA) controller transfers multiple blocks of data in a single operation without needing to be re-addressed with each transfer. This significantly increases throughput – the amount of data transferred per unit time – making it ideal for high-speed data acquisition from sensors like temperature or pressure, directly into SRAM, bypassing the CPU for many of the operations.
28 / 37
During a daily standup meeting, the project manager asks: "Can you elaborate on why we're using 'embedded memory' versus standard RAM for this sensor data?" What is the primary benefit of utilizing embedded memory in this context?
Embedded memory refers to memory regions within an embedded system that are specifically managed and optimized for real-time performance. Unlike standard RAM which relies on a general-purpose operating system's memory management, embedded memory offers deterministic access times – vital when dealing with time-critical sensor data acquisition where predictable latency is paramount. The key benefit lies in its speed and predictability, not cost or garbage collection.
29 / 37
```
// Example RTEMS API call (simplified)
rtems_malloc(sizeof(sensor_reading));
```
What does the `rtems_malloc()` function typically do in an RTOS environment related to embedded memory?
The `rtems_malloc()` function is a core part of an RTOS's memory management. It requests a dynamic block of RAM from the RTEMS heap (a region of available memory). This heap is carefully managed to track which blocks are allocated and free, ensuring that memory is efficiently utilized and prevents fragmentation. Flash memory is typically used for persistent data like configuration or calibration values.
30 / 37
A colleague sends a Slack message: 'I'm seeing some high latency when processing the incoming sensor readings. Should we consider moving the data buffers to an area in flash?' What's the *most* relevant consideration regarding this suggestion?
The suggestion highlights the difference between SRAM (Static RAM) and Flash memory. SRAM offers significantly faster access times – crucial for real-time data processing. However, SRAM is volatile; it loses its contents when power is lost. Flash provides persistent storage, allowing data to be retained even after power loss, but transferring data *to* flash introduces a write cycle delay that can cause latency issues if not handled carefully with DMA and proper buffering strategies.
31 / 37
```
// Example Code Review Comment
"This buffer is statically allocated. Consider a dynamically sized buffer to handle varying sensor data rates."
What is the primary reason behind this comment regarding embedded memory?
The comment addresses the limitations of statically allocated memory. Static allocation requires defining a fixed-size buffer at compile time. This can lead to inefficiencies if the sensor data rate fluctuates significantly – wasting RAM if the buffer is oversized or causing overflow errors if it's undersized. Dynamic allocation allows for allocating only the necessary amount of memory, improving resource utilization.
32 / 37
You are reviewing a PR that implements a new feature using DMA. The developer has used 'DMA burst.' What does this term primarily describe in the context of embedded memory access?
'DMA burst' is a technique where the Direct Memory Access (DMA) controller transfers multiple blocks of data in a single operation without needing to be re-addressed with each transfer. This significantly increases throughput – the amount of data transferred per unit time – making it ideal for high-speed data acquisition from sensors like temperature or pressure, directly into SRAM, bypassing the CPU for many of the operations.
33 / 37
During a daily standup meeting, the project manager asks: "Can you elaborate on why we're using 'embedded memory' versus standard RAM for this sensor data?" What is the primary benefit of utilizing embedded memory in this context?
Embedded memory refers to memory regions within an embedded system that are specifically managed and optimized for real-time performance. Unlike standard RAM which relies on a general-purpose operating system's memory management, embedded memory offers deterministic access times – vital when dealing with time-critical sensor data acquisition where predictable latency is paramount. The key benefit lies in its speed and predictability, not cost or garbage collection.
34 / 37
```
// Example RTEMS API call (simplified)
rtems_malloc(sizeof(sensor_reading));
```
What does the `rtems_malloc()` function typically do in an RTOS environment related to embedded memory?
The `rtems_malloc()` function is a core part of an RTOS's memory management. It requests a dynamic block of RAM from the RTEMS heap (a region of available memory). This heap is carefully managed to track which blocks are allocated and free, ensuring that memory is efficiently utilized and prevents fragmentation. Flash memory is typically used for persistent data like configuration or calibration values.
35 / 37
A colleague sends a Slack message: 'I'm seeing some high latency when processing the incoming sensor readings. Should we consider moving the data buffers to an area in flash?' What's the *most* relevant consideration regarding this suggestion?
The suggestion highlights the difference between SRAM (Static RAM) and Flash memory. SRAM offers significantly faster access times – crucial for real-time data processing. However, SRAM is volatile; it loses its contents when power is lost. Flash provides persistent storage, allowing data to be retained even after power loss, but transferring data *to* flash introduces a write cycle delay that can cause latency issues if not handled carefully with DMA and proper buffering strategies.
36 / 37
```
// Example Code Review Comment
"This buffer is statically allocated. Consider a dynamically sized buffer to handle varying sensor data rates."
What is the primary reason behind this comment regarding embedded memory?
The comment addresses the limitations of statically allocated memory. Static allocation requires defining a fixed-size buffer at compile time. This can lead to inefficiencies if the sensor data rate fluctuates significantly – wasting RAM if the buffer is oversized or causing overflow errors if it's undersized. Dynamic allocation allows for allocating only the necessary amount of memory, improving resource utilization.
37 / 37
You are reviewing a PR that implements a new feature using DMA. The developer has used 'DMA burst.' What does this term primarily describe in the context of embedded memory access?
'DMA burst' is a technique where the Direct Memory Access (DMA) controller transfers multiple blocks of data in a single operation without needing to be re-addressed with each transfer. This significantly increases throughput – the amount of data transferred per unit time – making it ideal for high-speed data acquisition from sensors like temperature or pressure, directly into SRAM, bypassing the CPU for many of the operations.
What does the "Embedded Memory Vocabulary — Embedded & RTOS Language Exercises" exercise cover?
Practice English vocabulary for embedded memory concepts: flash, SRAM, linker script, .bss section, and .data section used in firmware development.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
How many questions are in "Embedded Memory Vocabulary — Embedded & RTOS Language Exercises"?
This exercise has 37 questions. Each one gives instant feedback with an explanation, so you can see exactly why an answer is right or wrong.
Do I need to create an account to save my progress?
No account is required. The progress bar and score are tracked in your browser for the current session -- the exercise is designed to be a quick, repeatable drill rather than something you resume later.
What happens if I get an answer wrong?
You'll see the correct answer highlighted immediately, along with a short explanation of why it's correct. Wrong answers aren't penalized beyond your score, and you can keep going through every question.
How is this exercise different from reading an article?
Articles explain vocabulary and concepts through prose, while exercises like this one are interactive drills -- multiple-choice questions -- that test and reinforce your recall of specific terms and phrasing.
Can I retry this exercise?
Yes -- use the "Try again" button on the results screen to reset your score and go through all the questions again from the start.
Where can I find more Embedded & RTOS exercises?
Browse the full Embedded & RTOS hub for related drills, or check the site-wide exercises index for other IT English topics.
Is this exercise suitable for beginners?
This exercise assumes basic familiarity with IT terminology. If a term feels unfamiliar, check the site Glossary for a plain-English definition before attempting the questions.
How often is new content like this published?
New exercises are added regularly across all categories, alongside new vocabulary sets and articles. Check back on the exercises hub to see what's new.