TWR-P1025 Illegal Instruction

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TWR-P1025 Illegal Instruction

485 Views
polarg
Contributor I

Hi, I am using TWR-P1025 board to demo an application.

Before running the application, I upgrade the Linux SDK to V1.9. Then I cross-compile my application. But when I run the application in the board, it crash with 'unhandled signal 4 at 1060c01c lr 105edf34 code 30001 Illegal instruction'.

When I cross-compile the application, I did not use the script supplied with the tutorial to setup the environment. I used a cmake toolchain file to setup it. The content is as below and is there any problem in it?

Thanks

CMake Toolchain File:

set(CMAKE_SYSTEM_NAME Linux)

set( CMAKE_SYSROOT "/opt/poky/1.6.1/sysroots/ppce500v2-poky-linux-gnuspe" )

include_directories( SYSTEM "/opt/poky/1.6.1/sysroots/ppce500v2-poky-linux-gnuspe/usr/include/c++/powerpc-poky-linux-gnuspe" )

set( ENV{PATH} "$ENV{PATH}:/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-gnuspe" )

set( ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT} )

set( ENV{PKG_CONFIG_PATH} "${CMAKE_SYSROOT}/usr/lib/pkgconfig" )

set( ENV{CONFIG_SITE} "/opt/poky/1.6.1/site-config-ppce500v2-poky-linux-gnuspe" )

set( ENV{OECORE_NATIVE_SYSROOT} "/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux" )

set( ENV{OECORE_TARGET_SYSROOT} ${CMAKE_SYSROOT} )

set( ENV{OECORE_ACLOCAL_OPTS} "-I /opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/share/aclocal" )

set( ENV{PYTHONHOME} "/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr" )

set( ENV{AS} "powerpc-poky-linux-gnuspe-as " )

set( ENV{LD} "powerpc-poky-linux-gnuspe-ld  --sysroot=$SDKTARGETSYSROOT" )

set( ENV{GDB} "powerpc-poky-linux-gnuspe-gdb")

set( ENV{STRIP} "powerpc-poky-linux-gnuspe-strip" )

set( ENV{RANLIB} "powerpc-poky-linux-gnuspe-ranlib" )

set( ENV{OBJCOPY} "powerpc-poky-linux-gnuspe-objcopy" )

set( ENV{OBJDUMP} "powerpc-poky-linux-gnuspe-objdump" )

set( ENV{AR} "powerpc-poky-linux-gnuspe-ar")

set( ENV{NM} "powerpc-poky-linux-gnuspe-nm")

set( ENV{M4} "m4" )

set( ENV{TARGET_PREFIX} "powerpc-poky-linux-gnuspe-" )

set( ENV{CONFIGURE_FLAGS} "--target=powerpc-poky-linux-gnuspe --host=powerpc-poky-linux-gnuspe --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT" )

set( ENV{OECORE_DISTRO_VERSION} "1.6.1" )

set( ENV{OECORE_SDK_VERSION} "1.6.1" )

set( ENV{ARCH} powerpc )

set( ENV{CROSS_COMPILE} "powerpc-poky-linux-gnuspe-" )

set( CMAKE_C_COMPILER "/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-gnuspe/powerpc-poky-linux-gnuspe-gcc" )

set( CMAKE_CXX_COMPILER "/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux-gnuspe/powerpc-poky-linux-gnuspe-g++" )

set( CMAKE_C_FLAGS "-m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double -O2 -pipe -g -feliminate-unused-debug-types" )

set( CMAKE_CXX_FLAGS "-m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double -O2 -pipe -g -feliminate-unused-debug-types" )

Labels (1)
0 Kudos
Reply
0 Replies