3d新彩网字谜汇总

  |     |     |  
浅谈嵌入式MCU开发中的三个常见误区
HXW718059156 | 2017-07-18 02:04:59    阅读:21017  


目录

嵌入式MCU与MPU的区分
误区一:MCU的程序都是存储在片上Flash上,然后拷贝到RAM中执行的
误区二:工程编译生成的下载文件大小即为最终占用Flash的大小
误区三:用户应用工程的编译结果建议不能超过MCU片上Flash的80%



嵌入式MCU与MPU的区分

qianrushixitongzhongdechuliqianzhaoshifoujichengpianshangflashheramkeyifenweimcu(micro control unit—weikongzhiqi)hempu(micro process unit—weichuliqi)。dianxingdemcurufreescale s08、s12hempc56xxyiji8051danpianjideng,erdianxingdempurujiyuarm cortex axilieneihedei.mxxiliechuliqi:

benwenzhongdeguandianzhenduijinzhenduiqianrushimcu,yejiushiwomenchangshuodedanpianji。qiweidanxinpianjichengjiejuefangan—pianshangjichengleqianrushixitonggongzuosuoxudeluojijisuanneihecpu,cunchushuju/daimaderam,eepromheflash,neibuhulianzongxian—crossbar、amba(apb、ahbyijiaxi bus),dingshiqiziyuan(timer)、zhongduankongzhiqi(intc,tongyongshurushuchujiekou(gpio),monishuzizhuanhuanmokuai—adc、dacheacmp,duanmalcdkongzhiqi、tft lcdkongzhiqi,bujindianjiqudong(smc),tongxinjiekou/kongzhiqi—i2c、spi、uart/sci、can、sdio/emmc、yitaiwangmacdeng;dangran,mpuzhongyehuijichenghenduoqianrushixitonggongzuosuoxudedabufenpianshangwaishe,danyinweiqijisuandanyuancpuneiheyunxingsudufeichangkuai,suoyiqiyibanbuhuizaipianneijichengxitonggongzuosuoxuderamheflashcunchuqi,ershijichengsdr/ddr2/3/4dengwaibusramkuozhanjiekouhenand/nor flashkuozhanjiekou,yonghushejijiyumpudeyingjianxitongshihaixuxuanzeheshidesramhewaibuflashcaikeyibaozhengxitongzhengchanggongzuo。

3d新彩网字谜汇总 dangranhaiyouwomenchangshuodecpu(central process unit—zhongyangchuliqi),changjianpcshangsuoshiyongdeinteldex86chuliqi,birubenteng、zhiqiang、kuruii3/i5/i7xiliedeng,qipianshangzhijichenglezhongyangjisuanneihedanyuancpu,shaoliangdeyiji/erji/sanjihuancunyijigpu,danbubaohanzhongduankongzhiqi、dingshiqideng,taxuyaotongguozhubanjinxingkuozhan,gengbubaohancunchuqi,xuyaoyonghuzaizhubanshangwaijieddrneicuntiaoheflashyingpan。

anzhaoneihedeyunxingsuduhepianshangjichengwaisheziyuandefengfuchengduyijigonghao,mcu、mpuhecpudeduibifenburuxia:


误区一:MCU的程序都是存储在片上Flash上,然后拷贝到RAM中执行的

3d新彩网字谜汇总 henduogangjiechumcuderenshouxuexiaolaoshijiangshoujisuanjiyingjianhecyuyankechengshiyixieguandiandeyingxiang,renweimcuzhongchengxudoushicunchuzaipianshangflashshang,ranhoukaobeidaoramzhongzhixingde,zheiqishishicuowu。yuanyinruxia:

1.  mcudepianshangramziyuanheflashcunchuqixiangbiyibandoubijiaoxiao,qibilidagaiwei1:16dao1:5,qibukenengjiangcunchuzaiflashzhongdechengxudaimaquanbukaobeidaopianshangramzhong;

yixiaweifreescale s12gxilie、s12xexilieyijimpc574xb/c/d/gxiliemcudepianshangramheflashcunchuqiziyuandeduibi:

3d新彩网字谜汇总 2.  zaiqianrushimcuzhongneihecpudegongzuopinlvyibanweizongxianpinlvdeliangbei(s08hes12(x)xiliemcudeneihecpugongzuopinlvgudingweizongxiangongzuopinlvde2bei)huozhexiangdeng(powerpc mpc560xxilie),erguadaoflashdezhiling/shujuzongxiankuanduyibanyucpuweikuande1~2bei,suiranflashdefangwenpinlvbijiaodi(jimhzdaoshushimhz,yibanbuchaoguo100mhz),erqianrushimcuneihecpudeyunxingpinlvyebugao,zai300mhzyinei,suoyizongxianmeicikeyicongflashquchu2~4tiaozhiling(ps:dangpowerpc e200neiheshiyongvlezhilingjishi,daduoshuzhilingdouwei16weizhangdu,ruozhiling/shujuzongxiankuanduwei64weikuan,zeyicikeyiduchu4tiaovlezhiling),congermibuyuneihecpuyunxingsududechaju,baozhengzaiyingjianwulishangshixianzaiflashquzhizhixingqianrushimcuchengxushimeiyouwentide。

3.  zaiqianrushimcudeyingjianshejishangmeiyouzidongjiangflashchengxutiqiankaobeidaoramdejizhi,zairuanjianshejishangyemeiyouxiangyingdedaimazhixingzheigekaobeigongzuo--zheiyangdekaobeiguochengwuyihuizaochengneihecpuziyuandelangfei,daimabanyideguochengzongneihecpuwufachuliqitarenwu;(chufeishizaikaifaqianrushimcudebootloadershi,xuyaoduipianshangflashjinxingcachuhebiancheng,erdaduoshuqianrushimcupianshangdouzhiyouyigeflashkuai(block/partion), buzhichiread-while-readcaozuo,suoyixuyaojiangflashqudongchengxushixiankaobeidaoramranhoudiaoyong—shishishang,zhixuyaojiangflashcachuhebianchengminglingdelaunchyujuhechaxundengdaiminglingwanchengdechengxukaobeidaoramzhixingjike。chengxudezhixingzhishaobaohanquzhiàyimaàzhixingsangehuanjie,qizhongquzhijiushicongcunchuqizhongduchuzhiling,xuyaofangwenflash/ram)

3d新彩网字谜汇总 4.  tongguodiaoshiqianrushimcu,zaicpujicunqichuangkouchakanchengxuyunxingshipcjicunqidezhiyekeyiyanzhengqianrushimcuchengxumorenyunxingshijiushizaiflashbendizhixingde、jicunchudizhiyuyunxingshidizhixiangtong;

youyus12xexiliemcudeflashfenyefangwenjizhi,dizhi0xfe8029qishishiqiflashdepage_fedeluojidizhi,duiyingdeflashwulidizhi(yechengzuoquanjudizhi--global address)wei0x7f8029;

误区二:工程编译生成的下载文件大小即为最终占用Flash的大小

henduogongchengshipanduanyigeqianrushimcuyingyonggongchengdebianyijieguodaxiaowangwangkangongchengbianyishengchengdehex/s19/bindengxiazaiwenjiandedaxiao,renweigongchengbianyishengchengdexiazaiwenjiandaxiaojiweizuizhongzhanyongflashdedaxiao,zheishibuzhengquede。

yinweizaihex/s19/bindengxiazaiwenjianwangwanghaibaohanlebianyiqibanbenxinxi,gongchengpeizhixinxi,meixingshuju/daimadecunchudizhi,zhangdu、xiaoyanheyijizhenggegongchengdefuweiyunxingdizhidengfeichangfengfudexinxi。yinweizhiyoujubeilezheixiexinxi,bianchengqicaizhaodaojiangbianyijieguozhongdeshujuhedaimashaoxiedaoflash/eepromcunchuqidejutidizhibingbaozhengshuju/daimadewanzhengxing,tongguomeiyixinghezhenggewenjiandexiaoyan(verify)laibaozhengzhenggebianchengguochengdezhengquewanzheng。

yixiayimotorolades19wenjian(yechengweis-record)geshijinxingshuoming:

s-recordmeixingzuidashi78gezijie,156gezifu

s-record geshiruxia:

type

count

address

3d新彩网字谜汇总 data

checksum

qizhong:

3d新彩网字谜汇总 type(leixing):2gezifu。yonglaimiaoshujiludeleixing (s0,s1,s2,s3,s5,s7,s8,s9)。

3d新彩网字谜汇总 count(jishu):2gezifu。 yonglaizuchengheshuomingleyige16jinzhidezhi,xianshilezaijiluzhongshengyuchengduizifudejishu。

address(dizhi):4huo6huo8gezijie。yonglaizuchengheshuomingleyige16jinzhidezhi,xianshileshujuyinggaizhuangzaidedizhi, zheibufendezhangduqujueyuzairudizhidezijieshu。2gezijiededizhizhanyong4gezifu,3gezijiededizhizhanyong6gezifu,4gezijiededizhizhanyong8gezifu。

data(shuju):0—64zifu。yonglaizuchengheshuomingyigedaibiaoleneicunzairushujuhuozhemiaoshuxinxide16jinzhidezhi。

checksum(xiaoyanhe):2gezifu。zheixiezifudangbeipeiduibinghuansuancheng16jinzhishujudeshihouxingchengleyigezuidiyouxiaozifu jie,gaizifujieyonglaibiaodazuoweibuchongshuju,dizhiheshujukudezifuduisuodaibiaode(zijiede)bumadebytezonghe。jijishuzhi、dizhichangheshujuchangderuoganzifuyilianggezifuweiyidui, jiangtamenxiangjiaqiuhe,hedeyichubufenbuji,zhibaoliuzuidiliangweizifunn,checksum =0xff-0xnn。


s0 record:jiluleixingshi“s0” (0x5330)。dizhichangmeiyoubeiyong,yonglingzhiwei(0x0000)。shujuchangzhongdexinxibeihuafenweiyixiasigeziyu:

name(mingcheng):20gezifu,yonglaibianmadanyuanmingcheng

ver(banben):2gezifu,yonglaibianmabanbenhao

3d新彩网字谜汇总 rev(xiudingbanben):2gezifu,yonglaibianmaxiudingbanbenhao

3d新彩网字谜汇总 description(miaoshu):0-36gezifu,yonglaibianmawenbenzhushi

cixingbiaoshichengxudekaishi,buxushaorumemory。

s1 record:jiluleixingshi“s1” (0x5331)。dizhichangyou2gezijiedizhilaishuoming。shujuchangyoukezairudeshujuzucheng。

3d新彩网字谜汇总 s2 record:jiluleixingshi“s2” (0x5332)。dizhichangyou3gezijiedizhilaishuoming。shujuchangyoukezairudeshujuzucheng。

3d新彩网字谜汇总 s3 record:jiluleixingshi“s3” (0x5333)。dizhichangyou4gezijiedizhilaishuoming。shujuchangyoukezairudeshujuzucheng。

s5 record:jiluleixingshi“s5” (0x5335)。dizhichangyou2zijiedezhishuoming,baohanlexianqianchuanshudes1、s2、s3jiludejishu。meiyoushujuchang。

s7 record:jiluleixingshi“s7” (0x5337)。dizhichangyou4zijiededizhishuoming,baohanlekaishizhixingdizhi。meiyoushujuchang。cixingbiaoshichengxudejieshu,buxushaorumemory。

3d新彩网字谜汇总 s8 record:jiluleixingshi“s8” (0x5338)。dizhichangyou3zijiededizhishuoming,baohanlekaishizhixingdizhi。meiyoushujuchang。cixingbiaoshichengxudejieshu,buxushaorumemory。

s9 record:jiluleixingshi“s9” (0x5339)。dizhichangyou2zijiededizhishuoming,baohanlekaishizhixingdizhi。meiyoushujuchang。cixingbiaoshichengxudejieshu,buxushaorumemory。


3d新彩网字谜汇总 yigejutides12xep100decodewarrior5.2gongchengbianyihous19wenjiandedaxiaowei6kb,ershijizhanyongflashdedaxiaozhiyou2445gezijie,yuanxiaoyus19wenjiandedaxiao,suoyipanduanyigeyingyonggongchengbianyijieguosuozhanflashheramdedaxiao,yinggaikanmapwenjianzhongdetongjijieguo,erfeis19wenjiandedaxiao:

3d新彩网字谜汇总 huozheyiide(birucodewarrior 10.6huozhes32ds)deprint sizegongjucongkongzhitai(console)dayinchulaidetext + datalaipanduan,xiamianshiyigejutidempc5748g s32ds for power v1.2gongcheng,qibianyijiwoguosuozhanflashdedaxiaowei23366(text) + 1372(data)=24738 byte,erqis19wenjiandaxiaowei73kb。

误区三:用户应用工程的编译结果建议不能超过MCU片上Flash的80%

3d新彩网字谜汇总 tongguoduiyishangwuquyidefenxi,qianrushimcuzhongyonghuyingyonggongchengdebianyijieguo(shujuhechengxudaima)shiyizhicunchuzaipianshangflashzhongde,duiqixiazaibianchengzhihouzaizhenggechanpindeshengmingzhouqizhongdoubuhuizaigaibian(chufeiyonghukaifalezaixian/yuanchengshengjidebootloadergongneng),yinci,wanquankeyijiangjiangflashquanbuyonglaibaocunbianyijieguo,zhiyaozaigongchenglianjiewenjianzhonganzhaomcushijicunchuqidaxiaohedizhijinxingpeizhi,bianyilianjiejieguomeiyoucunchuqiyichujike。yonghuyingyonggongchengdebianyijieguojianyibunengchaoguomcupianshangflashde80%deshuofameiyourenhelilunyiju。


本人微信公众号已经开通,欢迎大家微信扫描下方二维码或者在微信添加朋友-->公众号-->输入"汽车电子expert成长之路3d新彩网字谜汇总"搜素-->点击关注。您的支持/关注/转发分享是对我辛勤写作的最大肯定。

我的微信公众号二维码.jpg


huenwei

nxpqichedianzifae

3d新彩网字谜汇总 2017nian7yue18riyushancheng·zhongqing


*bokeneirongweiwangyougerenfabu,jindaibiaobozhugerenguandian,ruyouqinquanqinglianxigongzuorenyuanshanchu。

参与讨论
登录后参与讨论
HXW718059156  2017-07-21 18:29:17 

3d新彩网字谜汇总huanyingdajiaguanzhuwodegerenweixingongzhong(qichedianziexpertchengzhangzhilu),yuwoyiqixuexi、taolunqichedianziheqianrushixitongruanyingjianshejixiangguanhuati~!

 2017-07-18 09:39:48 

zanyige

欢迎大家关注我的微信公众号--汽车电子expert成长之路,阅读更多原创性精彩文章。如果你觉得我的文章对你的学习/工作有所帮助,也请你帮忙转发到你的朋友圈,让更多的人能够看到我的文章,大家一起学习,一起进步!
推荐文章
最近访客
2元中国福利彩票的买法 2元买彩票选几个数字 2元中国福利彩票怎么看 2元就可以打1毛的斗地主棋牌 2元就可以打1毛的炸金花棋牌 2元彩票双色球走势图双色球 2元彩不错 2元彩是值得您信赖的 2元彩票 2元彩票网全国走势图