Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Fault when assembling ! Plz help me !

Status
Not open for further replies.

aka211

Newbie level 3
Joined
May 21, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,410
When I assemble the code (build HEX file with MPLAB) for PIC16F877A, this fault accurs :
Debug build of project `DAN939AA.mcp' started.
Preprocessor symbol `__DEBUG' is defined.
Wed Jun 03 082556 2009
----------------------------------------------------------------------
Clean Deleting intermediary and output files.
Clean Deleted file DAN939compute.o.
Clean Deleted file DAN939earth.o.
Clean Deleted file DAN939em_eep.o.
Clean Deleted file DAN939EnergyVariables.o.
Clean Deleted file DAN939kva.o.
Clean Deleted file DAN939md.o.
Clean Deleted file DAN939pfndisp.o.
Clean Deleted file DAN939rtc.o.
Clean Deleted file DAN939sinphee.o.
Clean Deleted file DAN939sinpheem.o.
Clean Deleted file DAN939compute.lst.
Clean Deleted file DAN939earth.lst.
Clean Deleted file DAN939em_eep.lst.
Clean Deleted file DAN939EnergyVariables.lst.
Clean Deleted file DAN939kva.lst.
Clean Deleted file DAN939md.lst.
Clean Deleted file DAN939pfndisp.lst.
Clean Deleted file DAN939rtc.lst.
Clean Deleted file DAN939sinphee.lst.
Clean Deleted file DAN939sinpheem.lst.
Clean Deleted file DAN939AA.mcs.
Clean Done.
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A compute.asm lcompute.lst ecompute.err ocompute.o d__DEBUG=1
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A earth.asm learth.lst eearth.err oearth.o d__DEBUG=1
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A em_eep.asm lem_eep.lst eem_eep.err oem_eep.o d__DEBUG=1
Message[302] DAN939EM_EEP.ASM 53 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 54 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 58 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 62 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 66 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 70 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 72 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 74 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 80 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 82 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 84 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 85 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939EM_EEP.ASM 88 Register in operand not in bank 0. Ensure that bank bits are correct.
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A EnergyVariables.asm lEnergyVariables.lst eEnergyVariables.err oEnergyVariables.o d__DEBUG=1
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A kva.asm lkva.lst ekva.err okva.o d__DEBUG=1
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A md.asm lmd.lst emd.err omd.o d__DEBUG=1
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A pfndisp.asm lpfndisp.lst epfndisp.err opfndisp.o d__DEBUG=1
Message[305] DAN939PFNDISP.ASM 1008 Using default destination of 1 (file).
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A rtc.asm lrtc.lst ertc.err ortc.o d__DEBUG=1
Message[302] DAN939RTC.ASM 84 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 85 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 94 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 98 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 102 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 117 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 121 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 123 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 125 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 127 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 129 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 142 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 153 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 165 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 188 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 203 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 204 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 212 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939RTC.ASM 213 Register in operand not in bank 0. Ensure that bank bits are correct.
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A sinphee.asm lsinphee.lst esinphee.err osinphee.o d__DEBUG=1
Message[305] DAN939SINPHEE.ASM 176 Using default destination of 1 (file).
Message[302] DAN939SINPHEE.ASM 262 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 279 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 290 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 318 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 329 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 351 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[305] DAN939SINPHEE.ASM 422 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 487 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 774 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 775 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 776 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 777 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 780 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 782 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 784 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 821 Using default destination of 1 (file).
Message[302] DAN939SINPHEE.ASM 1142 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[305] DAN939SINPHEE.ASM 1325 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 1329 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 1333 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 1342 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 1343 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 1344 Using default destination of 1 (file).
Message[305] DAN939SINPHEE.ASM 1345 Using default destination of 1 (file).
Message[302] DAN939SINPHEE.ASM 1359 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1360 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1362 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1468 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1471 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1473 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1475 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1477 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1479 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1531 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1534 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1548 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1551 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1553 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1554 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1561 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1564 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1566 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1567 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1577 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1578 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1579 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1602 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1605 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[305] DAN939SINPHEE.ASM 1767 Using default destination of 1 (file).
Message[302] DAN939SINPHEE.ASM 1808 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1815 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1820 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1827 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1840 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1844 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1850 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1851 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1852 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1854 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1856 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1857 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1859 Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] DAN939SINPHEE.ASM 1861 Register in operand not in bank 0. Ensure that bank bits are correct.
Executing CProgram FilesMicrochipMPASM SuiteMPASMWIN.exe q p16F877A sinpheem.asm lsinpheem.lst esinpheem.err osinpheem.o d__DEBUG=1
Message[305] DAN939SINPHEEM.ASM 76 Using default destination of 1 (file).
Message[305] DAN939SINPHEEM.ASM 84 Using default destination of 1 (file).
Message[305] DAN939SINPHEEM.ASM 103 Using default destination of 1 (file).
Message[305] DAN939SINPHEEM.ASM 111 Using default destination of 1 (file).
Message[305] DAN939SINPHEEM.ASM 119 Using default destination of 1 (file).
Message[305] DAN939SINPHEEM.ASM 127 Using default destination of 1 (file).
Executing CProgram FilesMicrochipMPASM Suitemplink.exe CProgram FilesMicrochipMPASM SuiteLKR16f877a.lkr compute.o earth.o em_eep.o EnergyVariables.o kva.o md.o pfndisp.o rtc.o sinphee.o sinpheem.o z__MPLAB_BUILD=1 z__MPLAB_DEBUG=1 oAA.cof MAA.map W
MPLINK 4.16, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - section 'EnergyVarBank0' can not fit the absolute section. Section 'EnergyVarBank0' start=0x00000020, length=0x0000005e
Errors 1

