Compiling for 18F26K22 - Does anyone have a solution for me?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    May 2011
    Location
    Bangalore, India
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Compiling for 18F26K22 - Does anyone have a solution for me?

    Sorry, the error message file was not attached. The 21 messages from MCS are shown below.


    Error[32] c:\pbp\18f26k22.inc 18 : Unknown processor [18F26K22]
    Message]301] c:\mpasm\p18f26k22.inc 33 : MESSAGE: (Processor-header file-header file mismatch. Verify selected processor.)
    Error[131] c:\pbp\18f26k22.inc 20 : Processor type is undefined
    Error[131] c:\pbp\18f26k22.inc 21 : Processor type is undefined
    Error[131] c:\pbp\18f26k22.inc 22 : Processor type is undefined
    Warning[207] c:\pbp\pbppic18.lib 1237 : Found label after column1. (goto)
    Error[122] c:\pbp\pbppic18.lib 1237 : Illegal opcode (INIT)
    Error[122] c:\pbp\pbppic18.lib 6584 : Illegal opcode (clrf)
    Error[122] c:\pbp\pbppic18.lib 6585 : Illegal opcode (movwf)
    Error[122] c:\pbp\pbppic18.lib 6586 : Illegal opcode (clrf)
    Warning[207] c:\pbp\pbppic18.lib 6587 : Found label after column1. (decf)
    Error[122] c:\pbp\pbppic18.lib 6587 : Illegal opcode (R1)
    Warning[207] c:\pbp\pbppic18.lib 6588 : Found label after column1. (subwfb)
    Error[122] c:\pbp\pbppic18.lib 6588 : Illegal opcode (R1)
    Warning[207] c:\pbp\pbppic18.lib 6589 : Found label after column1. (btfss)
    Error[122] c:\pbp\pbppic18.lib 6589 : Illegal opcode (STATUS)
    Warning[207] c:\pbp\pbppic18.lib 6590 : Found label after column1. (goto)
    Error[122] c:\pbp\pbppic18.lib 6590 : Illegal opcode (DUNN)
    Warning[207] c:\pbp\pbppic18.lib 6591 : Found label after column1. (movlw)
    Error[108] c:\pbp\pbppic18.lib 6591 : Illegal character (0
    too many errors

    - Bala

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,623


    Did you find this post helpful? Yes | No

    Default Re: Compiling for 18F26K22 - Does anyone have a solution for me?

    Hi,
    According to the version history support for the 18F26K22 was added in 2.60A so you should be OK. Is it possible that you have multiple versions of the compiler installed and that MCS is pointed to an older version without support for the 18F26K22?

    If that's not the case I'd probably try reinstalling MPLAB. Perhaps the file you copied isn't compatible with the version of MPASM you're trying to use with - the error message seems to indicate something in that direction.

    /Henrik.

  3. #3
    Join Date
    May 2011
    Location
    Bangalore, India
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Compiling for 18F26K22 - Does anyone have a solution for me?

    Thanks Henrik, for your helpful suggestion.

    The compiler is installed in C:\MPASM and there is no other version residing anywhere else. MCS also shows under 'Compile and Program Options' that the assembler is located in this folder.

    I installed MPLAB 8.87 today precisely for the purpose of getting the "P18F26K22.INC" file which I copied on to C:\MPASM folder. Yes, there is a possibility that this inc file is not compatible with the MPASMWIN.EXE (from MELabs) that I am using. So I copied the MPASMWIN.EXE file provided by MPLAB to my C:\MPASM folder and tried to compile. But no luck, I get similar error messages and compiling is not successful.

    - Bala

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,623


    Did you find this post helpful? Yes | No

    Default Re: Compiling for 18F26K22 - Does anyone have a solution for me?

    Hi,
    Since you now have MPLAB 8.87 installed make sure you point MCS to the MAPSMWIN.EXE installed with THAT version instead of the "original" (or copied) one in C:\MPASM, there might be other support files in the new MPLAB installation that's needed so simply copying the "new" MPASMWIN.EXE into the old installation might not be enough.

    If all fails uninstall ALL MPLAB installations and reinstall 8.87 to its default location (don't just install MPASM), then make sure the assembler selction in MCS points to that location.

    /Henrik.

  5. #5
    Join Date
    May 2011
    Location
    Bangalore, India
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Compiling for 18F26K22 - Does anyone have a solution for me?

    Hi Henrik,

    Thanks a million. Tried your suggestion and it worked like a charm! You hit the nail on the head.

    I changed the assembler folder in MCS from C:\MPASM where Mpasm 5.2 from MELabs was installed, to C:\Program Files (x86)\Microchip\Mpasm suite and hit the Compile button. After a few seconds, I saw in the left hand bottom corner that pleasant message "Success: 134 bytes used."

    I got my 18F26K22 samples a year ago and at that time I tried to compile a program for this PIC trying different techniques, but finally gave up. Thanks for your help, now I can look forward to spending several hours playing with this PIC.

    Regards,
    Bala

Members who have read this thread : 0

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