Announcement

Collapse
No announcement yet.

errno=15

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

  • errno=15

    Because sometimes appears in yellow error:
    errno=15
    PC=812
    SP=147

  • #2
    Hello

    Error Number 15, as per the Diablo16 Internal Functions Manual, states:

    15 EVE Stack Overflow
    Infinitely recursive program or
    insufficient Stack Size

    Do you have a function in your code, calling another function, which calls another function etc, and never returns?
    Ie you are running out of Stack due to never returning from your function.

    Please post your code if you are unsure.

    Regards
    James

    Comment


    • #3
      yes, I have defined different mode menu screens in different functions, and only button on the menu exit goto to main function which is the principal function.

      Comment


      • #4
        If you load a function, you need to return from it, otherwise you will consume memory and never free it. You cannot load a function, load another function, load another function, forever...
        You need to change your code.
        James

        Comment


        • #5
          How can you return to a caller function?
          Can you indicate an example?

          Comment


          • #6
            You basically just 'drop out' of the main routine in the function, or use return if you want to return a value.

            The Picaso Designer, PICASO - DEMO folder and sum folders contain quite a few demos that call and return from functions.
            Mark

            Comment


            • #7
              Hi all.

              I have pretty much the same problem.
              In the main function of FLASH_BANK_0 I call

              i:= flash_Exec(FLASHBANK_1, buffer) ;

              I need to run program from flashbank_1. Sometimes when the program comes to this line, STACK OVERFLOW ERROR=15 accrues.
              What can I do to free some stack memory? The problem is, I'm working on a program that is larger than 32KB, so I need to use multiple FLASH BANKS. In the time when the program is in Flash bank 1, the timer in FLASH BANK 0 is still running. The timer is used for clock interrupt (1 second).

              What can i do?

              Best regards Ales Zupanc

              Comment


              • #8
                You can define more stack using
                #STACK nnn
                in your program to ovrride the default of #STACK 200

                Of course, increasing the stack size will only defer the error 15 if your program is really infinitely recusing
                Mark

                Comment

                Working...
                X