Skip to main content

Chapter 4 · Watch, then practise

Memory

Distinguish persistent program storage from working memory, then account for the space used by function calls and buffers.

3 questions · 3 with related videos. Matches are based on playlist titles; broader background matches are labeled.

What to study

  • Flash and RAM
  • Stack frames
  • Local-variable lifetime
  • Buffer sizing

Chapter playlists

Choose a playlist

Notes

Memory Part-1 Explained in Hindi l Embedded and Real time Operating System Course

5 Minutes Engineering · 4:21 · Background lecture

Choose a video · 2 lectures

The chapter memory lectures supply background; their general titles do not establish the exact firmware-versus-sample placement example.

1. Persistent versus working data

Where should firmware and temporary sensor samples normally live?

Firmware commonly resides in nonvolatile flash so it survives power loss. Temporary samples and changing variables use RAM. Exact memory regions depend on the target device and linker configuration; a variable’s C declaration alone does not reveal every hardware placement decision.

SoC 101 - Lecture 3e: Procedure Calls

Adi Teman · 20:40

The supplementary procedure-call lesson matches the calling-context and local-storage topic behind stack frames.

2. Stack frames

What consumes stack memory when a function calls another function?

The calling convention may require saved registers, a return address, extra arguments and local variables. Each active call needs its own context. Deep call chains, recursion and interrupts can increase peak stack demand, so budget for the worst active combination rather than one function in isolation.

SoC 101 - Lecture 3c: Variables and Memory Access

Adi Teman · 25:50 · Background lecture

Variables and memory access provide storage background. The sample-count multiplication is the original worked example in the answer.

3. Calculate a buffer

How much RAM stores 250 unsigned 16-bit samples, excluding metadata?

250 × 2 = 500 bytes, assuming 8-bit bytes and each sample occupies exactly two bytes. A queue or acquisition system also needs indices and other state. Buffer capacity is separate from stack capacity, so include both in the complete memory budget.

References