Have I exceeded the capability or limitations of the compiler or MPLAB?


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Posts
    19

    Default Have I exceeded the capability or limitations of the compiler or MPLAB?

    Everything was going great until I got the following error using MPLAB V8.80 free version, PBP 2.60c, Long version of compiler.

    ERROR: Unable to execute mpasmwin.Error[126] C:\PBP\PBPPI18L.LIB 733 : Argument out of range (16780 not between 0 and 16383)
    Error[126] C:\PBP\PBPPI18L.LIB 804 : Argument out of range (16780 not between 0 and 16383)

    I thought I had a code error but it seems to be related to possibly code size, number of lines of code??
    Here is the assembler error.


    Name:  MPLAB_Error.jpg
Views: 791
Size:  18.3 KB


    I checked this by eliminating code and by copying/pasting/renaming some subroutines that are compiling without error.
    At some point as I add code I will get the error above.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Have I exceeded the capability or limitations of the compiler or MPLAB?

    From your description it sounds like you have filled your chip. You need a chip with more memory or optimize your code.

    Post the code and chip, maybe there will be some help.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jan 2010
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Have I exceeded the capability or limitations of the compiler or MPLAB?

    How can I determine the actual size of the code?
    The last working version that I have is a 35K Hex file but I don't know the actual binary code size.

    Quote Originally Posted by mackrackit View Post
    From your description it sounds like you have filled your chip. You need a chip with more memory or optimize your code.

    Post the code and chip, maybe there will be some help.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Have I exceeded the capability or limitations of the compiler or MPLAB?

    Goto your project directory and look for a *.LST file.
    Near the bottom of the file it will tell how much program memory is used/free.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Jan 2010
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Have I exceeded the capability or limitations of the compiler or MPLAB?

    I believe you are correct in your assumption.
    Here is the LST file info:
    All other memory blocks unused.
    Program Memory Bytes Used: 16376
    Program Memory Bytes Free: 8

    Errors : 2
    Warnings : 0 reported, 4 suppressed
    Messages : 0 reported, 17 suppressed

    The 18F2423 has 16KB Flash Program Memory.
    Is there a switch in the compiler or assembler for optimization and are there any reasons why I might not want to do that?
    I could switch to the 18F2523 at this point if I hacve to.

    Quote Originally Posted by mackrackit View Post
    Goto your project directory and look for a *.LST file.
    Near the bottom of the file it will tell how much program memory is used/free.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Have I exceeded the capability or limitations of the compiler or MPLAB?

    Is there a switch in the compiler or assembler for optimization
    No, the optimization is done by the person behind the keyboard.

    Again, if you post your code someone may be able to help.
    Dave
    Always wear safety glasses while programming.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Have I exceeded the capability or limitations of the compiler or MPLAB?

    I had a similar error recently. It was caused by a DEBUG statement that was missing a comma.
    I had intended the line to be
    DEBUG 13, 10, "text here", 13, 10 but it got entered as
    DEBUG 13, 10, "text here", 1310

    The compiler was expecting a byte value but it got a word instead.

    You may have a similar problem.

    Re: Argument out of range - how to find what is causing it?

    There is a simpler way.
    All the necessary information is in the .LST file. You need to search for "Argument out of range" and then scroll up many pages until you find the PBP statement that caused the problem.

    02247 ; C:\PWEE2011\10OCT2011\SEQUENCER VER BM 26 OCTOBER 2011_BU\SEQUENCER VER BM 26 OCTOBER 2011_111102_1512
    00.PBP 00733 debug 13, 10, "598", 1310 The text in red is the offending PBP statement at line 733 in the MCSPX file.

    HTH
    BrianT

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