Error 115 - Duplicate label


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    24

    Default Error 115 - Duplicate label

    Hi, I have encountered some kind of duplicate #define type problem (?). The error is
    Error[115] ...\LBA_1509_PBP3_0_1.X\MAIN.ASM 14 : Duplicate label ("SPBRG" or redefining symbol that cannot be redefined)
    I'm thinking that there may be a typo in the PIC16F1509.PBPINC file...

    I see there is another thread on the subject relating to a different problem so it got me thinking and I found a workable (?) solution, for the time being at least. I'm not sure of the implications of what I have done so am seeking advise on this. I have the blinky led program working now, to test this idea out, but the blinky led doesn't require the use of much PIC hardware. What I have done is comment out a line in the PIC16F1509.PBPINC file like this:
    #HEADER
    LIST
    LIST p = 16F1509, r = dec, w = -302, c = 255
    INCLUDE "P16F1509.INC" ; MPASM Header
    BLOCK_SIZE EQU 32
    ;#define SPBRG SPBRGL; Comment out this line
    #define EEDATL PMDATL
    #define EEADRL PMADRL
    #define EEDATH PMDATH
    #define EEADRH PMADRH
    #define EECON1 PMCON1
    #define EECON2 PMCON2
    #ENDHEADER
    As far as I know this only relates to the EUSART baudrate settings. I have looked in the p16F1509.inc file but can't really find anything useful apart from the fact that there is SPBRGL and SPBRGH. I'm thinking that there may be a typo in the PIC16F1509.PBPINC file but I don't know the best way to correct it.
    Any help appreciated
    Chris

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Error 115 - Duplicate label

    Show us your code. I'm guessing you are defining something that is already defined without realizing it.

    Robert


    Edit: it's always possible you are the first to use that chip and found a bug.

  3. #3
    Join Date
    Jan 2009
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: Error 115 - Duplicate label

    My blinky led code...
    #CONFIG
    __config _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _MCLRE_ON & _CP_OFF & _CLKOUTEN_OFF & _PWRTE_OFF & _BOREN_OFF
    __config _CONFIG2, _LVP_OFF & _LPBOR_OFF
    #ENDCONFIG
    #define OSC 4
    OSCCON=%01101000 ' 4MHz internal
    TRISC=0
    PORTC=0
    LED0 var PORTC.0

    Start:
    LED0=1
    Pause 500
    LED0=0
    Pause 500
    Goto Start
    And I doubled checked by un-commenting the line in the .PBPINC file and trying to compile (with the same error result).

  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Error 115 - Duplicate label

    #define OSC 4 is the error

    should it be

    DEFINE OSC 4?

  5. #5
    Join Date
    Jan 2009
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: Error 115 - Duplicate label

    Actually thats not what I have in my project so I must have copied and pasted the wrong code, though the rest of the lines are the same. I tried changing my code to what I posted and it compiles and runs OK (if I have the line commented out as noted in my original post) and I've just checked in the PBP3 manual and that syntax is allowed, like the #config

  6. #6
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Error 115 - Duplicate label

    Just trying to help. No need to get upset.

Similar Threads

  1. Duplicate label error
    By lilimike in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 21st December 2011, 00:07
  2. Compile error & syntax error on the word "loop:" as a label?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th March 2010, 04:14
  3. Hserin / Herout 115+ K Baud
    By rlmack35 in forum Serial
    Replies: 1
    Last Post: - 27th December 2008, 00:07
  4. Error[115]...duplicate label..."debug"
    By Brian J Walsh in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th April 2008, 09:29
  5. Is there a label restriction
    By jblackann in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th December 2006, 16:34

Members who have read this thread : 0

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