<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">I was answering this thread while on an
      evening walk from my<br>
      phone. I seem to have deleted the last message in this thread<br>
      to answer to. :(<br>
      <br>
      On 5/1/2013 5:49 PM, Joel Sherrill wrote:<br>
    </div>
    <blockquote
      cite="mid:l1yhjl0sjbbt7ek1tt70bo0s.1367448377480@email.android.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <pre style="word-wrap:break-word; font-size:10.0pt; font-family:Tahoma; color:black">It could be another task exiting. You mentioned loading code.
</pre>
    </blockquote>
    You asked .. "how could I know?"<br>
    <br>
    The smart answer is that I am an original author of RTEMS dating<br>
    back to 1989. I tend to know the code which leads me on a long<br>
    response since I remembered more behavior than I could find<br>
    documentation for. :(<br>
    <br>
    The more proper answer is that this should be documented behavior. <br>
    But I am not finding it quickly in the users guide so we probably
    need<br>
    to discuss where to add more so it is obvious. I know it has been <br>
    discussed many times on the mailing list but that is not formal<br>
    documentation. So we have a task.. where would you have looked<br>
    for this information in the users guide?<br>
    <br>
    Classic API tasks have always been defined to cause a fatal error if<br>
    they return from their function body. In contrast, POSIX threads are<br>
    implicitly deleted.  This is the most obvious example of the
    differences<br>
    in the guiding philosophies that lead to the standards the APIs are<br>
    based upon.<br>
    <br>
    Even with this undocumented or hard to find, we always have the
    source<br>
    and that's what is great about open source software. The initial
    fatal error<br>
    output indicated the class of error and what is logically a
    sub-code. Each<br>
    fatal error in cpukit should be unique and in only one place in the
    code.<br>
    These are listed in cpukit/score/include/rtems/score/interr.h and if
    you<br>
    count down the enumeration and see what it was. You could grep and<br>
    that should put you in cpukit/score/src/threadhandler.c after the
    call<br>
    to invoke the user's task body.<br>
    <br>
    Sebastian Question/Task. Didn't you add a method to convert the<br>
    internal RTEMS fatal error causes into strings? Should the PowerPC<br>
    handler invoked here use it? What's a good example?<br>
    <br>
    Another question/task. There are no Doxygen comments for the<br>
    values of Internal_errors_Core_list. This needs to be fixed for
    Doxygen.<br>
    And we may want to consider how to include some information on<br>
    decoding the internal error occurred in the users guide in the fatal
    error<br>
    chapter.<br>
    <blockquote
      cite="mid:l1yhjl0sjbbt7ek1tt70bo0s.1367448377480@email.android.com"
      type="cite">
      <pre style="word-wrap:break-word; font-size:10.0pt; font-family:Tahoma; color:black">
Psim is a specific simulated hardware environment and does not as configured match any board. If you got addresses from a piece of real hardware, the addresses will not match. What target board's manual are you reading?

"Binkowski, Cassio" <a class="moz-txt-link-rfc2396E" href="mailto:cassioiks@gmail.com"><cassioiks@gmail.com></a> wrote:

</pre>
      <div>
        <div dir="ltr">Ok. 
          <div><br>
          </div>
          <div>1) The Init task is already deleting itself after loading
            the other tasks. Do I have to do something else?</div>
          <div><br>
          </div>
          <div>2) The memory for partitions came from the board data
            sheet. I based myself on the addresses mentioned there and
            followed upon. I was creating the first one starting at
            0x10000 and incrementing from that according to each
            partition's size.</div>
          <div><br>
          </div>
          <div>Can you help me set these 2 things up? I'm not really
            sure how to deal with that memory issue and the internal
            error as well.</div>
          <div class="gmail_extra"><br>
            <br>
            <div class="gmail_quote">On Wed, May 1, 2013 at 6:18 PM,
              Joel Sherrill <span dir="ltr">
                <<a moz-do-not-send="true"
                  href="mailto:Joel.Sherrill@oarcorp.com"
                  target="_blank">Joel.Sherrill@oarcorp.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                  <pre style="font-size:10.0pt;font-family:Tahoma;word-wrap:break-word">That address is invalid for psim. Where does the partition memory come from? Here I'd the memory keep for psim

