当前位置:网站首页>How to check the ram and ROM usage of MCU through Keil
How to check the ram and ROM usage of MCU through Keil
2022-07-07 13:57:00 【Ch_ champion】
summary
In many side doors MCU, Or use keil Development , It can be avoided in the development process ram,rom Not enough problem , How to check ? Here's the answer ^_^.
One 、 View by
1)、 After compiling

2)、 adopt map see

It's easy , Aim the mouse at the red circle , Double click .

Sometimes , Double click No , Just configure according to the above figure , this .map The document must be in this project , As shown below :
find .map, Drag and drop to keil Open in , that will do . Through this file, you can analyze , Corresponding to the use and rationality of each part , So as to do the corresponding optimization .
Keil Generated Map The contents of documents are roughly divided into five categories ( according to .map Order of document classification ) As shown below :
1.Section Cross References
It refers to the modules generated by each source file 、 paragraph ( Defined entry ) The relationship of mutual reference , Check... In the configuration :Cross Reference, for example :
startup_stm32f401xe.o(RESET) refers to stm32f4xx_it.o(i.NMI_Handler) for NMI_Handler
It says startup_stm32f401xe.o In the document main The function is called stm32f4xx_it In the document NMI_Handler function

2.Removing Unused input sections from the image
Remove unused modules , Check... In the configuration :Unused Sections Info, Is to delete the project code , There are no called modules . There is also a statistical information at the end , for example

Indicates that there are 294 Segment useless , Total share 17904 byte
3.Image Symbol Table
Mapping symbol table , Check... In the configuration :Symbols, You can see the symbol name , Storage address , Storage size , The target file

4.Memory Map of the image
Memory mapping distribution , Check... In the configuration :Memory Map

Image Entry point : 0x08000195: Refers to the program entry address .
Load Region LR_IROM1 (Base: 0x08000000, Size: 0x000021f8, Max: 0x00080000, ABSOLUTE):
Refers to the loading area LR_IROM1 The starting address is 0x08000000, The size is 0x000021f8, The largest area is 0x00080000.
Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x000021d0, Max: 0x00080000, ABSOLUTE):
Refers to the executable area ROM_VECTOR The starting address is 0x08000000, The size is 0x000021d0, The largest area is 0x00080000.
5.Image component sizes
Storage composition size , Check... In the configuration :Size Info, In fact, it is mainly used to summarize and store size information of modules

Code: Refers to the size of the code ;
RO-data: In addition to inline data (inline data) Constant data other than ;
RW-data: Refers to reading and writing (RW)、 Initialized variable data ;
ZI-data: Means uninitialized (ZI) Variable data ;
Code、RO-data: be located FLASH in ;
RW-data、ZI-data: be located RAM in ;
remind :RW-data The initialized data is stored in the Flash in , Power on will start from FLASH Move to RAM in .
Relations are as follows :
RO Size = Code + RO Data
RW Size = RW Data + ZI Data
ROM Size = Code + RO Data + RW Data
Now I have figured it out Map The content of the document , The following analysis can be done .
(1) Address of functions and variables , This is very useful in deriving the function call stack
(2) according to Code RO data RW data Component part , Targeted optimization ROM Space and RAM Space
Two 、 summary
Learn more about , You can also read the article I wrote before , link , I've forgotten it for a long time , Fortunately, I took notes , Easy to read later .
边栏推荐
- Is it safe to open an account online now? Which securities company should I choose to open an account online?
- Thread pool reject policy best practices
- 云计算安全扩展要求关注的安全目标和实现方式区分原则有哪些?
- Did login metamask
- 室内ROS机器人导航调试记录(膨胀半径的选取经验)
- Final review notes of single chip microcomputer principle
- LIS longest ascending subsequence problem (dynamic programming, greed + dichotomy)
- 社会责任·价值共创,中关村网络安全与信息化产业联盟对话网信企业家海泰方圆董事长姜海舟先生
- PHP - laravel cache
- Xshell connection server changes key login to password login
猜你喜欢

Did login metamask

Take you to master the three-tier architecture (recommended Collection)

xshell连接服务器把密钥登陆改为密码登陆

Realize the IP address home display function and number home query

LeetCode简单题分享(20)

最佳实践 | 用腾讯云AI意愿核身为电话合规保驾护航

Fast development board pinctrl and GPIO subsystem experiment for itop-imx6ull - modify the device tree file

Vmware 与主机之间传输文件
![SSRF漏洞file伪协议之[网鼎杯 2018]Fakebook1](/img/10/6de1ee8467b18ae03894a8d5ba95ff.png)
SSRF漏洞file伪协议之[网鼎杯 2018]Fakebook1

118. Yanghui triangle
随机推荐
PHP中用下划线开头的变量含义
Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf
Milkdown control icon
Environment configuration of lavarel env
Help tenants
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
118. Yanghui triangle
"Song of ice and fire" in the eleventh issue of "open source Roundtable" -- how to balance the natural contradiction between open source and security?
Indoor ROS robot navigation commissioning record (experience in selecting expansion radius)
Take you to master the three-tier architecture (recommended Collection)
3D Detection: 3D Box和点云 快速可视化
Xshell connection server changes key login to password login
Ogre introduction
Build a secure and trusted computing platform based on Kunpeng's native security
LIS longest ascending subsequence problem (dynamic programming, greed + dichotomy)
MySQL error 28 and solution
The reason why data truncated for column 'xxx' at row 1 appears in the MySQL import file
高等数学---第八章多元函数微分学1
室內ROS機器人導航調試記錄(膨脹半徑的選取經驗)
搜索框效果的实现【每日一题】