Menu

Program is too large, can't fit subroutines

Help
2010-05-29
2013-05-30
  • Nobody/Anonymous

    Hi there, I seem to keep encounter this error in my program. It is a 16F88.
    The program is lengthy and it is unfinished. I am compiling with GCB v0.9 (20/4/2010)

    Error message is:
    "Error: Program is too large, cannot fit all subroutines into available program memory"
    Are there any methods to clear this error ? Any tips ?

    More info:
    Oh when I had previously encountered this, I added a wait 1 ms instruction and it solved it for that time being…
    At the moment it has 15 subroutines and 374 icons. Word datatypes are often used.
    ISIS reports that the program words were last recorded at 3294 words used.
    It also mentions "Read total of 6602 bytes from SerRx-Tx_GUI.hex".

    I just prodded the datasheet and it says 7168 Flash Program Memory, 4096 Single-Word Instructions.
    Am I nearing the hardware limitation… ?

    Also, where can I find Errors.txt ? It's not at my .gcb files nor at the installed directory (installed with GCGB).

    Thanks in advance, hope to hear from any of your soon

     
  • Nobody/Anonymous

    I think I solved it for my case, it was a subroutine in a subroutine in a subroutine…ish not too sure but removing a few nested subroutines makes it work.

     
  • Nobody/Anonymous

    Adding NOPs before/after the last added Command/Subroutine call works too sometimes…

     
  • Mauried

    Mauried - 2010-06-02

    Ive had this problem with the 16F88 when the program has crossed the 2048 page boundary, and found the wait statement seems to affect the outcome.
    Replacing lines such as wait 5 s , with wait 5000 ms fixed it.
    Also, if you are using hardware usart, and using the inbuilt commands that are contained in usart.h,
    these commands can add a lot of code to your asm file.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.