完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛扫一扫,分享给好友
|
链接错误。我已经创建了一个新的项目,我已经复制了组装好的旧代码。然后我添加了一个延迟例程,提到了文件180。当试图组装代码时,我得到以下错误:MPLink 5.08,Link设备数据库版本1.38版权所有(C),1998年-2011年Microchip Technology Inc.错误文件'/Buff/Deule/Dealth/Maul.O.',部分'MeNeNo'Cal码',符号''MyNo.Caydie'008 ''不是Word-AlgNeN.它不能用作目标。关于调用或GOTO指令的错误。
以上来自于百度翻译 以下为原文 A Linker error. I have created a new project and I have copied old code that was assembled. I then added a delay routine mentioned in DS33014L document pg. 180. When tried to assemble code I got the following error: MPLINK 5.08, LINKER Device Database Version 1.38 Copyright (c) 1998-2011 Microchip Technology Inc. Error - file './build/default/production/main.o', section 'MAIN_CODE', Symbol '_MAIN_CODE_0008' is not word-aligned. It can not be used as the target of a call or goto instruction. Errors : 1 Any ideas what to do? |
|
相关推荐
2个回答
|
|
|
你至少可以展示你正在处理的PIC,那么显示代码可能是个主意。
以上来自于百度翻译 以下为原文 You could at least reveal what PIC you are dealing with. Then it might be an idea to show the code. |
|
|
|
|
|
ASM文件被附加并且.Inc文件在上面
IO.ASM(6.51 KB)-下载47次MIN .ASM(7.39 KB)-下载45次VARES.ASM(1.79 KB)-下载43次 以上来自于百度翻译 以下为原文 ; ********************************************************************** ; Start of file "macros.inc" ; ====================================================================== ; PROJECT - Temperature measurment displayed on PC Ver.A ; MODULE - Macro defintions ; FILE - Macros.inc ; ---------------------------------------------------------------------- ; (c)2017 Alexandros Stefanidis ; 3 Tyrinthos Str. ; Peristeri ; Athens ; Greece ; 12135 ; ; Tel. (+30) 2114009773 ; ====================================================================== ; REVISION HISTORY ; ..........................----------------............................ #if 0 ; Revision history is now provided through Visual Source Safe ; The history block is commented out so that history comments are ; ignored. $History: macros.inc $ ; ; ***************** Version 0 ***************** ; 30-08-2017 Alexandros Stefanidis #endif EXTERN DoDly32 ; ====================================================================== ; ; Input: WREG = 0 to 255 offset into table ; C_CALL MACRO Jump_Table xorlw HIGH(Jump_Table+2) ; Convolute high jump table address with low offset movwf PCLATH ; Store for a bit in the PCLATH resgiter xorlw HIGH(Jump_Table+2) ; Recover table offset xorwf PCLATH ; Fix up PCLATH value addwf WREG,W ; Jump table is in WORDS so double the offset bnc $+4 ; Skip if does not cross boundary incf PCLATH ; Adjust high byte when it does addlw LOW (Jump_Table+2) ; Add to table base address bnc $+4 ; Skip if does not cross boundary incf PCLATH ; Adjust high byte when it does call Jump_Table ENDM Dly32 MACRO DLY goto $+1 ;delay 2 cycles goto $+1 ;delay total of 4 cycles ;Take the delay value argument from the macro, precalculate ;the required 4 RAM values and load the The RAM values Dly3 ;though Dly0. BANKSEL Dly3 movlw (DLY-1) & H'FF' movwf Dly0 movlw (DLY-1) >>D'08' & H'FF' movwf Dly1 movlw (DLY-1) >>D'16' & H'FF' ;Bytes are shifted and anded by the assembler to make user ;calculations easier. movwf Dly2 movlw (DLY-1) >>D'24' & H'FF' ;Call DoDly32 to run the delay loop. movwf Dly3 call DoDly32 ENDM ;End of Macro definition ; ###################################################################### ; Start of file "project.inc" ; ###################################################################### ; PROJECT - Temperature measurment displayed on PC Ver.A ; SECTION - PCIP PIC Code ; MODULE ; ---------------------------------------------------------------------- ; (c)2017 ; 3 Tirynthos ; Peristeri ; Athens ; 12135 ; Greece ; Tel. (+30) 211 4009773 ; ====================================================================== ; REVISION HISTORY ; ..........................----------------............................ ; Mark the next block as comment by begining with #if 0 and ending with # endif. #if 0 $History: project.inc $ ; ; ***************** Version 0 ***************** ; 30-08-2017 Alexandros Stefanidis ; Version 0 is using PIC18LF26K80 #endif ; ====================================================================== ; Listing Directives list P=18LF26K80, r=dec, n=0, f=inhx8m, mm=ON, st=ON ; Default number radix is decimal ; f=inhx8m sets the hex file output to inhx8m ; mm=ON prints the memory map in the list file ; st=ON prints the symbol table in the list file errorlevel 0 ; Print all messages, warnings and errors in the list file ; errorlevel -302 ; Suppress "Msg 302: Register not in bank 0. Ensure bank bits are correct." title "Thermometer Ver.A(18LF26K80)" subtitle "(c)Alexandros Stefanidis" ;Macro Directives expand ; Print macro expansions in the list file ; Included files #include ;#include "macros.inc" ;=============================================================================== ; Status Bits #define SR_N STATUS,N #define SR_OV STATUS,OV #define SR_Zero STATUS,Z #define SR_DC STATUS,DC #define SR_Carry STATUS,C ; ********************************************************************** ; Start of file "vars.inc" ; ====================================================================== ; PROJECT - Temperature measurment displayed on PC Ver.A ; SECTION - PCIP PIC Code ; MODULE ; ---------------------------------------------------------------------- ; (c)2017 ; 3 Tirynthos ; Peristeri ; Athens ; 12135 ; Greece ; Tel. (+30) 211 4009773 ; ====================================================================== ; REVISION HISTORY ; ..........................----------------............................ ; Mark the next block as comment by begining with #if 0 and ending with # endif. #if 0 $History: vars.inc $ ; ; ***************** Version 0 ***************** ; 30-08-2017 Alexandros Stefanidis ; Version 0 is using PIC18LF26K80 #endif ; ====================================================================== ; Define external access to variables defined in vars.asm EXTERN bx_Temp_L, bx_Temp_W, bx_Temp_M, bx_Temp_H EXTERN Dly0, Dly1, Dly2, Dly3 ; ====================================================================== .asm files are attached and .inc files are above Attachment(s) gen_subs.asm (1.89 KB) - downloaded 47 times io.asm (6.51 KB) - downloaded 47 times main.asm (7.39 KB) - downloaded 45 times vars.asm (1.79 KB) - downloaded 43 times |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
501 浏览 0 评论
5808 浏览 9 评论
2350 浏览 8 评论
2237 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3543 浏览 3 评论
1155浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1119浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
887浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
501浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-12 04:53 , Processed in 0.884189 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1689