PDA

View Full Version : Errors with PBP3 and Microcode 5.0.0.3



Ceetee
- 12th August 2012, 13:32
Hello everybody

I have just installed PBP3 with Microcode Studio Plus 5 and I have been trying to compile Robert Wozniak's High-Resolution Timer code, as is with no changes, but I get the following errors:

PICBASIC PRO(TM) Compiler 3.0.6.4, (c) 1998, 2012 microEngineering Labs, Inc.
All Rights Reserved.
Message[303] C:\USERS\CHRIS\DOCUMENTS\MCSP\SPD TIMER\HIRES TIMER 610.ASM 3263 : Program word too large. Truncated to core size. (012D54D0)
Message[303] C:\USERS\CHRIS\DOCUMENTS\MCSP\SPD TIMER\HIRES TIMER 610.ASM 3263 : Program word too large. Truncated to core size. (012D54E8)
[MESSAGE] pic18f4680.pbpinc(504): LONG Variables enabled (PBPL used)
<font color="#FF0000"><b>[ASM ERROR] HIRES TIMER 610.ASM (3263) : Overwriting previous address contents (0001)
<font color="#FF0000"><b>[ASM ERROR] HIRES TIMER 610.ASM (3263) : Overwriting previous address contents (0000)

What does this mean. Can anyone help.

Regards Chris

HenrikOlsson
- 12th August 2012, 14:10
Hi Chris,
The first two messages seems to indicate the program won't fit the available amount of flash in the selected device.
Have you selected the correct device in drop down list in MCSP?

The two errors are most like due to you trying to set some CONFIG bits in the actual code without commenting out the default ones in the .inc file. Now, before you go and edit the .inc files take a look at the CONFIG/ENDCONFIG directive in the PBP3 manual, it allows you to set the CONFIG bits from within your code without having to comment the default ones out of the .inc files.

If this doesn't help then posting your code (or a link to it) and at least letting us know for which device you're trying to compile would be a good next step.

/Henrik.

Ceetee
- 12th August 2012, 16:06
Hi Henrik

Thank you for your reply

The PIC in question is a 18F4680 and this is the device selected in the drop down menu.

Robert Wozniak's code is here http://www.picbasic.co.uk/forum/showthread.php?t=12634. From within the code there are no config statements so I assumed that it uses the PIC18F4680.PBPINC as is.

I have never looked at this chip before and I have tried compiling with a 18F4331 and 18F4550 which I have used and comes with the same errors.

Regards Chris.

mackrackit
- 12th August 2012, 16:25
In your C:\PBP3\DEVICE_REFERENCE directory look for the PIC18F4880.INFO file.
Then try adding the sample config (below) to your program. The file also tells you what it all means.


#CONFIG
__CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_1024_4L & _XINST_OFF_4L

#ENDCONFIG

Ceetee
- 12th August 2012, 16:57
Hi Dave
I have included the #config you suggested but no joy.

Interesting though I have just tried to compile the usart.pbp example program for PBP3, just as a trial, and if I compile with a 16F chip all is OK but if I compile with any 18F chip I get the same errors as my first post occur. Weird!!

Regards Chris....

mackrackit
- 12th August 2012, 17:18
What version of PBP3 do you have? Student, Silver, Gold, trial.

Ceetee
- 12th August 2012, 17:20
Hi Dave

PBP3 is Gold. Brought and registered earlier today.

Regards Chris.

mackrackit
- 12th August 2012, 17:26
Have you double checked the compiler settings in MicroCodeStudio?
I can not think of a reason the sample usart program would not complile on an 18F.

Ceetee
- 12th August 2012, 17:44
Hi Dave

Under Compiler Options I have none of the options selected, although on initial start up the use MPASMX Assembler was checked but I unchecked it because it said it could not find it. (is it this?)
All the Assembler Options are selected.

Regards Chris.

Darrel Taylor
- 12th August 2012, 18:16
Roberts program compiles fine here.
Line 3263 of the .asm file is the assembly language END statement (last line of the file).

I think if you look at the .asm file for the USART sample, the line causing the error will also be the END line.

This problem has been seen only one time before, and only affects 18F's.
It appeared to be something in the Windows registry, but the actual cause was never found.
Completely uninstalling/reinstalling all related programs including PBP3, MCSP and MPLAB did not solve it.

While Charles, Jeff and I were trying to figure it out, the user gave up and completely reinstalled Windows7 and the problem went away.

The previous user had been trying many different PIC related compilers. It's possible that one of them made a change to the way MPASM assembles programs.
Have you been trying other compilers?

Ceetee
- 12th August 2012, 19:07
Hi Darrel

Firstly can I thank everybody who is trying to solve this problem.

I have just done a full uninstall of PBP3, MCSP and MPLAB along with a complete registry search with manual deleting of any entries that refer to those programs. Interestingly I use Windows 7 also, unfortuneately I can't do a reinstall of the operating system (too many old programs installed that I do not have access too anymore).

Yes I had noticed that the problem line seems to be the end statement in the asm file.

