Running out of Code Space - or so it seems


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257

    Angry Running out of Code Space - or so it seems

    <b>I'm getting a compile error with PBP on my 16F88.</b>

    Apparently my code <i>crosses boundary @ 800H.</i> This is the error msg that MCC brings up after the compile.

    Now the 16F88 has programming memory for 4096 word instructions, yet when I compile, MCC calculates that I've used a little over 2000 words.

    <font color='red'>This is well short of the 4096 limit.</font>

    If I <i>REM</i> out a few lines of code, the error msg goes away.

    <h3>Any Ideas?</h3>
    Squib.

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Squibcakes
    I'm getting a compile error with PBP on my 16F88.

    Apparently my code crosses boundary @ 800H. This is the error msg that MCC brings up after the compile.
    Are you sure it is an error an not just the standard (i.e., normal) warning about crossing page boundaries? It sure sounds like the latter to me. Please confirm.

    Paul Borgmeier
    Salt Lake City, Utah
    USA

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    I have never used that chip nor am I an expert but I have gotten this message before on other chips. This message is only a notificaiton and should have no ill effects on the operation. This is also discussed in the PBP manual. There is always a "but" and this case is no different....someone with more experience can probably chime in and explain it better. There can be an issue on how your program is set up because it may be on a different stack. Personally, I have never experienced any issues with this type of notification but I really wouldn't call it an error.

    Chris

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Warning (and other Compilation Error) Messages
    http://www.picbasic.co.uk/forum/showthread.php?t=555

    Crossing Page Boundary - Solution
    http://www.picbasic.co.uk/forum/showthread.php?t=40
    <br>
    DT

  5. #5
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Thanks D.T.

    Learning all the time

    Squib

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    You can find out just how big your code really is by looking at the HEX file. The first two HEX digits gives the number of bytes in the line. This will usually be "10" (16 bytes). Digits 3,4,5 & 6 give the load address of the first byte on that line. Scroll down to the bottom of the HEX file, and see what the last address is. Compare that with the memory map of the device and you will always know where you stand - at least when it comes to filling up the device.
    Charles Linquist

Similar Threads

  1. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  2. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. Embedded Strings in your Code Space
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 9th March 2008, 07:50
  5. TOGGLE code space and ICD
    By duncan303 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th October 2006, 16:08

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