I've been trying to compile someone elses code using the MPASM assembler v2.01 (Windows). It has worked for them, but not me :(
I get the following error message:
Error[115] PIC03V10.ASM 79 : Duplicate label ("PK_ADDR" or redefining symbol that cannot be redefined)
It seems to be complaining about:
PK_ADDR equ RxBuf+0
PK_LEN equ RxBuf+1
PK_CMD equ RxBuf+2
PK_DATA1 equ RxBuf+3
PK_DATA2 equ RxBuf+4
PK_CHK equ RxBuf+5
RxBuf is being used as a 6byte buffer for serial input, previously defined with RxBuf res 6. PK_ADDR is the first byte (file register) within the buffer, PK_LEN is the second etc. If this method isn't allowed by MPASM, how do I directly access the individual bytes within the buffer ?
I've read that MPASM has become more stringent in its error checking, but I haven't found any reference to the error 115.
Any ideas ?
Stephen Court spam_OUTscourtTakeThisOuTelectra.com.au
Electra International http://www.electra.com.au
Automotive Electronics Diagnostic Equipment
Unit 2, 15 Anthony Street, ph +61 7 3846 3393
West End, Brisbane fax +61 7 3846 3282
Queensland 4101 Australia
At 12:09 1998-01-30 +1100, you wrote:
>I've been trying to compile someone elses code using the MPASM assembler
v2.01 (Windows). It has worked for them, but not me :(
>
>I get the following error message:
>
>Error[115] PIC03V10.ASM 79 : Duplicate label ("PK_ADDR" or redefining
symbol that cannot be redefined)
>
>It seems to be complaining about:
>PK_ADDR equ RxBuf+0
Have you searched all files for PK_ADDR to see if it is defned somehow
somewhere else. Maybe one of the include files are different from "someone
elses" above?
Test: Make that line a remark
;PK_ADDR equ RxBuf+0
And compile again.
Then look in symbol list to see if it is defined anyway.
Hope this helps.
/Morgan
Morgan Olsson, MORGANS REGLERTEKNIK, Sweden, ph: +46 (0)414 70741; fax 70331
-
I have also encoutered this kind of error. The reason I believe is, that the
RES directive defines space in program memory, while the EQU directive tries
to use this symbol in data memory. Although not stated explicitly, MPASM
sorts the labels into classes (program, data, #defines, maybe others). Try
to change the RES directive into something like:
CBLOCK
RxBuf
ENDC
CBLOCK RxBuf+6
Other variables
ENDC
EQUs go here
This cured my problems.
Regards,
Josef
>Error[115] PIC03V10.ASM 79 : Duplicate label ("PK_ADDR" or redefining
symbol that cannot be redefined)
>
>It seems to be complaining about:
>PK_ADDR equ RxBuf+0
>PK_LEN equ RxBuf+1
>PK_CMD equ RxBuf+2
>PK_DATA1 equ RxBuf+3
>PK_DATA2 equ RxBuf+4
>PK_CHK equ RxBuf+5
>
>RxBuf is being used as a 6byte buffer for serial input, previously defined
with RxBuf res 6. PK_ADDR is the first byte (file register) within the
buffer, PK_LEN is the second etc. If this method isn't allowed by MPASM,
how do I directly access the individual bytes within the buffer ?