AnsweredAssumed Answered

Undefined instruction in U-boot i.mx 6

Question asked by Mattis Asp on Apr 13, 2018
Latest reply on Apr 13, 2018 by igorpadykov

I am running a sabre development kit and quad core i.mx6 processor. 
I want to boot my own code, so I have compiled a piece of helloworld.c with the arm-fslc-linux-gnueabi-gcc 

I get a binary file, and xxd prints out the starting bytes for me

 

$ xxd hello.bin
00000000: 7f45 4c46 0101 0100 0000 0000 0000 0000    .ELF............
00000010: 0200 2800 0100 0000 1503 0100 3400 0000   ..(.........4...
00000020: f428 0000 0004 0005 3400 2000 0900 2800    .(......4. ...(.
00000030: 2500 2400 0100 0070 5404 0000 5404 0100   %.$....pT...T...
00000040: 5404 0100 0800 0000 0800 0000 0400 0000   T...............
00000050: 0400 0000 0600 0000 3400 0000 3400 0100   ........4...4...

 

after loading this binary over to u-boot address 0x20005000:

=> fatload mmc 1:4 0x20005000 hello.bin
11964 bytes read in 18 ms (648.4 KiB/s)
=> go 0x20005000
## Starting application at 0x20005000 ...
undefined instruction
pc : [<20005158>] lr : [<4ff71403>]
reloc pc : [<e7897158>] lr : [<17803403>]
sp : 4f56dd50 ip : 00000000 fp : 00000002
r10: 4f56f938 r9 : 4f56deb0 r8 : 4ffc3c40
r7 : 4ff713d9 r6 : 00000002 r5 : 20005000 r4 : 4f56f93c
r3 : 20005000 r2 : 4f56f93c r1 : 4f56f93c r0 : 00000000
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...

 

How can I troubleshoot this one?

Outcomes