<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 09/07/2018 07:47 AM, Hugues Jérôme
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:56822BBC-4546-44C7-9784-8F7F5BE50E5E@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Thanks Sebastian and Joel, we will try your suggestions
      <div class=""><br class="">
      </div>
      <div class="">I’ll see with partners what is feasible. I also
        suspect a difference of behaviour between dmon and grmon
        monitors when loading the program in memory</div>
      <div class=""><br class="">
      </div>
      <div class="">Note I may have been misleading somehow: </div>
      <div class="">our test program with a BSS of 1MB works perfectly
        fine, </div>
      <div class="">the exact same program, with a different set of size
        for our data has a BSS of 4MB, and crashes due to an alignment
        error at RTEMS start up.</div>
      <div class=""><br class="">
      </div>
      <div class="">The second seems to point to an unexpected behavior
        in the code setting the BSS</div>
    </blockquote>
    <br>
    Check that the external memory is working correctly, and that grmon
    has set the stack pointer to top of external SDRAM. With 1 MByte
    BSS, you might be executing completely from L2 cache, so you will
    never access external RAM. With 4 MByte, you will hit the external
    RAM and this might lead to failures if it is not working or
    initialized correctly. You might need to 'wash' the external memory
    before first use if it uses external EDAC, otherwise you will get
    spurious EDAC errors on byte writes. Use the wash command in grmon
    or similar.<br>
    <br>
    Also check that the program is linked to start address that is
    withing the RAM boundaries. Note that GR740 has start of SDRAM at
    address 0x0 while most leon2/3 systems has this at 0x40000000. A
    general leon3 binary will then not run properly on GR740 except when
    it fits in the L2 cache.<br>
    <br>
    Jiri.<br>
    <br>
    <blockquote type="cite"
      cite="mid:56822BBC-4546-44C7-9784-8F7F5BE50E5E@gmail.com">
      <div class=""><br class="">
      </div>
      <div class="">Regards</div>
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">Le 7 sept. 2018 à 07:39, Sebastian Huber <<a
                href="mailto:sebastian.huber@embedded-brains.de"
                class="" moz-do-not-send="true">sebastian.huber@embedded-brains.de</a>>
              a écrit :</div>
            <br class="Apple-interchange-newline">
            <div class=""><span style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">On 05/09/18 15:45, Hugues
                Jérôme wrote:</span><br style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <blockquote type="cite" style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                orphans: auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px;" class="">Hi Sebastian,<br
                  class="">
                <br class="">
                <blockquote type="cite" class="">Le 5 sept. 2018 à
                  14:20, Sebastian Huber <<a
                    href="mailto:sebastian.huber@embedded-brains.de"
                    class="" moz-do-not-send="true">sebastian.huber@embedded-brains.de</a>>
                  a écrit :<br class="">
                  <br class="">
                  Hello Hugues,<br class="">
                  <br class="">
                  On 05/09/18 14:02, Hugues Jérôme wrote:<br class="">
                  <blockquote type="cite" class="">Hi,<br class="">
                    <br class="">
                    I’m investigating a memory alignement issue using
                    the GR740 BSP.<br class="">
                    It appears we have a memory corruption when the BSS
                    is bigger than 4MB.<br class="">
                  </blockquote>
                  does the ELF file look all right? Is the stack pointer
                  at the end of RAM right at the entry point (start)? Is
                  the BSS section properly zeroed in the startup
                  sequence?<br class="">
                </blockquote>
                I’m not sure I can provide any positive answer to these
                questions.<br class="">
                We used the default GR740 BSP, compiled by Thanassis
                Tsiodras. We did not change anything<br class="">
                <br class="">
                As far as i can see, the BSS is zeroed by start.S<br
                  class="">
                do you have any recommendation to perform the diagnosis
                you prescribe ?<br class="">
              </blockquote>
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">I would check this with the
                debugger.</span><br style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <blockquote type="cite" style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                orphans: auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px;" class=""><br class="">
                As far as I can provide details<br class="">
                size (from binutils) can parse the ELF file, but that
                does not mean a lot<br class="">
                stack pointer is set by the linker script (if I
                understood correctly this part), and we did not change
                it<br class="">
              </blockquote>
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">The boot loader sets the
                stack pointer to the end of the usable RAM.</span><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">I would try to test this
                BSS size with a simple example program from the RTEMS
                testsuite using the RTEMS BSP build tree (configure the
                BSP build with --enable-tests=samples), e.g. modify the
                testsuites/samples/ticker program.</span><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">--<span
                  class="Apple-converted-space"> </span></span><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">Sebastian Huber, embedded
                brains GmbH</span><br style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">Address : Dornierstr. 4,
                D-82178 Puchheim, Germany</span><br style="font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;"
                class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">Phone   : +49 89 189 47
                41-16</span><br style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">Fax     : +49 89 189 47
                41-09</span><br style="font-family: Helvetica;
                font-size: 12px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                text-align: start; text-indent: 0px; text-transform:
                none; white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">E-Mail  :<span
                  class="Apple-converted-space"> </span></span><a
                href="mailto:sebastian.huber@embedded-brains.de"
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; orphans:
                auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px;" class=""
                moz-do-not-send="true">sebastian.huber@embedded-brains.de</a><br
                style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">PGP     : Public key
                available on request.</span><br style="font-family:
                Helvetica; font-size: 12px; font-style: normal;
                font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;"
                class="">
              <br style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Helvetica; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">Diese Nachricht ist keine
                geschäftliche Mitteilung im Sinne des EHUG.</span></div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@rtems.org">users@rtems.org</a>
<a class="moz-txt-link-freetext" href="http://lists.rtems.org/mailman/listinfo/users">http://lists.rtems.org/mailman/listinfo/users</a></pre>
    </blockquote>
    <br>
  </body>
</html>