PDA

View Full Version : PB3, which error is it ?



Marcick
- 30th April 2012, 16:07
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

Darrel Taylor
- 30th April 2012, 16:16
Look at lines 12 and 39 in your program.

Marcick
- 30th April 2012, 18:08
There is nothing of wrong or strange at those lines and the program is compiled without errors

6444

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.

Darrel Taylor
- 30th April 2012, 20:21
Please post the first 40 lines of your code.

Ioannis
- 30th April 2012, 20:36
Guessing a former label that is now a reserved word. Look at page 301 of the manual.

Ioannis

Marcick
- 1st May 2012, 07:37
These are the first lines of the code. I can't see any reserved word.

6446

6447

Marcick
- 1st May 2012, 08:20
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

Darrel Taylor
- 1st May 2012, 15:15
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.

...
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.

Marcick
- 1st May 2012, 15:41
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

Darrel Taylor
- 1st May 2012, 15:49
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.

Marcick
- 1st May 2012, 16:12
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