Unit 4th
Unit 4th
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:
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
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.
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.
Example Calculation:
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: