Undefined instruction in U-boot i.mx 6

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

Undefined instruction in U-boot i.mx 6

1,645 Views
mattisasp
Contributor II

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?

Labels (2)
Tags (1)
0 Kudos
1 Reply

1,059 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mattis

one can check linker file to check that "go" corresponds to start:

in application code. Also may be useful to check sect.8.7.1 Image Vector Table and Boot Data

i.MX6UL Reference Manual

http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf

and look at baremetals examples in SDK:

Github SDK
https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK 

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

0 Kudos