Errors In MPLAB 8.02


Closed Thread
Results 1 to 21 of 21
  1. #1
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8

    Question Errors In MPLAB 8.02

    I am an experienced PIC and MPLAB user (Assembly language only). I'm trying get started in PicBasicPro and am hitting a brick wall. I'm doing a test using the BLINK.asm program. When i BUILD the file, I get an "I/O error,: file not open for input" with OK button. If you press OK, I receive the following text in the OUTPUT screen:

    Executing: "C:\pbp\PBPW.EXE" -ampasmwin -oq -z -p18F442 "blink.bas"
    PicBasic Pro Compiler 2.45a, (c) 1998, 2004 microEngineering Labs, Inc.
    All Rights Reserved.
    Error processing COD file C:\pbp\Files\blink.COD
    Warning[223] C:\PBP\FILES\P18F442.INC 18 : Redefining processor.
    Warning[223] C:\PBP\FILES\P18F442.INC 37 : Redefining processor.
    Warning[223] C:\PBP\FILES\P18F442.INC 56 : Redefining processor.
    Warning[223] C:\PBP\FILES\P18F442.INC 75 : Redefining processor.
    Error[138] C:\PBP\FILES\P18F442.INC 76 : Include files nested too deep
    Error[113] C:\PBP\FILES\P18F442.INC 77 : Symbol not previously defined (_CONFIG1H)
    Warning[230] C:\PBP\FILES\P18F442.INC 77 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[126] C:\PBP\FILES\P18F442.INC 77 : Argument out of range (not a valid config register address)
    Error[113] C:\PBP\FILES\P18F442.INC 78 : Symbol not previously defined (_CONFIG2H)
    Warning[230] C:\PBP\FILES\P18F442.INC 78 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[126] C:\PBP\FILES\P18F442.INC 78 : Argument out of range (not a valid config register address)
    Error[113] C:\PBP\FILES\P18F442.INC 79 : Symbol not previously defined (_CONFIG4L)
    Warning[230] C:\PBP\FILES\P18F442.INC 79 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Halting build on first failure as requested.
    BUILD FAILED: Thu May 29 08:45:38 2008


    I've installed all patches and have the PicBasic Pro Tool Set selected.

    Any idea what I am doing wrong?

    Thanks and Best Regards,

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/show...ng+config+bits

    And an upgrade to 2.50 might not be a bad idea either...

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    Nor an upgrade to MPLAB 8.10 ...

    BTW ... I'm curious to see the .bas listing ... just an idea !

    Alain
    Last edited by Acetronics2; - 29th May 2008 at 16:14.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Have you setup MPLAB for PBP like shown here? http://www.microengineeringlabs.com/support/mplab.htm
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Status So Far.

    I've fixed the Configuration bits. Thanks for that!

    I'm going to update to MPLAB 8.1. In the meantime, Here is the .bas file:

    '************************************************* ***************
    '* 18F442.BAS *
    '* *
    '* By : Leonard Zerman, Jeff Schmoes *
    '* Notice : Copyright (c) 2001 micro Engineering Labs, Inc. *
    '* All Rights Reserved *
    '* Date : 08/28/01 *
    '* Version : 2.40 *
    '* Notes : *
    '************************************************* ***************

    BANKA $0000, $007F
    BANK0 $0080, $00FF
    BANK1 $0100, $01FF
    BANK2 $0200, $02FF
    'EEPROM $F00000, $F000FF
    LIBRARY "PBPPIC18"

    include "PIC18EXT.BAS"

    PORTL VAR PORTB
    PORTH VAR PORTC
    TRISL VAR TRISB
    TRISH VAR TRISC

    include "PBPPIC18.RAM"

    '*-----------------------* EOF 18F442.BAS *---------------------*
    ' Example program from manual to blink an LED connected to PORTB.0 about once a second

    loop: High 0 ' Turn on LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Low 0 ' Turn off LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever


    End

    MPLAB gives the following errors now:

    Executing: "C:\Pb\PBPW.EXE" -ampasmwin -oq -z -p18F442 "blink1.BAS"
    PicBasic Pro Compiler 2.45a, (c) 1998, 2004 microEngineering Labs, Inc.
    All Rights Reserved.

    C:\PBP\PIC18EXT.BAS ERROR Line 12: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 13: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 14: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 15: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 16: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 17: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 18: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 19: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 20: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 21: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 22: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 23: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 24: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 25: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 26: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 27: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 28: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 29: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 30: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 31: Redefinition of VAR.
    C:\PBP\PIC18EXT.BAS ERROR Line 32: Redefinition of VAR.
    FATAL ERROR: Too many errors. (21)
    Halting build on first failure as requested.
    BUILD FAILED: Thu May 29 13:18:17 2008

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Edit your blink1.bas file to include just this. Save and recompile.

    Code:
    loop:   High 0          ' Turn on LED connected to PORTB.0
            Pause 500       ' Delay for .5 seconds
    
            Low 0           ' Turn off LED connected to PORTB.0
            Pause 500       ' Delay for .5 seconds
    
            Goto loop       ' Go back to loop and blink LED forever
    
    
                    End
    Last edited by Bruce; - 29th May 2008 at 20:08.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Edit your blink1.bas file to include just this. Save and recompile.
    Hopefully he's not under the mistaken impression that he should be adding/deleting/moving the 18F442.BAS file, or any of the other files in that directory around!

  8. #8
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default It looks worst!

    Noted. My .bas files looks like this:

    ' Example program from manual to blink an LED connected to PORTB.0 about once a second

    loop: High 0 ' Turn on LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Low 0 ' Turn off LED connected to PORTB.0
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    End


    The outfile looks like this:

    Executing: "C:\pbp\PBPW.EXE" -ampasmwin -oq -z -p18F442 "blink.bas"
    PicBasic Pro Compiler 2.45a, (c) 1998, 2004 microEngineering Labs, Inc.
    All Rights Reserved.
    Warning[223] C:\PBP\P18F442.INC 18 : Redefining processor.
    Warning[221] C:\PBP\P18F442.INC 18 : Invalid message number (65417)
    Warning[207] C:\PBP\18F442.INC 21 : Found label after column 1. (_CONFIG1H)
    Warning[230] C:\PBP\18F442.INC 28 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[113] C:\PBP\18F442.INC 28 : Symbol not previously defined (_OSCS_OFF_1H)
    Error[113] C:\PBP\18F442.INC 28 : Symbol not previously defined (_XT_OSC_1H)
    Warning[230] C:\PBP\18F442.INC 29 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[113] C:\PBP\18F442.INC 29 : Symbol not previously defined (_WDT_ON_2H)
    Error[113] C:\PBP\18F442.INC 29 : Symbol not previously defined (_WDTPS_128_2H)
    Warning[230] C:\PBP\18F442.INC 30 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[113] C:\PBP\18F442.INC 30 : Symbol not previously defined (_LVP_OFF_4L)
    Error[113] C:\PBP\FILES\BLINK.ASM 54 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\FILES\BLINK.ASM 56 : Symbol not previously defined (PORTC)
    Error[113] C:\PBP\FILES\BLINK.ASM 58 : Symbol not previously defined (TRISB)
    Error[113] C:\PBP\FILES\BLINK.ASM 60 : Symbol not previously defined (TRISC)
    Error[113] C:\PBP\PBPPIC18.LIB 6219 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6219 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 6221 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6221 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 6277 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6277 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 6280 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6280 : Symbol not previously defined (STATUS)
    Loaded C:\pbp\Files\blink.COD.
    BUILD SUCCEEDED: Thu May 29 15:04:55 2008

    Best Regards,

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Seems weird... few post above your files showed a V2.40 file but with a 2.45 compiler. Did you tried to delete the whole PBP folder then re-install it?

    It also seems your MPLAB installation is not that right. Make sure you have followed the info on previous Bruce's link.

    You don't have to add/include any extra file in your project apart the .BAS, PBP will do it at compile time. Only one file have to be listed in the Project view window.

    It also seems you haven't selected the right PIC when bulding your Project, hence the Processor ReDefinition.
    Last edited by mister_e; - 29th May 2008 at 21:30.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HOTLNC View Post
    Noted. My .bas files looks like this:
    Which .bas file is this? 'cause somehow I get the feeling like your messing with the wrong .bas file.

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Question

    Hi,

    just verify ( mouse over is enough ) in the MPLAB menu : Project\remove file

    that there is ONLY 1 file : Blink.bas ... with only Bruce's lines ...

    BTW could you give us what files are in the VIEW\project\ source files window ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  12. #12
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Here's an MPLAB v8.02 project with everything setup. It blinks an LED on RB0, has the watch window, logic analyzer, etc.

    Make a sub-directory in C:\PBP\MPSIM. Unzip it into the MPSIM sub-directory. Start MPLAB, open the project and give it a shot.

    Note: I would start with a clean install of PBP if you have altered any of the default PBP device includes, .bas, or other system files. You will also want to download the MPLAB/PBP registration files from the link I posted previously. Run the registration .bat file, then start MPLAB.

    All you need to run PBP in MPLAB/MPSIM is the .bas file YOU create. You don't need to cut & paste anything from PBP system files into your program code and you don't need to copy any of the MPLAB device include files into your PBP directory. The MPLAB project window should show only your .bas file. No other files are needed.

    If the P18F442.INC include file can't be found at compile time, then check that you have set the path to MPLAB as noted in the link above showing how to setup PBP with MPLAB.
    Attached Files Attached Files
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  13. #13
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    OK, I'll give it a shot.

    This is above and beyond, guys. Thanks!

  14. #14
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Ok. I reran the BAT file. I used a clean copy of all the .BAS and .INC files.

    Using the above attached project, here is the output file:

    Executing: "C:\pbp\PBPW.EXE" -ampasmwin -oq -z -v -p18F442 "BLINK.BAS"
    PicBasic Pro Compiler 2.45a, (c) 1998, 2004 microEngineering Labs, Inc.
    All Rights Reserved.
    Pass 1:
    Pass 2:
    Code Gen:
    Macro Pass:
    mpasmwin /q C:\pbp\MPSIM\BLINK.ASM
    COD Pass:
    Warning[223] C:\PBP\P18F442.INC 18 : Redefining processor.
    Warning[221] C:\PBP\P18F442.INC 18 : Invalid message number (65417)
    Error[113] C:\PBP\18F442.INC 20 : Symbol not previously defined (_CONFIG1H)
    Warning[230] C:\PBP\18F442.INC 20 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[126] C:\PBP\18F442.INC 20 : Argument out of range (not a valid config register address)
    Error[113] C:\PBP\18F442.INC 21 : Symbol not previously defined (_CONFIG2H)
    Warning[230] C:\PBP\18F442.INC 21 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[126] C:\PBP\18F442.INC 21 : Argument out of range (not a valid config register address)
    Error[113] C:\PBP\18F442.INC 22 : Symbol not previously defined (_CONFIG4L)
    Warning[230] C:\PBP\18F442.INC 22 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
    Error[126] C:\PBP\18F442.INC 22 : Argument out of range (not a valid config register address)
    Error[113] C:\PBP\MPSIM\BLINK.ASM 61 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\MPSIM\BLINK.ASM 63 : Symbol not previously defined (PORTC)
    Error[113] C:\PBP\MPSIM\BLINK.ASM 65 : Symbol not previously defined (TRISB)
    Error[113] C:\PBP\MPSIM\BLINK.ASM 67 : Symbol not previously defined (TRISC)
    Error[113] C:\PBP\PBPPIC18.LIB 6219 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6219 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 6221 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6221 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 6277 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6277 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 6280 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 6280 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 551 : Symbol not previously defined (TRISB)
    Error[113] C:\PBP\PBPPIC18.LIB 551 : Symbol not previously defined (TRISB)
    Error[113] C:\PBP\PBPPIC18.LIB 886 : Symbol not previously defined (TRISB)
    Error[113] C:\PBP\PBPPIC18.LIB 596 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 596 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 632 : Symbol not previously defined (C)
    Error[113] C:\PBP\PBPPIC18.LIB 632 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 596 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 596 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 630 : Symbol not previously defined (Z)
    Error[113] C:\PBP\PBPPIC18.LIB 630 : Symbol not previously defined (STATUS)
    Error[113] C:\PBP\PBPPIC18.LIB 551 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\PBPPIC18.LIB 551 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\PBPPIC18.LIB 906 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\PBPPIC18.LIB 551 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\PBPPIC18.LIB 551 : Symbol not previously defined (PORTB)
    Error[113] C:\PBP\PBPPIC18.LIB 908 : Symbol not previously defined (PORTB)
    Loaded C:\pbp\MPSIM\BLINK.COD.
    BUILD SUCCEEDED: Fri May 30 09:00:36 2008
    Last edited by HOTLNC; - 30th May 2008 at 15:05. Reason: Added info.

  15. #15
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    I ran your project without hitting the build key and it simulates/works great.

    Something is wrong on my end, for sure.

  16. #16
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Warning[223] C:\PBP\P18F442.INC 18 : Redefining processor.

    P18F442.INC is not a header file that should be in your PBP directory. These get installed
    when you install MPLAB, in the MPASM Suite directory.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  17. #17
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Warning[223] : Redefining processor.
    Hi Bruce,
    Where do you find the list of these warnings, as to their meanings? Are they in the individual inc. files?
    Thank You
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  18. #18
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    In MPLAB Help>> Topic>> MPASM Assembler >> MPASM Assembler >> Errors, Warnings...>> Assembler Errors

    Look in \PBP folder, on a regular PBP installation, you don't have pXXxXXXX.INC file over there, but XXxXXXX.INC files
    Last edited by mister_e; - 30th May 2008 at 17:32.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  19. #19
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Joe,

    Errors & warnings generated by MPASM can be found in the MPASM help file. If you're
    using the PM assembler, look in PM.TXT in your PBP install directory.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  20. #20
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    Warning[223] C:\PBP\P18F442.INC 18 : Redefining processor.

    P18F442.INC is not a header file that should be in your PBP directory. These get installed
    when you install MPLAB, in the MPASM Suite directory.
    OK, I'll remove the P18F442 file from the PBP directory and make sure the path points to the same file in the MPLAB area.

    Thanks!

  21. #21
    Join Date
    May 2008
    Location
    Fort Worth Texas USA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    I finally got it guys.

    I could not get PBP to find the p18f442.inc file, even after making sure the path was pointing correctly. So I modified the 18f442.inc file and added the path to it.

    It now works without error.

    Thanks for all the hand holding.

Similar Threads

  1. help to program an PIC with MPLAB
    By mikmac in forum mel PIC BASIC
    Replies: 4
    Last Post: - 20th April 2009, 16:01
  2. Upgraded to MPLAB IDE 8.14 and now I'm stuck
    By BlueHairBob in forum General
    Replies: 2
    Last Post: - 20th August 2008, 01:15
  3. pbp --> mplab broken again
    By kenif in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th December 2006, 18:57
  4. Microcode Studio MPLAB support
    By jbpaul in forum General
    Replies: 1
    Last Post: - 27th November 2006, 06:55
  5. Microcode Studio Plus compile/assmebly errors
    By mikehagans in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th February 2006, 21:31

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