Include File problem


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Include File problem

    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

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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)

  3. #3
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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.
    Last edited by ScaleRobotics; - 23rd March 2011 at 03:24.

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    I have that file in the path you showed me and still gives me this error..

    K

  5. #5
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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:
    Code:
    @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

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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:
    Code:
    @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

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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.

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    I upgraded to 8.63, re-installed picbasic pro (removing its directory before) upgraded to 2.60C, still the same problem.

  9. #9
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    Micro Code Studio error: 105:Cannot open file (Include File 'P18F4550.INC' not found)...

  10. #10
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

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

    Name:  mpasm-suite.PNG
Views: 951
Size:  84.8 KB

  11. #11
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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

  12. #12
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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/cont...ith-Vista-Win7

    Walter

  13. #13
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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

  14. #14
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Include File problem

    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

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