<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 03/25/2014 10:17 AM, 许久成 wrote:<br>
    </div>
    <blockquote cite="mid:BLU172-W4881D62A1C46E030116284FD650@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:微软雅黑
}
--></style>
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>We run into an issue when use e500mc toolchain  g++ to
          compile c++ code for p2020 platform,  the code as below:</div>
      </div>
    </blockquote>
    <br>
    Hmm, p2020 should be e500 core rather than e500mc. Additionally, you
    should use gdb to debug it, and check which instruction is illegal.<br>
    <br>
    Thanks<br>
    Wei<br>
    <blockquote cite="mid:BLU172-W4881D62A1C46E030116284FD650@phx.gbl"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <div>main.c</div>
        <div><br>
        </div>
        <div>
          <div>#include <iostream></div>
          <div>using namespace std;</div>
          <div><br>
          </div>
          <div>int main(void) {</div>
          <div>        cout << "asdfasdfasdfasdf";</div>
          <div><br>
          </div>
          <div>        return 0;</div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>compile it with command "powerpc-fls-linux-g++ main.c" and
          the output file's name is a.out, download the binary to
          p2020rdb board, but t<span style="font-size: 12pt;">he console
            prints the error log "Illegal instruction".</span></div>
        <div><br>
        </div>
        <div>It is all right on p2041 platform. </div>
        <div><br>
        </div>
        <div>The version of toolchian:</div>
        <div><br>
        </div>
        <div>
          <div>Configured with:
            /local/workspace/yocto-iso-make/p4080ds/build_p4080ds_release/tmp/work-shared/gcc-4.6.2+svnr180516-r29+fsl.6/gcc-4_6-branch/configure
            --build=i686-linux --host=i686-fslsdk-linux
            --target=powerpc-fsl-linux
            --prefix=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr
            --exec_prefix=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr
            --bindir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/bin/ppce500mc-fsl-linux
            --sbindir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/bin/ppce500mc-fsl-linux
            --libexecdir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/libexec/ppce500mc-fsl-linux
            --datadir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/share
            --sysconfdir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/etc
            --sharedstatedir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/com
            --localstatedir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/var
            --libdir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/lib/ppce500mc-fsl-linux
            --includedir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/include
            --oldincludedir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/include
            --infodir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/share/info
            --mandir=/opt/fsl/1.2/sysroots/i686-fslsdk-linux/usr/share/man
            --disable-silent-rules --disable-dependency-tracking
            --with-libtool-sysroot=/local/workspace/yocto-iso-make/p4080ds/build_p4080ds_release/tmp/sysroots/i686-nativesdk-fslsdk-linux
            --with-gnu-ld --enable-shared --enable-languages=c,c++
            --enable-threads=posix --disable-multilib --enable-c99
            --enable-long-long --enable-symvers=gnu
            --enable-libstdcxx-pch --program-prefix=powerpc-fsl-linux-
            --enable-lto --enable-libssp --disable-bootstrap
            --disable-libgomp --disable-libmudflap --with-system-zlib
            --with-linker-hash-style=gnu --enable-cheaders=c_global
            --with-local-prefix=/opt/fsl/1.2/sysroots/ppce500mc-fsl-linux/usr
            --with-gxx-include-dir=/opt/fsl/1.2/sysroots/ppce500mc-fsl-linux/usr/include/c++
            --with-build-time-tools=/local/workspace/yocto-iso-make/p4080ds/build_p4080ds_release/tmp/sysroots/i686-linux/usr/powerpc-fsl-linux/bin
            --with-sysroot=/opt/fsl/1.2/sysroots/ppce500mc-fsl-linux
            --with-build-sysroot=/local/workspace/yocto-iso-make/p4080ds/build_p4080ds_release/tmp/sysroots/p4080ds
            --disable-libunwind-exceptions --disable-libssp
            --disable-libgomp --disable-libmudflap
            --with-mpfr=/local/workspace/yocto-iso-make/p4080ds/build_p4080ds_release/tmp/sysroots/i686-nativesdk-fslsdk-linux
            --with-mpc=/local/workspace/yocto-iso-make/p4080ds/build_p4080ds_release/tmp/sysroots/i686-nativesdk-fslsdk-linux
            --enable-nls --enable-__cxa_atexit --with-long-double-128</div>
          <div>Thread model: posix</div>
          <div>gcc version 4.6.2 (GCC) </div>
        </div>
        <div><br>
        </div>
        <div>Is e500mc family downward compitible with e500v2? C code
          can run correctly on p2020 with the e500mc toolchain.</div>
        <div><br>
        </div>
        <div>Thanks & Best Regards</div>
        <div>Jiucheng</div>
        <div><br>
        </div>
        <div> </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Linuxppc-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Linuxppc-dev@lists.ozlabs.org">Linuxppc-dev@lists.ozlabs.org</a>
<a class="moz-txt-link-freetext" href="https://lists.ozlabs.org/listinfo/linuxppc-dev">https://lists.ozlabs.org/listinfo/linuxppc-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>