Duplicate label error


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118

    Default Duplicate label error

    Anybody seen this?

    Using a PIC18F25J50

    Trying to compile I get the following error:
    Error[115] c:\path...\testpic.asm 45 : Duplicate label ("R1" or redefining symbol that cannot be redefined)

    This is my code:
    Code:
    test:
    
          TOGGLE PORTC.0
          PAUSE 500
          GOTO test
    
    END

  2. #2
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    Sorry, I can't find the link to edit my post so will add more info here:
    I had installed PBP 2.60 and made some tests using LCD_Anypin
    Then I tried to add the 2.60C patch but could not recognize that PBP was installed indicating something about pbppic14.lib so I figured it was because this file was modified for LCD_Anypin.

    The version is not indicated on my PBP CDs but I have a previous version and an upgrade to 2.60 so I re-installed both and then tried again to add the patch and got a message about a file (don't remember which one) but I deleted it and then re-applied the patch successfully.

    A number of my previous codes was working until I applied the 2.60C patch

    Now my previous code that was ok can no longer compile.

    Getting Error [118] ...ASM 73 Overwriting previous address content (2007)

    Trying to compile this code:
    Code:
    @ __config _INTOSC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_ON & _LVP_OFF & _CP_OFF
    clear
    DEFINE OSC 8
    TRISB = 0
    TRISA = 0           
    CMCON = 7           
    OPTION_REG = 0
    INTCON = 0
    
    LCD_DB4   VAR PORTB.0
    LCD_DB5   VAR PORTB.1
    LCD_DB6   VAR PORTB.2
    LCD_DB7   VAR PORTB.3
    LCD_RS    VAR PORTA.4
    LCD_E     VAR PORTA.3
    LCD_Lines     CON 2    ' # of Lines on LCD,  1 or 2 (Note: use 2 for 4 lines)
    LCD_DATAUS    CON 50   ' Data delay time in us 
    LCD_COMMANDUS CON 2000 ' Command delay time in us 
    
    INCLUDE "LCD_AnyPin.pbp"  ; *** Include MUST be AFTER LCD Pin assignments ****
    PAUSE 500 : LCDOUT $FE,1 : PAUSE 250
    
    
    
    LCDOUT $FE,$80,"text line 2"
    LCDOUT $FE,$C0,"text line 2"
    
    
    END

  3. #3
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    Me again... Just before someone ask me to do this I have uninstalled PBP, removed the PBP folder and reinstalled from scratch.
    Setup PBP 2.50C
    Setup PBP 2.60 Upgrade
    Ran PBP 2.60C patch

    Same issues.

    Mike

  4. #4
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Cool Re: Duplicate label error

    I've seen that same error message before... I am using PBP 3.0, but I think it is telling you that you are changing the config's twice. Once in the PBP default settings for that PIC and again in your actual program.

    I think you might need to open the default include(.inc) file and remark the default configuration statement. I think??

    but then again I'm not the most experienced programmer here
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  5. #5
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    Thanks for the clue.
    Obviously since I reinstalled I had a fresh .inc file so I commented some lines and got rid of "Overwriting previous address content"
    and for the "Duplicate label ("R1"..." I found in the file P18F25J50.INC located in the \Microchip\MPASM Suite\ folder contained twice the following line in different sections line 1673 and 1733.
    Code:
    R1               EQU  H'0002'
    Commenting either one of them didn't make a difference but commenting both got rid of the error.

    I would really like to know why! (a bug in MPLAB?)

    Mike

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    R1 is the name of one of PBP's system variables.
    On the xxJ50 family, Microchip added the R1 bit name to the P*.inc files which conflicts with PBP.

    It's not really a bug in either MPASM or PBP, but it does cause some problems.

    In PBP3, new header files were created (c:\PBP3\DEVICES\*.MPASMINC) that are used instead of the normal P*.inc files.
    That allows PBP to get around the problem without making everyone edit the P*.inc files in their MPLAB installation.

    For older versions of PBP, you will still need to edit the MPASM P*.inc files like you figured out.
    -------------------

    The Overwriting Previous Address error has also been improved upon in PBP3.
    You no longer need to comment the default configs from the *.inc files. Using the #CONFIG block automatically overrides the defaults.
    DT

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    Darrel, you haven't been as active on the forum as you used to be. I can only assume that is because you are working diligently on PBP 3.x. I know that MELabs doesn't like to give any advance information, but is there something you can tell us about future developments that will get us excited?
    Charles Linquist

  8. #8
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    Thank you Darrel for the clarification.
    I guess I will look into getting PBP3.

    Mike

  9. #9
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Duplicate label error

    Quote Originally Posted by Charles Linquis View Post
    I know that MELabs doesn't like to give any advance information
    You were correct Charles. Sorry, I couldn't say anything till now.

    , but is there something you can tell us about future developments that will get us excited?
    Future ... No, Current ... Yes ...
    Don't know if it will flip your kilt, but I'm pretty excited.

    You may even find the first example sounds familiar.
    DT

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts