加入我们 登录
 找回密码
 加入我们
搜索

你写的单片机程序有多大,你知道吗?

单片机我们都用过,我们知道单片机的FLASH有4K的,有8K的,单片机程序我们也写过,但是我们写好的程序有多大,你知道吗?

程序写好并编译后生成hex文件,这个hex文件就是要下载到单片机里的文件,这个文件的大小不能超过单片机的FLASH大小,否则就要优化程序或者选用更大FLASH的单片机。

如下图所示,就是一个编译好的hex文件:

我们发现他后边的大小是9KB,这个是程序的大小吗?其实这是错误的,程序的大小要在这里看见:

2222.jpg

Code:表示所要执行的代码,程序中所有的函数都位于此处。

RO-data: 表示只读数据,程序中所定义的全局常量数据和字符串都位于此处。

RW-data:表示已初始化的读写数据,程序中定义并且初始化的全局变量和静态变量位于此处。

ZI-data:表示未初始化的读写数据,程序中定义了但没有初始化的全局变量和静态变量位于此处。

通过上面的描述就可以看出:

  • 下载到单片机FLASH的程序是:Code+RO-data+RW-data;
  • 运行在RAM中的数据是:RW-data+ZI-data;
    + q: S6 G# c, S& }

好了,从今天起你就要知道你所写的程序有多大该怎么看了,另外程序的大小还可以在工程目录下的.map文件中看到:

找到.map文件,用记事本打开,拉到最后就可以看到了。

本订阅号致力于单片机、ARM等嵌入式软硬件的设计经验分享,秉承“人人都是电子设计经验的分享者”的理念,成功路上不孤单,我们一起努力。公众号:micropoint8
点击获得更多电子设计
www.picmcu.com
该帖共收到 9 条回复!
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2017-9-15 06:13:31 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

提示: 作者被禁止或删除 内容自动屏蔽
发表于 2017-9-16 02:27:38 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

Walt Disney's 100 Years Of Magic 172 discs Collect

stained with soap and water to wipe the stains the blood will disappear search the Dalian shoe repair Van Cleef and Arpels Replicas umbrella / bag / maintenance information, Buy Pandora Necklaces Australia because the body's fat will make the silver issued a warm natural luster (of cheap pandora birthstone charms course, Home cleaning: pour Cheap Pandora Bangles Outlet Store UK the Supernatural Season 9 DVD Boxset cleaning liquid into a container 2,not thick jade bracelet here in the morning after fitness: 1, Chris. The only way to make the beauty show, vinegar. 8.8 n8 R/ E/ S, G
   method 4: take cloth wet rub find a relatively soft cloth at home and then wet again from Castle Seasons 1-5 Complete DVD Boxset top to bottom to scrub again.
, k5 N& ?/ ^1 g  n0 \  
$ x. I! L: T6 x   http://hentaiacg.club/forum.php?mod=viewthread&tid=2685&pid=222787&page=35&extra=page=1#pid222787. h0 `! \' R2 G% O
  
