This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138: U-Boot standalone hello_world "undefined instruction"

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138

Hello,

I'm trying to run U-Boot (ti-staging 2021.01) on our Logic PD DA850 EVM reference.

I'm facing issues with the standalone hello_world program though.

First it seems the default CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 defined in arch/arm/config.mk is wrong for this board, I had to change it to 0xc1000000.

Shouldn't this value be already set in configs/da850evm_defconfig?
Is the OMAPL138 LCDK board working correctly with the default value?

The problem is then that an exception is triggered when starting the application:

[09:36:50:609] Filename 'hello_world.bin'.
[09:36:50:609] Load address: 0xc0000000
[09:36:50:609] Loading: *<0x08>#
[09:36:50:632] ⇥	 43 KiB/s
[09:36:50:632] done
[09:36:50:632] Bytes transferred = 580 (244 hex)
[09:36:50:632] U-Boot > go 0xc0000000
[09:36:51:893] ## Starting application at 0xC0000000 ...
[09:36:51:893] undefined instruction
[09:36:51:893] pc : [<c0000008>]⇥	   lr : [<c7f9c833>]
[09:36:51:893] reloc pc : [<b90e5008>]⇥	   lr : [<c1081833>]
[09:36:51:893] sp : c7e75810  ip : 0000001c⇥	 fp : c10b1768
[09:36:51:893] r10: deadbeef  r9 : c7e7aee0⇥	 r8 : c7f9b2a0
[09:36:51:893] r7 : 00000000  r6 : c0000000⇥	 r5 : c7e7c948  r4 : 00000002
[09:36:51:893] r3 : c0000000  r2 : c7e7c94c⇥	 r1 : c7e7c94c  r0 : 00000001
[09:36:51:893] Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32
[09:36:51:893] Code: 00000000 00000000 0005b570 000e0008 (f8d2f000)
[09:36:51:893] Resetting CPU ...
[09:36:51:909] 
[09:36:52:004] resetting ...

Isn't that an issue also on the OMAPL138 LCDK board?

I have bisected the code, it seems that This commit introduced the change.

It was indeed working fine on processor-SDK 06.03.00.106.
If I now disable Thumb build on recent U-Boot versions, hello_world does not crash anymore.
But this is not a solution for us, since memory is a real constraint here.

Thank you for your help!

Best regards,
Julien