PB3, which error is it ?


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    82

    Default PB3, which error is it ?

    It seems the program is compiled, but looking to the Build Tab (in MPLAB IDE 8.84 environment) I see the following:

    Executing: "C:\Users\Marco\Documents\PBP3\PBPMPLAB.BAT" -ampasmwin -k# -oq -p18F4680 "Main.bas"
    PBPMPLAB.BAT 4.0.0.0
    Using MPASM from C:\Program Files (x86)\Microchip\MPASM Suite\.
    Executing: "C:\Users\Marco\Documents\PBP3\PBPX.EXE" -ampasmwin -k# -oq -p18F4680 "Main.bas"
    PICBASIC PRO(TM) Compiler 3.0.5.4, (c) 1998, 2012 microEngineering Labs, Inc.
    All Rights Reserved.
    12: Syntax error
    39: Syntax error
    Loaded C:\Users\Marco\Documents\PBP3\Develope\Bls1\Track4 nuova\Nuova versione 3.0 MMA7455\Main.COF.
    BUILD SUCCEEDED: Mon Apr 30 16:17:14 2012

    How can I find where are those errors ?
    Marco

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


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    Look at lines 12 and 39 in your program.
    DT

  3. #3
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    There is nothing of wrong or strange at those lines and the program is compiled without errors

    Name:  Cattura.JPG
Views: 645
Size:  25.2 KB

    I'm confused, I can't understand. This is not a new program, I use it since some years. The only difference is that I have recentrly upgrade to PBP3. I have never seen this errors before.

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


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    Please post the first 40 lines of your code.
    DT

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    Guessing a former label that is now a reserved word. Look at page 301 of the manual.

    Ioannis

  6. #6
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    These are the first lines of the code. I can't see any reserved word.

    Name:  Cattura.JPG
Views: 644
Size:  106.6 KB

    Name:  Cattura1.JPG
Views: 620
Size:  52.3 KB

  7. #7
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    Please note that thought a syntax error is reported at line 11, the EEPROM at address ee_id is correctly programmed with "Bls1 8888 3.00"

    Since I have upgraded to PBP3 I experience unespected resets of the board, never seen before.
    Really other things are changed also, ICD2 to ICD3, the board has been a bit redesigned, the source code is a bit changed.
    I'm investigating where could be the problem. Now is the turn of this strange "Syntax error".
    Marco

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


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    All of your EEPROM statements are incorrect.
    You would have to create each of the locations (ee_id, ee_numtel ,ee_numbc etc.) as constants before the EEPROM statements.

    If you are expecting PBP to assign the locations to those labels, you would need to use the DATA statements instead.

    I've typed in the first few lines from your image and get different errors.
    Code:
    ...
    PICBASIC PRO(TM) Compiler 3.0.5.4, (c) 1998, 2012 microEngineering Labs, Inc.
    All Rights Reserved.
    C:\PIC\HIH6131_HUMID\HIH6131.PBP ERROR Line 11: Expected '['.
    C:\PIC\HIH6131_HUMID\HIH6131.PBP ERROR Line 11: Expected ']'.
     ERROR Line 11: Bad variable modifier: .00.
     WARNING Line 11: Bad token """.11: Syntax error
    11: Syntax error
    BUILD FAILED: Tue May 01 08:10:03 2012
    I'm not sure why you are not getting the proper errors reported, but I'm guessing there are too many errors and the compiler gets confused.
    I'm not going to type them all, but if you want to send the files to [email protected] I can try to compile the whole thing and see if the errors change.

    Or you can just rewrite the code to use DATA statements.
    DT

  9. #9
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    yes Darrel, all of those are declared constant in another include file, ee_id CON 0 ee_numtel CON 20 etc.
    the program is compiled and i see in eeprom what i wrote in the code.
    tomorrow i'll send you the whole project so you can understand where the problem is
    thanks
    marco

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


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    Check the date of the .asm file.
    I don't think PBP is finishing compiling the program, and what is getting assembled is an OLD asm file.

    If you have the constants in an include file, that file must be included BEFORE your EEPROM statements.
    Your program listing above does not do that.
    DT

  11. #11
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: PB3, which error is it ?

    Yes, I don't know why but I realize I have the include file just after all EEPROM statements.
    Moving it before, the two errors disappears ..
    Anyway I ensure you that also with the include after, the program is compiled, it runs and the EEPROM content correspond to what I wrote in the code. I use this part of code since many years.
    PBP 2.xx never reported the error, I see it just now with PBP3.
    But I agree that BEFORE is correct, not after ...
    Thanks for your support
    Marco

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