<a moz-do-not-send="true" href="http://git.rtems.org/rtems/tree/c/src/lib/libbsp/powerpc/psim/startup/linkcmds" target="_blank">http://git.rtems.org/rtems/tree/c/src/lib/libbsp/powerpc/psim/startup/linkcmds</a>

"Binkowski, Cassio" <<a moz-do-not-send="true" href="mailto:cassioiks@gmail.com" target="_blank">cassioiks@gmail.com</a>> wrote:

</pre>
                  <div>
                    <div>
                      <div dir="ltr">I'm also getting the following
                        error when I uncomment the function that creates
                        10 partitions to be used by my application:
                        <div><br>
                        </div>
                        <div><i>core_find_mapping() - access to unmaped
                            address, attach a default map to handle this
                            - addr=0x1000d2c nr_bytes=0x4
                            processor=0xa8e5000 cia=0x1028c</i><br>
                        </div>
                        <div><i><br>
                          </i></div>
                        <div>Can you please help?</div>
                      </div>
                    </div>
                    <div>
                      <div class="gmail_extra"><br>
                        <br>
                        <div class="gmail_quote">On Wed, May 1, 2013 at
                          5:44 PM, Binkowski, Cassio <span dir="ltr">
                            <<a moz-do-not-send="true"
                              href="mailto:cassioiks@gmail.com"
                              target="_blank">cassioiks@gmail.com</a>></span>
                          wrote:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div dir="ltr">The file 'events.c' is inside
                              /gdb-7.5.1/sim/ppc.
                              <div><br>
                              </div>
                              <div>I am using psim-gdb testing my own
                                application, it's not an RTEMS example.</div>
                              <div><br>
                              </div>
                              <div>I managed to break right on it, and
                                it stops at:</div>
                              <div>../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:58<br>
                              </div>
                              <div><br>
                              </div>
                              <div>Signature is the following:</div>
                              <div>
                                <div>the_source=the_source@entry=INTERNAL_ERROR_CORE,
                                  is_internal=is_internal@entry=true, </div>
                                <div>    the_error=the_error@entry=5)</div>
                                <div><br>
                                </div>
                                <div>I have no clue of what it can be.
                                  Do you have any idea?</div>
                              </div>
                            </div>
                            <div>
                              <div>
                                <div class="gmail_extra"><br>
                                  <br>
                                  <div class="gmail_quote">On Wed, May
                                    1, 2013 at 5:37 PM, Joel Sherrill <span
                                      dir="ltr">
                                      <<a moz-do-not-send="true"
                                        href="mailto:Joel.Sherrill@oarcorp.com"
                                        target="_blank">Joel.Sherrill@oarcorp.com</a>></span>
                                    wrote:<br>
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex">
                                      <div>
                                        <pre style="font-size:10.0pt;font-family:Tahoma;word-wrap:break-word">Where is the file events.c?

Break at the fault handler printing that. 

Does this happen with any rtems provided examples?

Are you using the psim or psim-gdb script to run it?

"Binkowski, Cassio" <<a moz-do-not-send="true" href="mailto:cassioiks@gmail.com" target="_blank">cassioiks@gmail.com</a>> wrote:

</pre>
                                        <div>
                                          <div>
                                            <div>
                                              <div dir="ltr">Hi
                                                everyone,
                                                <div><br>
                                                </div>
                                                <div>I was just testing
                                                  my application using
                                                  PSIM and it is
                                                  returning the
                                                  following lines, right
                                                  after starting a Task:</div>
                                                <div><br>
                                                </div>
                                                <div>
                                                  <div><i>rtems-4.10.99.0(PowerPC/Generic
                                                      (classic
                                                      FPU)/psim) PANIC
                                                      ERROR 5</i></div>
                                                  <div><i>events.c:404:
                                                      assertion failed -
                                                      events->time_from_event
                                                      > 0</i></div>
                                                </div>
                                                <div><br>
                                                </div>
                                                <div>Has anybody
                                                  experienced this
                                                  before?</div>
                                                <div><br>
                                                </div>
                                                <div>Thanks.</div>
                                                <div>Cassio</div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                  <br>
                                </div>
                              </div>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Joel Sherrill, Ph.D.             Director of Research & Development 
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a>        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805 
Support Available                (256) 722-9985 </pre>
  </body>
</html>