* Ask for help about fsl ppc toolchian issue "Illegal instruction"
@ 2014-03-25 2:17 许久成
2014-03-25 5:31 ` wyang
0 siblings, 1 reply; 3+ messages in thread
From: 许久成 @ 2014-03-25 2:17 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
[-- Attachment #1: Type: text/plain, Size: 3222 bytes --]
Hi All,
We run into an issue when use e500mc toolchain g++ to compile c++ code for p2020 platform, the code as below:
main.c
#include <iostream>using namespace std;
int main(void) { cout << "asdfasdfasdfasdf";
return 0;}
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 the console prints the error log "Illegal instruction".
It is all right on p2041 platform.
The version of toolchian:
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-128Thread model: posixgcc version 4.6.2 (GCC)
Is e500mc family downward compitible with e500v2? C code can run correctly on p2020 with the e500mc toolchain.
Thanks & Best RegardsJiucheng
[-- Attachment #2: Type: text/html, Size: 3961 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ask for help about fsl ppc toolchian issue "Illegal instruction"
2014-03-25 2:17 Ask for help about fsl ppc toolchian issue "Illegal instruction" 许久成
@ 2014-03-25 5:31 ` wyang
2014-03-25 23:05 ` Scott Wood
0 siblings, 1 reply; 3+ messages in thread
From: wyang @ 2014-03-25 5:31 UTC (permalink / raw)
To: 许久成, linuxppc-dev@ozlabs.org
[-- Attachment #1: Type: text/plain, Size: 3735 bytes --]
On 03/25/2014 10:17 AM, 许久成 wrote:
> Hi All,
>
> We run into an issue when use e500mc toolchain g++ to compile c++
> code for p2020 platform, the code as below:
Hmm, p2020 should be e500 core rather than e500mc. Additionally, you
should use gdb to debug it, and check which instruction is illegal.
Thanks
Wei
>
>
> main.c
>
> #include <iostream>
> using namespace std;
>
> int main(void) {
> cout << "asdfasdfasdfasdf";
>
> return 0;
> }
>
> 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 the
> console prints the error log "Illegal instruction".
>
> It is all right on p2041 platform.
>
> The version of toolchian:
>
> 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
> Thread model: posix
> gcc version 4.6.2 (GCC)
>
> Is e500mc family downward compitible with e500v2? C code can run
> correctly on p2020 with the e500mc toolchain.
>
> Thanks & Best Regards
> Jiucheng
>
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
[-- Attachment #2: Type: text/html, Size: 5946 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ask for help about fsl ppc toolchian issue "Illegal instruction"
2014-03-25 5:31 ` wyang
@ 2014-03-25 23:05 ` Scott Wood
0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2014-03-25 23:05 UTC (permalink / raw)
To: wyang; +Cc: 许久成, linuxppc-dev@ozlabs.org
On Tue, 2014-03-25 at 13:31 +0800, wyang wrote:
>
> On 03/25/2014 10:17 AM, 许久成 wrote:
>
> > Hi All,
> >
> >
> > We run into an issue when use e500mc toolchain g++ to compile c++
> > code for p2020 platform, the code as below:
>
> Hmm, p2020 should be e500 core rather than e500mc. Additionally, you
> should use gdb to debug it, and check which instruction is illegal.
It's probably a floating point instruction. e500v2 (and thus p2020)
does not support normal PPC floating point. You need to use the right
toolchain.
-Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-25 23:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25 2:17 Ask for help about fsl ppc toolchian issue "Illegal instruction" 许久成
2014-03-25 5:31 ` wyang
2014-03-25 23:05 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).