Searching \ for '[PIC]: How to use MPLINK ?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'How to use MPLINK ?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: How to use MPLINK ?'
2001\02\09@162416 by o-8859-1?q?SZE=20KEAT=20CHEE?=

picon face
Hello everyone

    Sorry if this is a too basic
question.
    I have three source files(all asm)
and wanna to compile them together by using
MPLINK,but I just couldnt get them
compiled.Can anyone point out my mistake?

[1]  For example, let my three files named
     1.asm , 2.asm , 3.asm

[2]So I open a project name 1.pjt and target
  file name is 1.hex     .

[3]I went to the "Project>Edit Project" and
  configure the 1.hex node properties from
  MPASM to  MPLINK(Language Tool).I also
  add 1.asm, 2.asm, 3.asm by using add node.

[4]I also make sure that the hex format is
  in INHX8M.

[5]Then I execute the make project command
  but it didnt success.

Below is the Build Result for reference.

Really hope for some advice.

Thank you .

by
Chee Sze Keat

*****************************************************

Building MCP3201.HEX...

Compiling MCP3201.ASM:
Command line: "C:\PROGRA~1\MPLAB\MPASMWIN.EXE /e+ /l+
/x- /w0 /c+ /m+ /rhex /p16F877 /o+ /q
C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM"
Warning[205] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 11
: Found directive in column 1. (list)
Warning[205] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 14
: Found directive in column 1. (__CONFIG)
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 72
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 83
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 116
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 128
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 145
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 158
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 170
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 193
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 195
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 209
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 235
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 236
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 237
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 238
: Register in operand not in bank 0.  Ensure that bank
bits are correct.
Message[302] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 240
: Register in operand not in bank 0.  Ensure that bank
bits are correct.

Compiling HEXDEC.ASM:
Command line: "C:\PROGRA~1\MPLAB\MPASMWIN.EXE /e+ /l+
/x- /w0 /c+ /m+ /rhex /p16F877 /o+ /q
C:\PROGRA~1\MPLAB\PROJECT\HEXDEC.ASM"

Compiling HEXASCII.ASM:
Command line: "C:\PROGRA~1\MPLAB\MPASMWIN.EXE /e+ /l+
/x- /w0 /c+ /m+ /rhex /p16F877 /o+ /q
C:\PROGRA~1\MPLAB\PROJECT\HEXASCII.ASM"

Linking:
Command line: "C:\PROGRA~1\MPLAB\MPLINK.EXE /aINHX8M
/o MCP3201.HEX MCP3201.O HEXDEC.O HEXASCII.O
C:\PROGRA~1\MPLAB\16F877.LKR "

MPLAB is unable to find output file "MCP3201.HEX".

Build failed.







__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\02\09@164515 by Robert Shady

picon face
Your problem isn't with MPLINK so much
as it is with your source code.. It's telling
you that you have errors in your code...

-- Rob

--- SZE KEAT CHEE <.....szekeatKILLspamspam@spam@YAHOO.COM> wrote:
{Quote hidden}

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\02\09@182852 by Olin Lathrop

face picon face
> Warning[205] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 11
> : Found directive in column 1. (list)
> Warning[205] C:\PROGRA~1\MPLAB\PROJECT\MCP3201.ASM 14
> : Found directive in column 1. (__CONFIG)

It looks like you have LIST and __CONFIG directives in column 1.  Only
labels can start in column 1.  This has nothing to do with using the linker
or not.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, EraseMEolinspam_OUTspamTakeThisOuTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\02\09@201942 by o-8859-1?q?SZE=20KEAT=20CHEE?=

picon face
Hello Olin Lathrop

  Thanks for your feedback.
I am still newbie to PIC.I
dont get what you mean by
"Only labels can start in column 1"
.
 My program started in this way.

list p=16f877
include "p16f877.inc"
__config _LVP_OFF & _HS_OSC & _WDT_OFF & _PWRTE_ON &
_CP_OFF & _BODEN_OFF & _DEBUG_OFF

 but  there are errors with lines that use
GLOBAL, UDATA_OVER,UDATA and CODE.

  Thanks again and please feel free to tell
me if you have any idea.

Sze Keat


--- Olin Lathrop <@spam@olin_piclistKILLspamspamEMBEDINC.COM> wrote: >
{Quote hidden}

*****************************************************************
{Quote hidden}

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


2001\02\09@204735 by Barry Gershenfeld

picon face
>I am still newbie to PIC.I
>dont get what you mean by
>"Only labels can start in column 1"
>.
>  My program started in this way.
>
>list p=16f877
>include "p16f877.inc"
>__config _LVP_OFF & _HS_OSC & _WDT_OFF & _PWRTE_ON &


As you move across the page, those are called columns.
See the difference:

list p=16f877                   ; Bad

        list p=16f877          ; Good

What this says is that you can't put a statement at the
very left (column 1).  Only a label can go there.  A
label is the thing you "go to".   The label in this
example is abcde.

abcde
       incf    num1,f
       btfss   status,z
       goto    abcde


This is how the compiler can tell a label from
an assembly instruction.

The other thing they told you was that these
errors aren't from linking.  You would get
them anyway if you were simply using MPASM
to try to compile each of your program's parts.

Barry

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\02\09@222958 by o-8859-1?q?SZE=20KEAT=20CHEE?=

picon face
Hello  Yann Ramin,Olin Lathrop and Barry


    Thanks for explaination.
I got it.
    There is another question.Sorry.

program list:

       list p=16f877
       include "p16f877.inc"

       __config _LVP_OFF & _HS_OSC & _WDT_OFF &   _PWRTE_ON
& _CP_OFF & _BODEN_OFF & _DEBUG_OFF


 #define  mode11       ;if SPI bus mode 1,1 is
desired
       ;else comment out and rebuild for mode 0,0

;*******VARIABLE DEFINITIONS

                 |
;**error message  |
                 v

TEMP_VAR UDATA  0x20 ;variable used for context
saving
adc_result     RES       2       ;
offset                 RES       1 ;
temp                   RES       1;
               .
               .
               .
               .
               .

I have an error message for "TEMP_VAR UDATA 0x20"
that read as below.

Directive only allowed when generating an object file


Do you have any idea what the error message is about?

Thank you very much.

Chee Sze Keat











__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\02\10@101921 by Olin Lathrop

face picon face
> I am still newbie to PIC.I
> dont get what you mean by
> "Only labels can start in column 1"
> .
>   My program started in this way.
>
> list p=16f877
> include "p16f877.inc"
> __config _LVP_OFF & _HS_OSC & _WDT_OFF & _PWRTE_ON &

The short answer is that __CONFIG, LIST, and anything else that isn't a
label (and a few other things) can't start in column 1.  This means you have
to put a space in front of it so that it starts at least in column 2.

Labels are mostly used to give a particular memory address a name.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, olinEraseMEspam.....embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu


2001\02\10@101936 by Olin Lathrop

face picon face
> I have an error message for "TEMP_VAR UDATA 0x20"
> that read as below.
>
> Directive only allowed when generating an object file

You can only use UDATA when assembling for later linking.  This is what they
mean by "generating an object file".


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, RemoveMEolinEraseMEspamEraseMEembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...