Link step failed.
----------------------------------------------------------------------
Debug build of project `DAN939AA.mcp' failed.
Preprocessor symbol `__DEBUG' is defined.
Wed Jun 03 082604 2009
----------------------------------------------------------------------
BUILD FAILED
 

Most of the messages are just advisory - but think the fault may be that you are 'Building' the project in Absolute code - have you tried Relocatable code ?

If your 'build' does not give you the option - goto - Project - Build Options - Project - select MPASM Suite - then check the Ask Me or Relocateable code boxes, then try the build again.
 

"Ask Me or Relocateable code boxes " ????

I can't find it. Can u say more clearly, I've just begun to learn about PIC
 

Hi..

"Error - section 'EnergyVarBank0' can not fit the absolute section. Section 'EnergyVarBank0' start=0x00000020, length=0x0000005e"

As shown above in the error, it seems that no errors in the code. I hope you are using more memory than required.
Once check with the memory size of the controller you are using and the variables you declared, also the code.

Hope this helps you....
 

"Ask Me or Relocateable code boxes " ????

I can't find it. Can u say more clearly, I've just begun to learn about PIC

Not much - goto the toolbar on the top of the Mplab screen, and click on the following sequence untill you get to the options shown.
Ensure you are on the screen showing the assembler code and not the 'Build' screen

MPLAB ToolBar - Project - Build Options - Project - select MPASM Suite - then check the Ask Me or Relocateable code boxes, then try the build again.

Two other points - The chip you are building on the 16F877A - that is the chip the original code was intended for ?

If you are such a beginner, perhaps you have started with something a bit too difficult - a lot of programs you pick up on the web do not run just like that for whatever reasons - are you sure the code is good ?
 

Thank you !
I think the code is good.
When I assemble each module, It works. But when I build them all, error accurs.
I've managed that error using the rellocatable mode :

"EnergyVarBank0 UDATA_SHR " --> not define the value.

But now another error

" Error - section 'PROG2' has a memory 'page1' which can not fit the section. Section 'PROG2' length=0x000010f6.
Errors : 1 "

How to repair now ? anyone can help me ? Thanks alot !!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top