Announcement

Collapse
No announcement yet.

Error msg displayed when running program

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

  • Error msg displayed when running program

    I'm trying my first program on my 32028 display.
    My program runs for a few seconds, then displays

    error 15
    PC=1164, v1=0, v2=0

    Then after a short time, the screen blanks.
    I figure this must mean the runtime is hitting a bug in my program, but I can't seem to find any documentation on what the error message means.

  • #2


    PICASO-GFX2-4DGL-Internal-Functions-rev2.pdf

    Appendix B : Runtime Error Messages

    15 EVE Stack Overflow


    Too much recursion, perhaps?
    Mark

    Comment


    • #3


      The fun part is that there is NO recursion.
      I had to do a LOT of debugging with printing msgs to the screen to trace down where this is happening, and it still doesn't make sense.
      When I run the program, it goes through this function once, then either reboots or displays the error message.

      HTML Code:
          switch
      case (ch == 'd') // Ascii data
      err := readUntilNewline();
      -->execution does reach here
      break;
      
      case (ch == 'D') // Binary data
      err := readBinaryPacket();
      break;
      
      case (ch == 'E') // Error message
      err := serin();
      rcvData[0] := serin();
      break;
      
      case (ch == 'R') // Command response
      err := readUntilNewline();
      break;
      
      case (ch == 'S') // Shutdown notification
      err := readUntilNewline();
      break;
      
      case (ch == 'V') // 12v supply voltage
      err := readUntilNewline();
      break;
      
      default: // Unknown
      command := 0;
      err := UNKNOWN_PACKET;
      break;
      endswitch
      
      -->execution never reaches here
      It makes no sense to me.

      Comment


      • #4


        yes it appears there is a bug in the compiler, switch code is failing. We will be working on it soon to try and resolve. In the mean time, convert to if / else if construct and remove the breaks for a temporary work around. The compiler should be converting the case statement to exactly that (if / else if) under the hood, however there is a gremlin there somewhere.
        Regards,
        Dave

        Comment


        • #5


          I thought I'd also add ive had lots of problems with switch cases as well. Many strange errors like, sometimes in the compiler, a specific case gets highlighted blue... I have no idea why it is either..only happens when i click a couple lines. Other errors are annoying "duplicate case value 0" errors which seem unfixable.. hopefully these problems get fixed since switch case can save typing

          Comment


          • #6


            I'm in the same case, I couldn't implement any switch case.

            any update on a fix for the picaso gfx2 ? (aside of the if/else tweaking) ? I'm using the r22 pmmc on a uOLED 32028

            thanks

            Comment


            • #7


              What is the size of the stack in PICASO GFX? What exactly #STACK 100 does in workshop?
              Thanks

              Comment


              • #8


                The default stack size is 200 words. If you look at the end of the *.aux file, you will see a report from the compiler that gives a worst case estimate of the run-time requirement:-
                eg

                [STACKSIZE]
                0 (AUTO)
                [STACK_ESTIMATE]
                58 (nb:- worst case estimate)

                The compile is unaware of what calls what, so it assumes the rule 'no recursion and maximum nesting'

                Now if you are calling disk functions, or have some kind of recursive process, you may need to manually calculate the stack requirement and make the adjustment using the #STACK directive.

                A general rule of thumb to keep a mental tally as you go is:
                1] A function call requires 10 words of stack space
                2] Any local variable and arrays are placed on the stack for the duration of the function call
                3] Internal EVE functions also share the stack, so its wise to assume that the operating system will always be using up to 100 words.
                4] If a child process (any functions are called from disk), the child stack requirements must be added to the parent stack size because the stack is shared by all processes.
                Regards,
                Dave

                Comment

                Working...
                X