PDA

View Full Version : 18F452 compile error



Woodzy
- 8th November 2006, 02:58
Hi all,
Am using PICbasicPro 2.45, stock standard.
Can compile a 16F877 perfectly although it is full.
Was under the assumption the 18F452 was the same beast, but with 16k.
Following compile error is given.......

-------------
Error E:\PLC\PBP245\FZ4EE300.ASM 62 : [225] Undefined Symbol 'TRISB'
Error E:\PLC\PBP245\FZ4EE300.ASM 63 : [225] Undefined Symbol 'TRISC'
Error PBPPIC18.LIB 156 : [225] Undefined Symbol 'PORTB'
Error PBPPIC18.LIB 187 : [225] Undefined Symbol 'PORTC'
Error PBPPIC18.LIB 374 : [225] Undefined Symbol 'PORTB'
Error PBPPIC18.LIB 1148 : [200] Instruction Restricted to 14-Bit Core
Error PBPPIC18.LIB 1148 : [218] Address Limit of FFFFh Exceeded
Error PBPPIC18.LIB 1153 : [200] Instruction Restricted to 14-Bit Core
Error PBPPIC18.LIB 1153 : [218] Address Limit of FFFFh Exceeded
Error PBPPIC18.LIB 2605 : [200] Instruction Restricted to 14-Bit Core
Error PBPPIC18.LIB 2605 : [218] Address Limit of FFFFh Exceeded
Error PBPPIC18.LIB 2606 : [200] Instruction Restricted to 14-Bit Core
Fatal PBPPIC18.LIB 2606 : [300] Too Many Errors
PicBasic Pro Compiler 2.45, (c) 1998, 2004 microEngineering Labs, Inc.
All Rights Reserved.
---------------------------

any help would be greatly appreciated.

cheers
Woodzy

mister_e
- 8th November 2006, 03:21
how about if you try a brand new code?

Something simple, led blink or so?

Wich version of MPASM do you use?

Woodzy
- 8th November 2006, 03:28
I will try that yeh.
dont why its rejecting the TRISB TRISC etc
Am using the MPASM that came with PBP 2.45, mate.

cheers
Woodzy

mister_e
- 8th November 2006, 03:37
euh... as far as i remind, MPASM don't comes with PBP 2.45 (or i miss something in the past)

Download the latest version from Microchip Website.

Woodzy
- 8th November 2006, 03:59
MPASM = my mistake.
I just use the assembler supplied with PBPro 2.45

cheers

Woodzy
- 10th November 2006, 03:52
Mister-E,

Took your advice, here is the test program i tried;

------
'e:\plc\pbp245\PBPW.exe -p18f452 e:\2005\FZ4\452LED.bas

ALED var portb.0
high ALED
pause 1000
low ALED
end
------

and now the associated compilationerror messages.
-------------------

Error E:\PLC\PBP245\452LED.ASM 44 : [225] Undefined Symbol 'TRISB'
Error E:\PLC\PBP245\452LED.ASM 45 : [225] Undefined Symbol 'TRISC'
Error PBPPIC18.LIB 156 : [225] Undefined Symbol 'PORTB'
Error PBPPIC18.LIB 187 : [225] Undefined Symbol 'PORTC'
Error PBPPIC18.LIB 362 : [225] Undefined Symbol 'PORTA'
Error PBPPIC18.LIB 368 : [225] Undefined Symbol 'PORTA'
Error PBPPIC18.LIB 380 : [225] Undefined Symbol 'PORTB'
Error PBPPIC18.LIB 1153 : [200] Instruction Restricted to 14-Bit Core
Error PBPPIC18.LIB 1153 : [218] Address Limit of FFFFh Exceeded
Error PBPPIC18.LIB 6215 : [200] Instruction Restricted to 14-Bit Core
Error PBPPIC18.LIB 6215 : [218] Address Limit of FFFFh Exceeded
Error PBPPIC18.LIB 6216 : [200] Instruction Restricted to 14-Bit Core
Fatal PBPPIC18.LIB 6216 : [300] Too Many Errors
PicBasic Pro Compiler 2.45, (c) 1998, 2004 microEngineering Labs, Inc.
All Rights Reserved.
--------------------------

You dont think there may be errors in the .ASM or .LIB files listed above??
I was of the assumption that both the 16F877and the 18F452 were both 14bit devices.

any help from any one would be greatly appreciated.

cheers
Woodzy

HenrikOlsson
- 10th November 2006, 06:28
Woodzy,
You have to use MPASM for the PIC18-series chips. Not the PM assembler (PBP standard). If you're using MicroCodeStudio goto View/Compile and Program Options, select the Assembler tab and make sure that the box use MPASM is ticked. If you don't have MPLAB/MPASM installed you can download it from Microchips site.

If you're not using MicroCodeStudio you need to figure out how to invoke MPASM instead of PM.

/Henrik Olsson.

mister_e
- 10th November 2006, 16:56
Or plug PBP in MPLAB... but i prefer MicroCode Studio