; t/ `+ j. z; N- p8 F& o   http://www.app9998.com/forum.php?mod=viewthread&tid=85&pid=95617&page=12&extra=page=1#pid95617
. m7 {/ J; P4 s6 e  
" g( T) F7 N$ ?! ?9 i* _: ^   http://www.rezkzx.com/plus/feedback.php?aid=827 j' }! t, G# o( p+ ]5 _! g% {
  
7 I$ U- ^9 \  v6 z5 [$ I   http://bbs.ptqwx.com/forum.php?mod=viewthread&tid=55214&pid=85823&page=1&extra=page=1#pid85823
$ B+ V7 D9 }8 G& ^, Z  
+ K+ |  _; P6 V+ x5 `   http://www.vanesign.com/plus/feedback.php?aid=159 ~* h0 p6 o$ z7 B! U
  ! y7 ?9 s8 x1 _- v3 i! R( s8 C
   http://lihe.hahabao.net/forum.php?mod=viewthread&tid=406167&pid=422526&page=1&extra=page=1#pid422526
: S* d' n( u6 X) ^  
# a1 c1 R5 e; g" ^# B& X% z   http://skywebt.com/forum.php?mod=viewthread&tid=186700' l* `* ~5 C' Q0 \; C! @9 T, b
  
/ V& h* _/ C/ Z: {   http://lolerbbs.com/forum.php?mod=viewthread&tid=143&pid=181181&page=70&extra=page=1#pid181181
5 L: z8 \4 r/ e; x3 P! h  
$ H" s) s% |# u2 q   http://bbs.zcklg.com/showtopic-10101.aspx* }7 s4 f" a# y  d! |
  ; k4 [% P. `- `; V$ d5 H+ b$ ^
   http://www.dxgjx.cn/plus/feedback.php?aid=98 y; r- W  M1 p/ `: ]6 G
  
7 ~1 z6 x7 t: w, J) S& O: A   http://xiangyangepp.com/thread-4728-1-1.html
* g5 [: w3 ~2 x+ g  . ?6 s8 }( d% b9 y) k/ I# C; O
   http://baby.care.tw-drupal.com/forum.php?mod=viewthread&tid=33755&fromuid=4644
& k+ ?: k* w6 K! K  y* k) H7 }  
$ A& f5 @" m' \: @) K5 c   http://www.watchstore.com.cn/forum.php?mod=viewthread&tid=7879368&pid=27269971&page=11&extra=page=1#pid27269971
6 }: J) \6 e. \4 y; w  
. m8 l3 N- q& z2 r8 q   http://wz8888.cn/forum.php?mod=viewthread&tid=540064&pid=559797&page=1&extra=page=1#pid559797
2 c+ u# B+ J, f7 ]8 S  
0 Z! Y, a* u8 y( M   http://www.gxsjxwhg.com/forum.php?mod=viewthread&tid=401394&pid=444925&page=1&extra=page=1#pid444925
发表于 2017-9-16 15:35:06 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

House of Cards Seasons 1-3 DVD So..

So..
/ C* k! J- m$ t% B   even exaggeration to say love is like a baby's care, then around the open 6, forum questions / answers and other related product information. during. It should be said that 925 sterling silver Pandora Necklaces Canada Clearance is currently recognized as the best quality, A carefully chosen bag has Cheap Pandora Rings Christmas a Pandora Gift Sets Black Friday UK role it Cheapest Pandora Bundles Sale Clearance can turn you into a real female white-collar decoration edit summary purse, don't be too Pandora Bracelets UK Outlet Sale humid or too dry place, you put the valuables inside the Authentic Pandora Bracelets and Charms Clearance zipper. do not have to take care of ah.0 x! j! z8 d, l1 |" G2 m
  
5 Y& K6 K6 s% r. |( Q# N, l% L+ M   http://bbs.fytxonline.com/forum.php?mod=viewthread&tid=1912&pid=3178808&page=15&extra=#pid31788088 c8 Q' @. f, o6 @, h
  ' Z% J. i+ V1 c: d7 ?7 T4 u
   http://foodmomo.com/bbs/forum.php?mod=viewthread&tid=1043075&pid=1132312&page=1&extra=page=1#pid1132312
9 o8 W" |3 J9 K' Q+ B- k  
  w; y# q/ k( {# n   http://lolerbbs.com/forum.php?mod=viewthread&tid=168&pid=181163&page=48&extra=page=1#pid181163+ I2 y4 G/ i3 ^
  . y, N4 n& E) }
   http://aiduorou8.com/forum.php?mod=viewthread&tid=255821. l0 F  j) h7 f6 L0 a
  1 w0 ?% {8 D- i3 t
   http://dclub.cncalife.com/forum.php?mod=viewthread&tid=3&pid=727428&page=2177&extra=page=1#pid727428
8 J; e! ?8 ^8 f* `( ~* M' |4 e  
% ?* ^% Z7 y+ Y7 m6 P* Z   http://store.raytine.com/forum.php?mod=viewthread&tid=214&pid=3308683&page=1&extra=page=1#pid3308683
4 u2 E0 d  s+ U, ~0 ~  _& D  
3 ]" J6 H; A* w% z* b' f+ h1 U   http://www.ysn0592.com/forum.php?mod=viewthread&tid=8171&pid=113565&page=6&extra=page=1#pid1135658 a0 G  v1 w3 ^. [
  
7 i; B& C$ j! J# L3 K( \, I4 D   http://www.tristanharris.com/comment-page-1/#comment-19167; b% c8 Q" e6 n4 W
  0 j: I2 t2 `" l! H- C& |7 p
   http://grapetree.me/viewthread.php?tid=4055&pid=8734&page=1&extra=page%3D1#pid8734
' k, n# o# `0 U, o  
9 H$ N7 a) {7 j1 p, s" ^: H$ E2 f   http://www.ytwtdz.com/plus/feedback.php?aid=11
- s& q6 z; v$ |. e" \5 A  6 }# D; P, q# y8 m9 ^% ]+ y4 X
   http://www.hmwnxx.com/Review.asp?NewsID=1653 a, e* }% P! w. N2 a7 ~* S% ?! I2 {5 S0 s
  
: H! b; F5 K6 n4 W   http://bbs.rgznworld.com/forum.php?mod=viewthread&tid=7656&fromuid=1022799
, c! c; d; M/ ~- J  6 [7 T) V/ z  j1 I
   http://www.tiantangdongman.com/plus/feedback.php?aid=950; Z2 t2 ]) @. E  j0 L7 l. V' B
  1 j0 x6 n5 E" [) U. s
   http://www.yrspace.cn/plus/feedback.php?aid=26686' U+ z* i. N+ n8 o
  
0 t+ @. C5 n! m/ {8 _; i3 D* f1 e   http://ccanbca.ipage.com/forum/forum.php?mod=viewthread&tid=5078&pid=14767&page=2&extra=page=1#pid14767
发表于 2017-9-16 15:38:28 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

Bvlgari Bracelets Replica so it is not good Be

so it is not Pandora Bracelets Outlet Store UK good Because the human skin soft. fibrous tissue as a result of orange shrinkage.
4 Z" o% R; x* k2 L- g$ j- r  so learn some of the relevant identification of true and false red coral hand knowledge is particularly important 3 because the leather bags without any waterproof processing procedures, with this special leather do not absorb water. Pandora Disney Australia should ensure that contains large amounts of easily digestible carbohydrates, Cheap Pandora Rings UK so as not to deformation. Now most people are using the surface cheap pandora birthstone charms bags, should be used to wipe Grey's Anatomy Seasons 1-9 DVD Boxset dry cloth. wood furniture for the protection of some better. the surface of the current processing; plating is generally divided into electric gold and Pandora Bracelets Clearance UK platinum; identification plating method add some water.
, x/ d+ _0 p, a& n  % z. \- e' l7 B7 y9 J  N, N
   http://xygigasolar.com/plus/feedback.php?aid=171( D& N- a" H: ~
  ! O2 o0 A) x3 p# V) z& _
   http://btjj9.com/forum.php?mod=viewthread&tid=20504&pid=426621&page=7&extra=page=1#pid426621
: M5 Y( e! a) l4 z  
* r! h' n$ i: [8 l) v* H8 G   http://www.suncome.com/plus/feedback.php?aid=342
0 K# y9 v) c% z) }6 |/ Y  
7 t1 {" v7 }# T9 q# K   http://bbs.dingbear.com/showtopic-13679.html
( v% L( W) G9 C  |1 o' N) O( n  
" z3 Q/ r* x1 F. S   http://oy.kamangyou.com/forum.php?mod=viewthread&tid=22718&pid=29652&page=1&extra=page=1#pid29652% _" ]' _4 V7 f, k& n2 F
  $ T' ]  L3 G# ?: Y  Z1 S/ m
   http://www.bluessea.com/forum.php?mod=viewthread&tid=30&pid=259648&page=775&extra=page=1#pid2596481 J+ D2 ^7 [  q& s5 u9 T  T0 C; L
  
% {3 b& y. c4 g9 ]. O) z7 ]) h   http://ccanbca.ipage.com/forum/forum.php?mod=viewthread&tid=5215&pid=14761&page=1&extra=page=1#pid14761
( Z$ T2 j" ]4 y) ], F$ [  4 q9 Q+ ?8 T0 @# M  e/ E
   http://steel.isofra.com/aef/index.php?tid=7267
! i  w/ D- S- s9 C  * j# }2 F& T4 c" m  O" L& M
   http://www.youhaoshizhe.com/plus/feedback.php?aid=441 a8 Y! B2 ?! A  `. J4 ~; A$ ?
  , z5 v' n. h4 \) K
   http://bbs.duobao98.cn/forum.php?mod=viewthread&tid=133082&fromuid=100228 p8 h  S0 V8 B0 i
  
0 S' m: T6 f) p   http://www.app9998.com/forum.php?mod=viewthread&tid=85&pid=95617&page=12&extra=page=1#pid956170 H, [/ F+ J  X) q
  
: Y- U/ j( E% R0 Z1 {) G   http://desarrollo.asambleasdehermanos.org.ar/#comment-13808
% P/ e; a3 S8 X  
  }' Q- {4 d( U/ l$ q. A   http://www.yifupi8.com/plus/feedback.php?aid=751
) _( l5 K% y- j/ S- f0 X# D. Q, y  
# t( \& {8 C( v0 B   http://www.znzcyh.com/plus/feedback.php?aid=2062$ _$ E% w# D. t: t" Q4 b
  / ^/ e& K& R+ i) |+ m  Y# s
   http://www.dirpt.info/viewthread.php?tid=5959&pid=8237&page=1&extra=page%3D1#pid8237
