共2条
1/1 1 跳转至页
3K,876,873 3K程序,如何从876迁到873?
问
使用PICC,近3K程序,从876迁到873,连接错,如何处理?
用PIC16F876,
Memory Usage Map:
Program ROM $0000 - $0853 $0854 ( 2132) words
Program ROM $0D80 - $0FFF $0280 ( 640) words
$0AD4 ( 2772) words total Program ROM
Bank 0 RAM $0020 - $0049 $002A ( 42) bytes
Bank 0 RAM $0070 - $007C $000D ( 13) bytes
$0037 ( 55) bytes total Bank 0 RAM
Bank 1 RAM $00A0 - $00EA $004B ( 75) bytes total Bank 1 RAM
Bank 2 RAM $0110 - $0148 $0039 ( 57) bytes total Bank 2 RAM
Config Data $2007 - $2007 $0001 ( 1) words total Config Data
Program statistics:
Total ROM used 2772 words (33.8%)
Total RAM used 187 bytes (50.8%)
用PIC16F873,
Executing: "C:\HT-PIC\bin\PICc.exe" -E"tctrl.lde" "D:\SPR\tsoft\testhelp.obj" "D:\SPR\tsoft\aquisition.obj" "D:\SPR\tsoft\autocheck.obj" "D:\SPR\tsoft\delay.obj" "D:\SPR\tsoft\initsystem.obj" "D:\SPR\tsoft\innereeprom.obj" "D:\SPR\tsoft\isr.obj" "D:\SPR\tsoft\main.obj" "D:\SPR\tsoft\sms0601.obj" "D:\SPR\tsoft\tcontrol.obj" -M"tctrl.map" -O"tctrl.cof" -O"tctrl.hex" -Q -MPLAB -16F873
Warning[000] : psect rbss_2 not specified in -p option (first appears in C:\HT-PIC\LIB\PICrt412.obj)
Error[000] D:\SPR\tsoft\innereeprom.obj 22 : Fixup overflow in expression (loc 0x53E (0x502+60), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 22 : Fixup overflow in expression (loc 0x552 (0x502+80), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 22 : Fixup overflow in expression (loc 0x56A (0x502+104), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 24 : Fixup overflow in expression (loc 0x580 (0x580+0), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 26 : Fixup overflow in expression (loc 0x5F4 (0x5BE+54), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 28 : Fixup overflow in expression (loc 0x624 (0x5F6+46), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 31 : Fixup overflow in expression (loc 0x650 (0x644+12), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 31 : Fixup overflow in expression (loc 0x672 (0x644+46), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 31 : Fixup overflow in expression (loc 0x68A (0x644+70), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x69A (0x694+6), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6A8 (0x694+20), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6B4 (0x694+32), size 1, value 0x1F4)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6C6 (0x694+50), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6D0 (0x694+60), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 35 : Fixup overflow in expression (loc 0x6EE (0x6E8+6), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 35 : Fixup overflow in expression (loc 0x6FA (0x6E8+18), size 1, value 0x1EB)
Error[000] innereeprom.rlf 85 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 119 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 157 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 189 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 397 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 471 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 541 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 597 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 637 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 663 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 683 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 703 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1F4)
Error[000] innereeprom.rlf 731 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 745 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 745 : Too many errors
BUILD FAILED: Thu Sep 21 15:51:56 2006
请高人指点! 答 1: 回复!看看RAM吧,873的好像不够用! 答 2: 指针的问题问题:我编译得到这样的错误信息“Fixup error referencing ...”或者“Fixup error in expression ...”。这是什么意思,我该怎么做来解决这个错误?
解答:简单地说,这代表连接器被指示要去调整(修正Fixup)一个对存储位置的引用,这个计算出来的地址可能不适合可用的空间,比如,对一个字节(8位)的引用,要求装入一个比0xFF大的值。
典型地,这通常发生在使用PICC编译器,指针没有被恰当声明的时候,我们看个例子:
bank2 char ch;
char *ptr;
ptr = &ch; // fixup error
这里发生fixup error的原因是,“ptr”是bank0指针 - 它必须是指向bank2的指针才不会出错,如:
bank2 char *ptr;(译者注:bank0指针的地址是8位的[FSR],它可指向bank0和bank1共256字节的空间;而bank2指针,地址是9位的[IRP+FSR],它可指向bank2和bank3的高地址256字节的空间。本例中,尝试让一个bank0指针“ptr”来指向位于bank2里的ch,显然,ch的地址长度是和bank0指针不匹配的)
用PIC16F876,
Memory Usage Map:
Program ROM $0000 - $0853 $0854 ( 2132) words
Program ROM $0D80 - $0FFF $0280 ( 640) words
$0AD4 ( 2772) words total Program ROM
Bank 0 RAM $0020 - $0049 $002A ( 42) bytes
Bank 0 RAM $0070 - $007C $000D ( 13) bytes
$0037 ( 55) bytes total Bank 0 RAM
Bank 1 RAM $00A0 - $00EA $004B ( 75) bytes total Bank 1 RAM
Bank 2 RAM $0110 - $0148 $0039 ( 57) bytes total Bank 2 RAM
Config Data $2007 - $2007 $0001 ( 1) words total Config Data
Program statistics:
Total ROM used 2772 words (33.8%)
Total RAM used 187 bytes (50.8%)
用PIC16F873,
Executing: "C:\HT-PIC\bin\PICc.exe" -E"tctrl.lde" "D:\SPR\tsoft\testhelp.obj" "D:\SPR\tsoft\aquisition.obj" "D:\SPR\tsoft\autocheck.obj" "D:\SPR\tsoft\delay.obj" "D:\SPR\tsoft\initsystem.obj" "D:\SPR\tsoft\innereeprom.obj" "D:\SPR\tsoft\isr.obj" "D:\SPR\tsoft\main.obj" "D:\SPR\tsoft\sms0601.obj" "D:\SPR\tsoft\tcontrol.obj" -M"tctrl.map" -O"tctrl.cof" -O"tctrl.hex" -Q -MPLAB -16F873
Warning[000] : psect rbss_2 not specified in -p option (first appears in C:\HT-PIC\LIB\PICrt412.obj)
Error[000] D:\SPR\tsoft\innereeprom.obj 22 : Fixup overflow in expression (loc 0x53E (0x502+60), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 22 : Fixup overflow in expression (loc 0x552 (0x502+80), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 22 : Fixup overflow in expression (loc 0x56A (0x502+104), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 24 : Fixup overflow in expression (loc 0x580 (0x580+0), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 26 : Fixup overflow in expression (loc 0x5F4 (0x5BE+54), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 28 : Fixup overflow in expression (loc 0x624 (0x5F6+46), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 31 : Fixup overflow in expression (loc 0x650 (0x644+12), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 31 : Fixup overflow in expression (loc 0x672 (0x644+46), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 31 : Fixup overflow in expression (loc 0x68A (0x644+70), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x69A (0x694+6), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6A8 (0x694+20), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6B4 (0x694+32), size 1, value 0x1F4)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6C6 (0x694+50), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 33 : Fixup overflow in expression (loc 0x6D0 (0x694+60), size 1, value 0x1EB)
Error[000] D:\SPR\tsoft\innereeprom.obj 35 : Fixup overflow in expression (loc 0x6EE (0x6E8+6), size 1, value 0x1EC)
Error[000] D:\SPR\tsoft\innereeprom.obj 35 : Fixup overflow in expression (loc 0x6FA (0x6E8+18), size 1, value 0x1EB)
Error[000] innereeprom.rlf 85 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 119 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 157 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 189 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 397 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 471 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 541 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 597 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 637 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 663 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 683 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 703 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1F4)
Error[000] innereeprom.rlf 731 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EC)
Error[000] innereeprom.rlf 745 : Fixup overflow in expression (loc 0x4B (0x4B+0), size 1, value 0x1EB)
Error[000] innereeprom.rlf 745 : Too many errors
BUILD FAILED: Thu Sep 21 15:51:56 2006
请高人指点! 答 1: 回复!看看RAM吧,873的好像不够用! 答 2: 指针的问题问题:我编译得到这样的错误信息“Fixup error referencing ...”或者“Fixup error in expression ...”。这是什么意思,我该怎么做来解决这个错误?
解答:简单地说,这代表连接器被指示要去调整(修正Fixup)一个对存储位置的引用,这个计算出来的地址可能不适合可用的空间,比如,对一个字节(8位)的引用,要求装入一个比0xFF大的值。
典型地,这通常发生在使用PICC编译器,指针没有被恰当声明的时候,我们看个例子:
bank2 char ch;
char *ptr;
ptr = &ch; // fixup error
这里发生fixup error的原因是,“ptr”是bank0指针 - 它必须是指向bank2的指针才不会出错,如:
bank2 char *ptr;(译者注:bank0指针的地址是8位的[FSR],它可指向bank0和bank1共256字节的空间;而bank2指针,地址是9位的[IRP+FSR],它可指向bank2和bank3的高地址256字节的空间。本例中,尝试让一个bank0指针“ptr”来指向位于bank2里的ch,显然,ch的地址长度是和bank0指针不匹配的)
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
与电子爱好者谈读图四被打赏50分 | |
与电子爱好者谈读图二被打赏50分 | |
【FRDM-MCXN947评测】Core1适配运行FreeRtos被打赏50分 | |
【FRDM-MCXN947评测】双核调试被打赏50分 | |
【CPKCORRA8D1B评测】---移植CoreMark被打赏50分 | |
【CPKCORRA8D1B评测】---打开硬件定时器被打赏50分 | |
【FRDM-MCXA156评测】4、CAN loopback模式测试被打赏50分 | |
【CPKcorRA8D1评测】--搭建初始环境被打赏50分 | |
【FRDM-MCXA156评测】3、使用FlexIO模拟UART被打赏50分 | |
【FRDM-MCXA156评测】2、rt-thread MCXA156 BSP制作被打赏50分 |