PDA

View Full Version : Include File problem



lerameur
- 22nd March 2011, 17:54
Hello,

I newly installed MPLAB with picbasic pro.
I am getting this error:
Executing: "C:\PBP\PBPMPLAB.BAT" -p18F4550 -ampasmwin -k- "both.bas"
Executing: "C:\PBP\PBPW.EXE" -p18F4550 -ampasmwin -k- "both.bas"
Error[105] C:\PBP\18F4550.INC 19 : Cannot open file (Include File "P18F4550.INC" not found)

But there are no P18F4550.INC, or no P<file< for the 18 categories in the PBP folder. Anybody has an explanation or solutions when I try to compile?

K

lerameur
- 23rd March 2011, 01:59
HI,
BTW, I just installed windows and this is a fresh installation. I can compile with P16 chips, but when I choose any P18 chips I get many errors:

Executing: "C:\PBP\PBPMPLAB.BAT" -p18F4550 -ampasmwin -k# "button.bas"
Executing: "C:\PBP\PBPW.EXE" -p18F4550 -ampasmwin -k# "button.bas"
Error[105] C:\PBP\18F4550.INC 19 : Cannot open file (Include File "P18F4550.INC" not found)
Error[113] C:\PBP\18F4550.INC 20 : Symbol not previously defined (_CONFIG1L)
Error[126] C:\PBP\18F4550.INC 20 : Argument out of range (not a valid config register address)
Error[113] C:\PBP\18F4550.INC 21 : Symbol not previously defined (_CONFIG1H)
Error[126] C:\PBP\18F4550.INC 21 : Argument out of range (not a valid config register address)
Error[113] C:\PBP\18F4550.INC 22 : Symbol not previously defined (_CONFIG2L)
Error[126] C:\PBP\18F4550.INC 22 : Argument out of range (not a valid config register address)
Error[113] C:\PBP\18F4550.INC 23 : Symbol not previously defined (_CONFIG2H)
Error[126] C:\PBP\18F4550.INC 23 : Argument out of range (not a valid config register address)
Error[113] C:\PBP\18F4550.INC 24 : Symbol not previously defined (_CONFIG3H)
Error[126] C:\PBP\18F4550.INC 24 : Argument out of range (not a valid config register address)
Error[113] C:\PBP\18F4550.INC 25 : Symbol not previously defined (_CONFIG4L)
Error[126] C:\PBP\18F4550.INC 25 : Argument out of range (not a valid config register address)
Error[113] C:\PBP\BUTTON.ASM 197 : Symbol not previously defined (PORTB)
Error[113] C:\PBP\BUTTON.ASM 199 : Symbol not previously defined (PORTC)
Error[113] C:\PBP\BUTTON.ASM 201 : Symbol not previously defined (TRISB)
Error[113] C:\PBP\BUTTON.ASM 203 : Symbol not previously defined (TRISC)

ScaleRobotics
- 23rd March 2011, 03:21
This means it doesn't know where your mpasm files are:


Error[105] C:\PBP\18F4550.INC 19 : Cannot open file (Include File "P18F4550.INC" not found)
They should be in here: C:\Program Files\Microchip\MPASM Suite\P18F4550.INC

Which pretty much causes all the other problems.

lerameur
- 23rd March 2011, 13:53
I have that file in the path you showed me and still gives me this error..

K

ScaleRobotics
- 23rd March 2011, 14:09
To confirm, your mpasm is installed in the directory? For some reason pbp does not see it. Perhaps you need to reinstall mplab ide. When you run mpasm by itself, can you run it from the directory I showed you?

If you look in the pbpmplab.bat file, it shows you where it is going to look. You can even modify it, but you shouldn't need to. What operating system are you using 64 bit, or 32 bit?

Here's where it is going to look:


@echo off
setlocal enabledelayedexpansion

:: This file is intended to be run from MPLAB for compilation
:: using the PICBASIC PRO Compiler. PBPMPLAB.BAT should be
:: located in the PBP install folder (default C:\PBP).

:: Set for default location on 32-bit systems
SET MPASMWIN_PATH=C:\Program Files\Microchip\MPASM Suite

:: If that doesn't work, set for default location on 64-bit systems
IF NOT EXIST "!MPASMWIN_PATH!\MPASMWIN.EXE" (
SET MPASMWIN_PATH=C:\Program Files ^(x86^)\Microchip\MPASM Suite
)

::*************** User modifications here ***************************


:: In order for PBP to launch the MPASMWIN Assembler, the
:: location of MPASMWIN.EXE will be appended to the existing
:: PATH environment variable. If MPASMWIN is not located in
:: one of the default folders above, uncomment and change the
:: following line to reflect the true location:

rem SET MPASMWIN_PATH=C:\Program Files ^(x86^)\Microchip\MPASM Suite

lerameur
- 23rd March 2011, 14:25
I originally installed version 8.63, uninstalled it and installed version 8.60. still with same problem. here is my PBPMPLAB.BAT file.. same as yours:

@echo off
setlocal enabledelayedexpansion

