0

yocto build 2.23 was succesfull and booted my renesas h3ulcb , cross-compiled an opencv application (2.4.13.7) using the sdk on the build system and when trying to execute the cross-compiled binary on the renesas the following error occurs.

However there are no errors while cross-compilation and application is running fine on ubuntu 16.04 but the following error occurs in the h3ulcb running poky 2.1.3

root@h3ulcb:/media/2.4.13_algo_target_# ./main_ 
Error! /media/2.[  617.588072] main_[3025]: unhandled level 2 translation fault (11) at 0x00000008, esr 0x92000006
4.13_algo_target[  617.599298] pgd = ffff8006f8d2a000
_/img/%04d.jpg N[  617.605155] [00000008] *pgd=00000007374cd003ot Found!
[  617.610668] , *pud=0000000737ad3003
, *pmd=0000000000000000[  617.618244] 
[  617.620895] 
[  617.623581] CPU: 0 PID: 3025 Comm: main_ Tainted: G           O    4.9.0-yocto-standard #1
[  617.633050] Hardware name: Renesas H3ULCB board based on r8a7795 (DT)
[  617.640712] task: ffff8006f77f7080 task.stack: ffff8006fab38000
[  617.647859] PC is at 0xffff9fb846c8
[  617.652572] LR is at 0x40498c
[  617.656751] pc : [<0000ffff9fb846c8>] lr : [<000000000040498c>] pstate: 80000000
[  617.665400] sp : 0000fffff3319350
[  617.669956] x29: 0000fffff3319360 x28: 0000000000000000 
[  617.676556] x27: 0000000000000000 x26: 0000000000000000 
[  617.683147] x25: 0000000000000000 x24: 0000000000000000 
[  617.689717] x23: 0000000000000000 x22: 0000000000000000 
[  617.696241] x21: 0000000000000000 x20: 0000000000000000 
[  617.702709] x19: 0000fffff3319630 x18: 0000000000000010 
[  617.709151] x17: 000000000041b510 x16: 0000ffff9fb846a8 
[  617.715568] x15: 0000000032e5d35c x14: 0000ffff9fb2bcb4 
[  617.721960] x13: 0000ffffa02f7000 x12: efeeedecebeae9e8 
[  617.728337] x11: 0000000000000008 x10: 0101010101010101 
[  617.734709] x9 : d7d6d5d4d3d2d1d0 x8 : 0000000000000040 
[  617.741077] x7 : c7c6c5c4c3c2c1c0 x6 : 0000ffff9f290681 
[  617.747419] x5 : 0000000000000000 x4 : 0000000000000000 
[  617.753747] x3 : 0000000000000000 x2 : 0000000000000000 
[  617.760057] x1 : 0000fffff3319750 x0 : 0000ffff9fb83df0 

[  617.766367] 
[  617.768849] audit: type=1701 audit(1562349970.364:5): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=3025 comm="main_" exe="/media/2.4.13_algo_tar1
Segmentation fault (core dumped)

main_ is the executable cross-compiled

can anyone help me debug this issue? Thanks, in advance

  • I'm going to assume that you have double-checked the code and that it is flawless; How are you transferring the executable to the board? Check MD5 on the PC and on the board please. – danrodlor Jul 09 '19 at 11:36
  • booted the board using SD card and mounted the rootfs on the same. so im copying the executable from the build system to sd card. code has no issues running on the build system. However im very new to this kind of error and not knowing how to debug the issue – Abhishek Abhi Jul 09 '19 at 12:04
  • It looks like you're trying to dereference a null pointer somewhere. Have you hardcoded any path in your app that does not exist in your target rootfs? (e.g. the target image) Could you post the source code? As long as you have the PC (0xffff9fb846c8) you can try to debug the app with addr2line and gdb. – danrodlor Jul 09 '19 at 12:39
  • i couldnot attach my source code file here. Can you give me your mail address so that i will share the code through mail. Also how to use the PC address to debug the object file? – Abhishek Abhi Jul 10 '19 at 06:23
  • You can check out https://stackoverflow.com/questions/7648642/how-to-use-the-addr2line-command-in-linux and http://eastrivervillage.com/debugging-application-with-cross-gdb-yocto/ – danrodlor Jul 10 '19 at 11:19

0 Answers0