Userspace app run error

cancel
Showing results for 
Search instead for 
Did you mean: 

Userspace app run error

1,765 Views
hawkinzhang
Contributor I

Hi,NXP

 I build toolchain in /QorIQ-SDK-V2.0-20160527 by fellow command:

  1. bitbake fsl-image-full
  2. bitbake fsl-toochain

Then i get toolchain SDK in folder : QorIQ-SDK-V2.0-20160527-yocto/build_ls1043ardb/tmp/deploy/sdk

Then i install toolchain by follow command:

  1.  ./fsl-qoriq-glibc-x86_64-aarch64-toolchain-2.0.sh
  2. cd /opt/hazhang/fsl_ls1043_arm_sdk2.0_64bit
  3. source environment-setup-aarch64-fsl-linux

Then i build my test app helloworld by toolchain:

  1. $CC hello.c -o hello
  2. file hello
    hello: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.14.0, BuildID[sha1]=d041641cf48b10fdd9751fa115a24eb1aedd346d, not stripped

Then i copy hello to NXP's board : LS1043ARDB

./hello  but failed,trace as fellow:

  1. file hello
    hello: ERROR: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1 error reading (Invalid argument)
  2. ./hello
    [  836.521179] hello[2765]: unhandled level 2 translation fault (11) at 0x00000008, esr 0x92000006
    [  836.529871] pgd = ffff8000742c7000
    [  836.533277] [00000008] *pgd=00000000f42c4003, *pud=00000000f42a2003, *pmd=0000000000000000
    [  836.541542]
    [  836.543025] CPU: 0 PID: 2765 Comm: hello Not tainted 4.1.8-rt8+ge89664e #1
    [  836.549887] Hardware name: LS1043A RDB Board (DT)
    [  836.554586] task: ffff800074fd0f00 ti: ffff800020f50000 task.ti: ffff800020f50000
    [  836.562066] PC is at 0xffff7a07b610
    [  836.565544] LR is at 0xffff7a0727a4
    [  836.569021] pc : [<0000ffff7a07b610>] lr : [<0000ffff7a0727a4>] pstate: 60000000
    [  836.576410] sp : 0000fffff054f2b0
    [  836.579712] x29: 0000fffff054f2f0 x28: 0000ffff7a09b000
    [  836.585022] x27: 0000000000000001 x26: 0000ffff7a09c000
    [  836.590325] x25: 0000000000000000 x24: 0000ffff7a087150
    [  836.595635] x23: 0000ffff7a09d190 x22: 0000000000410650
    [  836.600944] x21: 0000ffff7a09d190 x20: 0000fffff054f2b0
    [  836.606247] x19: 0000ffff7a09d190 x18: 0000000000000000
    [  836.611556] x17: 0000ffff7a0840d4 x16: 0000ffff7a09c000
    [  836.616860] x15: 0000000000000000 x14: 0000fffff054f530
    [  836.622168] x13: 0000000000400000 x12: 0000000000000002
    [  836.627472] x11: 0000000000000006 x10: 7f7f7f7f7f7f7f7f
    [  836.632782] x9 : feff38322d352d31 x8 : 0000000000000030
    [  836.638086] x7 : ffffffffffffffc8 x6 : 0000000000000020
    [  836.643397] x5 : 0000000000000002 x4 : 0000fffff054f2f0
    [  836.648700] x3 : 0000000000000002 x2 : 0000fffff054f2b0
    [  836.654009] x1 : 0000000000000000 x0 : 0000000000000000
    [  836.659312]
    Segmentation fault

Thanks for yout attention!

0 Kudos
4 Replies

256 Views
Pavel
NXP TechSupport
NXP TechSupport

Perhaps you use tftp for elf file transfers.

 

The tftp32 software as tftp server under Windows uses binary transfers.

The LS1043ARDB tftp client default mode is "netascii".

Different modes between TFTP server and TFTP client produce incorrect data transfers.

Check MD5 checksum on your board and on your PC.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

256 Views
jielezhao
Contributor I

thanks a lot , This is exactly the problem!

0 Kudos

256 Views
Pavel
NXP TechSupport
NXP TechSupport

It looks like that there is a error in your "hello" program.

Check your code. For example see below message if simple "Hello World" program is used:

 

file test.elf

test.elf: ELF 64-bit LSB  executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.14.0, BuildID[sha1]=36edfe9836908527be085de3aefafa67dea93c12, not stripped


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

256 Views
jielezhao
Contributor I

hi Pavel:

   I have met the same problem mentioned by zhang. My demo board is also LS1043, all my operations are same as his. I have checked my "helloword" :

#include <stdio.h>

int main()
{
         printf("hello world !\n");

         return 0;
}

obviously there is no error in my program , I  wonder how to solve this problem .

Thanks for yout attention!

0 Kudos