PIC 单片机 C 程序 MAPLAB 编译出错是什么原因?
<p>Error ; . can't find 0xC words for psect "temp" in segment "COMBANK"<br />Error ; . can't find 0xBB words (0xbb withtotal) for psect "text14" in segment "CODE"<br />
Error ; . can't find 0xBA words (0xba withtotal) for psect "text21" in segment "CODE"<br />
Error ; . can't find 0xAA words (0xaa withtotal) for psect "text24" in segment "CODE"<br />
Error ; . can't find 0x8D words (0x8d withtotal) for psect "text22" in segment "CODE"<br />
Error ; . can't find 0x72 words (0x72 withtotal) for psect "text9" in segment "CODE"<br />
Error ; . can't find 0x72 words (0x72 withtotal) for psect "text20" in segment "CODE"<br />
Error ; . can't find 0x65 words (0x65 withtotal) for psect "text17" in segment "CODE"<br />
Error ; . can't find 0x4E words (0x4e withtotal) for psect "text12" in segment "CODE"<br />
Error ; . can't find 0x3F words (0x3f withtotal) for psect "text13" in segment "CODE"<br />
Error ; . can't find 0x1E words (0x1e withtotal) for psect "text0" in segment "CODE"<br />
Error ; . can't find 0x1C words (0x1c withtotal) for psect "text7" in segment "CODE"<br />
Error ; . can't find 0x1C words (0x1c withtotal) for psect "text6" in segment "CODE"<br />
Error ; . can't find 0x16 words (0x16 withtotal) for psect "text8" in segment "CODE"<br />
Error ; . can't find 0x16 words (0x16 withtotal) for psect "text15" in segment "CODE"<br />
Error ; . can't find 0x15 words (0x15 withtotal) for psect "text" in segment "CODE"<br />
Error ; . can't find 0x15 words (0x15 withtotal) for psect "text1" in segment "CODE"<br />
Error ; . can't find 0x13 words (0x13 withtotal) for psect "text11" in segment "CODE"<br />
Error ; . can't find 0x13 words (0x13 withtotal) for psect "text16" in segment "CODE"<br />
Error ; . can't find 0x11 words (0x11 withtotal) for psect "text4" in segment "CODE"<br />
Error ; . can't find 0x11 words (0x11 withtotal) for psect "text3" in segment "CODE"<br />
Error ; . can't find 0x11 words (0x11 withtotal) for psect "text5" in segment "CODE"<br />
Error </p>
是源程序过长的原因吗? fcluy 发表于 2024-12-19 22:29
是源程序过长的原因吗?
<p>应该不是源程序过长的问题,看起来像是头文件或者变量名缺失。<br />
如果程序可以外传,放源代码到附件看看</p>
<p>链接器code区段定义小了吧,应该是放不下。</p>
<p>如果链接器code 区段定义小,如何改大?</p>
<p>我试着把程序缩小,在一点上仍出现错误。</p>
<p>Error ; . can't find 0x11 words (0x11 withtotal) for psect "text4" in segment "CODE"<br />
Error ; . can't find 0x11 words (0x11 withtotal) for psect "text2" in segment "CODE"</p>
<div class='shownolgin' data-isdigest='no'><p>双击错误,程序不出现错误的光标点。</p>
</div><script>showreplylogin();</script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <div class='shownolgin' data-isdigest='no'><p>我仔细检查了程序,基本上排除头文件或者变量名缺失的可能性。</p>
</div><script>showreplylogin();</script> <div class='shownolgin' data-isdigest='no'>原因是没有为CODE段分配足够的容量,如果有lcf文件,建议检查一下。印象中MAPLAB选择了芯片型号就可以了,是不是芯片没选对?</div><script>showreplylogin();</script>
页:
[1]