I also have installed on my computer MikroBasic 5.61, but that has been installed for a long time along side PICBasic Pro (2.5) which I have now also removed from my computer.

I will have to dig around my registry again.

Many thanks

Chris..

Ceetee
- 12th August 2012, 21:36
Just a quick update.

I have just installed PBP3,MCSP and MPLAB onto my other laptop (which is admittedly running Windows 8 Beta, all other software runs fine) and it has the same problem. 16F chip compile fine 18F will not compile reports the same problems. Really strange..

Chris.

mackrackit
- 13th August 2012, 01:27
Are you using the version of MPLAB downloaded from MeLabs?

Darrel Taylor
- 13th August 2012, 01:57
Do you have MikroBasic installed on that laptop too?

Ceetee
- 13th August 2012, 12:32
Hello All

Q1 (Dave) Yes I have installed MPLAB from the MeLabs download. Currently at the moment I have removed all the software in an effort to remove all traces from the registry.

Q2 (Darrel) I am not sure, currently away from home till later today. Will check.

Thanks All

mackrackit
- 13th August 2012, 13:29
You could do a clean install of your operating system, PBP3, MPLAB,... in a virtual machine. Virtual Box works well.
Might be faster than looking at an OS that has been used for awhile.

Ceetee
- 13th August 2012, 20:04
Hi all

Right what I have just done is reinstalled Vista onto my second laptop (the one that had Windows 8 Beta on) and PBP3 now appears to work. That makes me happy but what I need to try and do is find a solution to it not working on my main laptop. I agree that obviously there is another program somewhere that seems to have taken exception to PBP3, but stranger still is that it appears to be only with 18F chips (I am sure there is a clue there).

This is not an ideal solution (having to reinstall Windows) and it is not one that everybody can do, but it does seem to work. I am now going to reinstall PBP3 onto my main laptop and start digging again.

Anyway for now thanks for the suggestions and I am sure I will be back.

Regards

Chris...

yyusof
- 24th September 2013, 18:35
Dear all
I've write BASIC language in MCSPX after buy and installing PBP3+MicroCode Studio V5 to my PC which win7/64

the error during compiling as below:
could please advice:
7092

yyusof
- 24th September 2013, 18:37
Dear all
I've write BASIC language in MCSPX after buy and installing PBP3+MicroCode Studio V5 to my PC which win7/64

the error during compiling as below:
could please advice:
7093

Acetronics2
- 24th September 2013, 20:49
you do not need to define a second time TRISB, nor PortB address ... it has already being done by the compiler .inc file ...

you just can initialize them

It's a real Syntax error from you ... as SYMBOL is no longer used in PBP ( see manual $2 ) ... was only used with PBC
just wipe out SYMBOL and see ...

Alain

yyusof
- 25th September 2013, 01:32
That cool...
Million thanks :)

Acetronics, could U please show/share with me the tutorial project lnk/ebook address that related with PBP3 programming style...

Thanks and appreciate your help :)

Rgds,
Yyusof

Acetronics2
- 25th September 2013, 12:33
This one is not so bad ...
http://dsp-book.narod.ru/BASICPIC.pdf

For the Holy Team : and just have a look to WHO wrote this paper ...
Humour, Humour, always Humour ... :D

Alain

ShoKre
- 21st October 2013, 02:20
Hi....

problem message[303] Program word too large truncated to core size(cfa4) and so on 4 line...
2 lines for 16f1828.inc line 20, 21 (tried to moding few variation of original val but no joy)
2 line for generated asm line 69, pointing to last "End" word in xx.asm

i have very simple test code which succesfuly compile if i change 16f1828 to 16f1827


a var byte
b var byte
ch1 var byte
ch2 var byte
LED var PORTb.6



start:

adcin 4,ch1
pause 1
hpwm 1,ch1,32000

adcin 5,ch2
pause 1
hpwm 2,ch2,32000
pause 10
a=a+1
if a=255 then toggle led
goto start




pbp is 2.60c
mcs+ 3005

.inc files modified for fusses
mplab 8.90 / mpasm 5.49

what can be diferent between those configs if 16f1827 compile but 16f1828 want.

Archangel
- 21st October 2013, 03:10
Maybe MPASM error see: http://www.microchip.com/forums/m571736.aspx

ShoKre
- 21st October 2013, 10:30
to archangel; YES !!!!!!!!!!!!!! you right, i download "as in threed told" mpasm from v8.63 put in separare folder to
preserve existing 8.9 ver regarding pk3cmd.....
newer then 8.63 have bugy defined pic16f1628.... but must stole few line from never p16f1628.inc to alow
pbp macro find iex CCPTMRS0 EQU H'029E' line (without this hpwm won't work)......
yesterday i was to tired to see things :) thanx
sorry for my bad english writing :), i hope someone too, help this diging...

Acetronics2
- 21st October 2013, 12:47
compile fine with PBP3.07 ...

AND Mplab 8.92 ... or MCSPX ...

Alain