0% found this document useful (0 votes)
32 views8 pages

Unit 4th

The document provides steps to estimate the memory requirements for an embedded system, including identifying software components, estimating code and data sizes, accounting for overhead, and validating estimates. An example calculation estimates the RAM requirement as 12KB and ROM requirement as 128KB for a sample embedded system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views8 pages

Unit 4th

The document provides steps to estimate the memory requirements for an embedded system, including identifying software components, estimating code and data sizes, accounting for overhead, and validating estimates. An example calculation estimates the RAM requirement as 12KB and ROM requirement as 128KB for a sample embedded system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Microcontroller selection for es->https://nerdyelectronics.

com/selecting-a-microcontroller-a-
comprehensive-guide/
Memory selection(computing the size of ram and rom)->

https://www.qt.io/embedded-development-talk/memory-options-for-embedded-systems-how-to-
select-the-right-memory-configuration

Computing the size of memory required (RAM and ROM) in an embedded system
involves assessing the memory needs of the software components and the data they
manipulate. Here's a step-by-step approach to determine the memory requirements:

1. Identify Software Components:

 List all software components that will run on the embedded system, including:
 Firmware or bootloader
 Operating system (if applicable)
 Application code
 Libraries or middleware
 Data structures and buffers

2. Estimate Code Size:

 Estimate the size of each software component in terms of code size (in bytes).
 For firmware or bootloader, this may involve compiling the code and checking
the size of the resulting binary.
 Use tools like compilers or static analysis tools to estimate code size for
application code and libraries.

3. Evaluate Data Memory (RAM) Requirements:


 Identify the data structures, variables, and buffers used by the software
components.
 Estimate the size of each data structure and variable.
 Consider runtime data storage requirements, including stack space for
function calls and dynamic memory allocation.
 Account for any runtime buffers required for communication, file I/O, or other
purposes.

4. Consider Static Data (ROM) Requirements:

 Determine the size of read-only data structures or constant data used by the
software.
 This includes constant arrays, lookup tables, configuration data, and other
static data stored in ROM.
 Estimate the size of each static data structure and sum them up to determine
the total ROM size required.

5. Account for Overhead and Padding:

 Add a margin for overhead, padding, alignment requirements, and any


reserved memory regions.
 Ensure that the estimated memory sizes accommodate future updates, feature
additions, and system scalability.

6. Validate and Refine Estimates:

 Validate the memory estimates by testing the software on similar hardware


platforms or using simulation tools.
 Refine the estimates based on actual memory usage observed during testing
or profiling.

Example Calculation:

Let's say we have the following estimates for an embedded system:

 Firmware: 32 KB
 Application code: 64 KB
 Libraries: 16 KB
 Stack space: 8 KB
 Dynamic memory allocation: 4 KB
 Static data: 16 KB

RAM Required:
RAM = Stack space + Dynamic memory allocation = 8 KB + 4 KB = 12 KB

ROM Required:

ROM = Firmware + Application code + Libraries + Static data = 32 KB + 64 KB + 16


KB + 16 KB = 128 KB

You might also like