Announcement

Collapse
No announcement yet.

Compiler message [306]

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

  • Compiler message [306]

    Hello friends
    I receive this message from compiler

    Message[306] C:\PBP3\PBPPIC14.LIB 663 : Crossing page boundary -- ensure page bits are set.
    Message[306] C:\PBP3\PBPPIC14.LIB 745 : Crossing page boundary -- ensure page bits are set.

    I searched Reference Manual but I did not find what is to blaim
    Please help me

  • #2
    It's just a warning that can usually be ignored.
    Program space on 14-bit cores are broken up into 2K "Pages", and it is telling you that the program is bigger than 2K.

    If you are using the BRANCH command in your program, you should change it to BRANCHL.
    Or if you have assembly language code in your program, you have to set the page bits before any goto or call's in the ASM.

    If neither of the above apply to your program, you can add this to the top of your code to suppress the warnings.
    Code:
    @ ERRORLEVEL -306
    PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
    Never download a PIC datasheet from anywhere but microchip.com

    Comment


    • #3
      more page bit questions

      if you are using a USERCOMAND That has ASM routines in it should page bits be set ?
      Does it matter where asm routines are placed in your code eg if they are always at the begining of your code will pbp calls always select page 0 ?
      can you give us an example of setting page bits before an asm routine call
      i'm not sure wether the asm routine should do it or the pbp code

      Comment


      • #4
        Especially with USERCOMMANDs.

        The USERCOMMAND creates the code, but you have no idea where that code will end up when it gets used later on.

        Fortunately, PBP has macro's to handle page/bank switching for you.

        L?CALL
        L?GOTO
        LABEL?L
        RST?RP
        CHK?RP

        Look them up in the .lib and .mac files for PBP.
        Then if you have questions, post in the ASM forum please.
        PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
        Never download a PIC datasheet from anywhere but microchip.com

        Comment


        • #5
          I used the command @ ERRORLEVEL -306
          and I do not receive the Message[306]

          thank you very much for the help
          Last edited by dovegrup; 04-28-2012, 11:37 PM.

          Comment

          Working...
          X