:: This file is intended to be run from MPLAB for compilation
:: using the PICBASIC PRO Compiler. PBPMPLAB.BAT should be
:: located in the PBP install folder (default C:\PBP).

:: Set for default location on 32-bit systems
SET MPASMWIN_PATH=C:\Program Files\Microchip\MPASM Suite

:: If that doesn't work, set for default location on 64-bit systems
IF NOT EXIST "!MPASMWIN_PATH!\MPASMWIN.EXE" (
SET MPASMWIN_PATH=C:\Program Files ^(x86^)\Microchip\MPASM Suite
)

::*************** User modifications here ***************************


:: In order for PBP to launch the MPASMWIN Assembler, the
:: location of MPASMWIN.EXE will be appended to the existing
:: PATH environment variable. If MPASMWIN is not located in
:: one of the default folders above, uncomment and change the
:: following line to reflect the true location:

rem SET MPASMWIN_PATH=C:\Program Files ^(x86^)\Microchip\MPASM Suite


::************************************************ *******************


:: Code below this point should not need to be modified.


IF NOT EXIST "!MPASMWIN_PATH!\MPASMWIN.EXE" (
echo MPASMWIN.EXE could not be found at:
echo !MPASMWIN_PATH!
echo In order for PBP to function from MPLAB, the path to
echo MPASMWIN.EXE must be corrected by editing the file:
echo %0
goto end
)

:: Append MPASM folder to existing PATH

set PATH=%PATH%;!MPASMWIN_PATH!

:: Set CURPATH to the location of this batch file.

set CURPATH=%~dp0

:: If -n parameter is present, run PBPL.EXE. If not, run PBPW.EXE.

if %1 == -n (
echo Executing: "%CURPATH:~0,-1%\PBPL.EXE" %2 %3 %4 %5 %6 %7 %8 %9
"%CURPATH:~0,-1%\PBPL.EXE" %2 %3 %4 %5 %6 %7 %8 %9
) else (
echo Executing: "%CURPATH:~0,-1%\PBPW.EXE" %1 %2 %3 %4 %5 %6 %7 %8 %9
"%CURPATH:~0,-1%\PBPW.EXE" %1 %2 %3 %4 %5 %6 %7 %8 %9
)

:end

ScaleRobotics
- 23rd March 2011, 14:36
I am at a loss.....

Have you tried using Micro Code Studio? Might be interesting to see if it can find your Pchip.INC files.

lerameur
- 23rd March 2011, 14:48
I upgraded to 8.63, re-installed picbasic pro (removing its directory before) upgraded to 2.60C, still the same problem.

lerameur
- 23rd March 2011, 14:52
Micro Code Studio error: 105:Cannot open file (Include File 'P18F4550.INC' not found)...

ScaleRobotics
- 23rd March 2011, 15:21
They seem to both be in agreement .....

Are you SURE your mpasm suite directory is here and looks like this, with a P18F4550.INC file in it???

5305

lerameur
- 23rd March 2011, 16:13
I just formatted my drive re-installed windows 7 , picbasic pro and MPlab 8.63, still having the same error. yes I do have the P18F4550 in C:\Program Files (x86)\Microchip\MPASM Suite

my P18file:


LIST

;================================================= =========================
; MPASM PIC18F4550 processor include
;
; (c) Copyright 1999-2010 Microchip Technology, All rights reserved
;================================================= =========================

NOLIST

;================================================= =========================
; This header file defines configurations, registers, and other useful
; bits of information for the PIC18F4550 microcontroller. These names
; are taken to match the data sheets as closely as possible.
;
; Note that the processor must be selected before this file is included.
; The processor may be selected the following ways:
;
; 1. Command line switch:
; C:\MPASM MYFILE.ASM /PIC18F4550
; 2. LIST directive in the source file
; LIST P=PIC18F4550
; 3. Processor Type entry in the MPASM full-screen interface
; 4. Setting the processor in the MPLAB Project Dialog
;================================================= =========================

;================================================= =========================
;
; Verify Processor
;
;================================================= =========================
IFNDEF __18F4550
MESSG "Processor-header file mismatch. Verify selected processor."
ENDIF

;================================================= =========================
; 18xxxx Family EQUates
;================================================= =========================
FSR0 EQU 0
FSR1 EQU 1
FSR2 EQU 2

FAST EQU 1

W EQU 0
A EQU 0
ACCESS EQU 0
BANKED EQU 1

ScaleRobotics
- 23rd March 2011, 17:02
Very strange. You could try comparing the installation instructions for windows 7 to what you have done, and see if there are any differences. Beyond that, you may need superior help.

http://www.picbasic.co.uk/forum/content.php?r=143-Installing-MicroCode-Studio-with-Vista-Win7

Walter

lerameur
- 23rd March 2011, 17:37
Well I formatted my drive again and installed windows7. This time I started to install MPLAb first 8.6, then installed Picbasic pro. NOw its working. very strange indeed ! i will try to upgrade to 8.63 see what happens

K

lerameur
- 23rd March 2011, 17:44
Ok , i upgraded to 8.63 and its working fine now. I was installing picbasic pro before MPLAB, maybe that was causing the problem.. who knows..

K