Announcement

Collapse
No announcement yet.

Crossing page boundary messages upon compile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Crossing page boundary messages upon compile

    I have developed a program for the PIC16F722 and it has been generally running as designed but I need to make a few tweaks. Now when I begin to add program lines and compile I'm getting "crossing page boundary" errors I believe from the assembler. I am rally out of my depth on this kind of problem. MicroCode reports the error and makes an assembly file line reference I think but I have no way to remedy the error.

    I can submit the code but first I would like to know whether this error is easily fixed.

  • #2
    Do you have a lengthy SELECT CASE? I ran into that with long ones. I did an IF/THEN, "IF VAR < 100 THEN : GOSUB Select_Low : ELSE : GOSUB Select_Hi" or something to that effect, breaking the long SELECT CASE down into 2 or more smaller (page sized) ones. Your page is probably 256 bytes (in ASM bytes).
    We can crack this cotton PIC'n thang!

    Comment


    • #3
      "Crossing page boundary" is usually just a warning, not an error. It only applies to inline Assembly and some older commands like BRANCH. Is the compilation being aborted?
      Charles Leo
      ME Labs, Inc.
      http://melabs.com

      Comment


      • #4
        The program makes use of HPWM in about 8 locations, some If/else constructs, LCD out, and polls some button pins and reed switches with pullups using While statements.

        A key element is that there are four DC motors (one in each of 4 HO scale trolleys) which require different settings due to their respective running characteristics. Subroutines at the end of the code set 8 settings depending on which vehicle is being run at the time. This application is an automation system which runs the vehicle on the track between stations for a user-set number of trips and for a user-set passenger load time. One alternative to all the variable setting I thought might work is to use a Lookup table but three values must be passed to a Pause statement parameter and I am not yet sure if this would work. The Pause parameters (BDW, BDE & BDY) are defined as "Word" types to contain the large values.

        The program runs flawlessly as is until I add the Lcdout line which displays the vehicle name. I thought this a useful addition in the application. It just happens that it doesn't matter where I add a line like this (I did so in the main program sequence also) the same error results.

        Incidentally, the compile FAILS to complete.

        I have included a screen clip:

        Click image for larger version

Name:	error1.jpg
Views:	31
Size:	61.5 KB
ID:	7690

        TrolleyControl II.pbp




        Comment


        • #5
          It appears that my upload of the .pbp and .rtf files failed. As this may have happened for security reasons, I'll attach it as a .txt file. Sorry the formatting got a bit wonky.

          TrolleyControl II.txt

          Comment


          • #6
            the error message is

            Code:
            Message[306] C:\PBP3\PBPPIC14.LIB 663 : Crossing page boundary -- ensure page bits are set.
            [ASM ERROR] Argument out of range (2075 not between 0 and 2047) (0) : Error[126]
            Message[306] C:\PBP3\PBPPIC14.LIB 745 : Crossing page boundary -- ensure page bits are set

            the crossing page boundary is not the error its the argument out of range thats the problem
            you have run out of space on the chip, it's full

            Comment


            • #7
              That one means that you've exceeded the available code space with your program. You need a chip with more code space.
              Charles Leo
              ME Labs, Inc.
              http://melabs.com

              Comment


              • #8
                While that isn't good news per-se, it is important news. There was a niggling thought in the back of my mind that this was the case but I had no way of confirming it.

                Thanks.

                Comment

                Working...
                X