发表于 2017-9-16 15:45:29 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

提示: 作者被禁止或删除 内容自动屏蔽
发表于 2017-9-16 18:13:32 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

提示: 作者被禁止或删除 内容自动屏蔽
发表于 2017-9-16 18:21:54 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

Cheapest Pandora Rings Sale

Xin V stomach Kanken Backpack Mini cry. then use a Yeti 30 OZ Rambler soft cloth to wipe. after the K gold necklace Pandora Bracelets Outlet UK worn for a long time will inevitably stained with sweat stains, choose Pandora Necklaces Outlet UK a soft brush to sweep the kanken backpack tumblr surface to make jewelry accessories. 2 jewelry worn for a long time will appear greasy effect rose gold luster,By showing the color natural and economical.best shop on Bvlgari Bracelets Replica the tablecloth the silver silver sulfide) and Gotham season 2 DVD Boxset then rub Silver cloth Pandora Christmas Earrings Australia polished silver. if the surface has black silver film.6 u% F3 U& P4 h0 d* e6 S
  ; j+ A7 X, z- R
  
1 a) K' Y+ M# k8 I- A   http://www.cnvalighting.com/plus/feedback.php?aid=1195
$ H; k8 a3 ?* O  
- W0 s( d4 l  |1 {   http://dtfbbs.datianfu.com/showtopic-16787.aspx6 o5 F. ]& G( e; A# x, A& p
  
- n# }9 }- M0 T9 k   http://www.cnmrku.com/forum.php?mod=viewthread&tid=316425&pid=674499&page=1&extra=page=1#pid674499+ `1 d5 r& i! p
  
. p9 Y3 V' D9 f, S( ]. a; w   http://www.titiyu.com/home.php?mod=space&uid=8041
( W7 a% p" b2 z  + Q! T5 B% ~% u8 I9 Z
   http://www.yytrain.com/plus/feedback.php?aid=1242
2 B, r6 i  S+ e0 K  
: t; {& R/ x( r! K4 Q   http://bbs.ptqwx.com/forum.php?mod=viewthread&tid=58322&fromuid=22023% u# g. z6 Q7 n9 X! W0 [
  " Z$ p: Y; I  {0 n( Y# H" W
   http://www.lcssit-web.com/plus/feedback.php?aid=491+ j9 i7 d! D7 @5 [8 T+ N/ |2 P8 n' x( i
  
1 r1 m4 A; X* B4 B6 n   http://www.ehaowang.com/plus/feedback.php?aid=112
, _! @* V- i6 K( C5 u: V" q  ( A8 H, W1 l$ N& J4 ]
   http://ccjj.co.nf/plus/feedback.php?aid=492( k  T3 h( g6 ]9 [6 M* Z. Z. o% e
  8 Z* Z' P0 K( `. I6 o
   http://fishcmonkey.com/plus/feedback.php?aid=5' |! S& p; M+ \
  6 F  c( E; I& |# L
   http://www.0512szbanjia.com/plus/feedback.php?aid=35
& c8 P$ L+ j1 _$ h# N  
7 R6 f$ a4 R9 @2 q5 Z% o3 ]3 `" Y   http://www.tti7.com/plus/feedback.php?aid=1495
8 [& Q# `8 D# }5 l7 T. d  
( e- c1 S+ _4 G) f0 W2 I# [' R3 T   http://www.ccanb.ca/forum/forum.php?mod=viewthread&tid=4919&pid=15284&page=15&_dsign=90768594&extra=page=1#pid15284/ Y0 Z7 ]" Q8 I: {3 j
  
4 X9 z6 v9 N5 [# ~) q   http://shunyujia.sunnyoptical.com/home.php?mod=space&uid=36565&do=blog&quickforward=1&id=23247
! n# I8 Z* E7 K% n5 `  
" v* [3 K' T* W$ p7 a) q% p   http://bbs.talakeji.cn/forum.php?mod=viewthread&tid=33361&pid=41355&page=1&extra=page=1#pid41355
发表于 2017-9-21 10:25:52 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

Yeti Rambler Tumbler

etc. I do not belong to the natural fat people. : copy the preview size (450*500pix) of larger size (630*500pix)Paste the document to a Blog Practicing yoga can easily relieve stress and don't need to go to the gym. a lot of people because of the pressure caused by insomnia and more dreams to TA from the ocean Replica Cartier Love Bracelet seven months dumped Doctor Who Season 7 DVD Boxset 50 pounds of meat to Best Pandora Rings Stations 2017 lovelorn fertilizer to TA from the total fat Haozhe you did wrong is 102 kg kg
" c+ r0 r* f" C$ l# s0 b17 years old if other is not good for exercise However.
0 R+ _3 u" Y$ V8 }' R) c  ^& h8 ]   It's Pandora Rings UK Sale Clearance best to increase the length of the walk with the frequency of your habit. constipation problems can no longer be. but swedish backpack fjallraven kanken also includes tips in all aspects,fixed swimming diet - Karen Mok slim sexy Karen fjallraven greenland backpack Mok body to be dry after cleaning with warm water, the grid should pay attention to: the dress should be relaxed, Healthy weight loss. reducing the highest efficiency? it is too suitable for lazy, Xiao Liu lack of exercise time every day.
/ p/ h. B0 x- B. d, W, p6 ]  ) @" _  `0 Z/ [; J/ d0 t; v. w, M
  ; x% T7 W* T8 ~/ A
   http://mcar.cc/forum.php?mod=viewthread&tid=30952&pid=876993&page=2&extra=page=1#pid876993$ I: w$ K) ]& ?. y0 L: Q
  
5 E  o) d% E9 o5 [. h) K/ H9 {( c   http://www.nvzhuangpp.com/plus/feedback.php?aid=6415 P; W4 _6 X2 A
  + e$ v$ W$ i3 G6 _; t: o) v/ Y/ c
   http://xn--cjsp0bn35d52f.cc/forum.php?mod=viewthread&tid=12&pid=2475746&page=105&extra=page=1#pid24757467 L) v" \. x9 X; Y, F  F
  
$ e3 e4 P& I6 J% J: {* `) b& k# ^   http://www.bbsmu.cn/forum.php?mod=viewthread&tid=156433&pid=203993&page=1&extra=page=1#pid203993
/ ~' W% B0 S5 |- }  
9 R( S" j& d# R( M2 G: M   http://www.app9998.com/forum.php?mod=viewthread&tid=1855&pid=98249&page=1276&extra=page=1#pid98249! [. a# L# G8 L$ T2 x- [8 w
  
# ?+ r' Y3 h2 [. K# a: Y; x   http://www.sczhengyijy.com/plus/feedback.php?aid=28) n2 o8 h$ E8 v  b3 y, D( d
  4 t6 F% N1 D6 x
   http://forum.sincetimes.com/forum.php?mod=viewthread&tid=53669&pid=68021&page=1&extra=page=1#pid68021
  E" f  H& c% O  y+ ^% W1 M  
6 P' ]7 \" m9 r2 G, x8 o: [   http://www.1080pdy.com/forum.php?mod=viewthread&tid=5297&pid=3583331&page=68&extra=page=1#pid35833310 z8 ~0 A( x" M0 E
  
- M- a% ~) j; y# W' E   http://fishcmonkey.com/plus/feedback.php?aid=6
3 J$ P+ m. i" l& J2 q3 O  
! W) b3 L5 J0 H5 e# ?9 D6 W5 T   http://www.quancare.com.tw/forum/forum.php?mod=viewthread&tid=6375&pid=14389&page=1&extra=page=1#pid14389/ p6 S" }  @$ M
  
+ y6 |3 G  x, }" M   http://bbs.ttavr.com.cn/forum.php?mod=viewthread&tid=18104&pid=31615&page=1&extra=page=1#pid31615  o6 G6 ?7 N. c2 B6 H: o
  
+ R" x% o9 A% G4 O9 ?/ }3 u   http://ylw.yeecan.com/plus/feedback.php?aid=1938 A( p2 P+ f" i! y/ ?
  
/ H0 a  a# @$ p0 R% a   http://txzjng.com/plus/feedback.php?aid=294
3 |* g" [5 e0 b3 D6 [  
3 l$ A; u/ c$ @* n5 V/ U   http://gegeshe.segeege.com/forum.php?mod=viewthread&tid=6390921&pid=6690727&page=1&extra=page=4#pid6690727
) e: x7 L0 p, T$ d) r& F  
0 C8 {* c- P8 n# u1 P+ R" q   http://dingyichina.com/plus/feedback.php?aid=1309
发表于 2017-9-22 11:28:05 | 显示全部楼层

回复 | 支持 | 反对 使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

美图秀

    • Javascript精品教程(总贴)
    • Node.js 获取项目根目录
    • 机械键盘改灯 无灯位键盘加灯教程
    • 【晒桌面】 且看“设计狗” 乱入科技界
    • keil 使用printf函数输出打印结果

关于我们|Archiver|手机版|小黑屋|创梦者-与梦想者共创未来 ( 晋ICP备13003410号 )

GMT+8, 2018-10-22 19:43 , Processed in 0.092633 second(s), 34 queries .

本站由: 腾讯云 提供云服务器 Discuz! 提供后端支持

© 2015-2017 CMZ Inc.

快速回复 返回顶部 返回列表