Wind River Support Network

HomeDefectsWB4-8017
Fixed

WB4-8017 : Cannot debug WRLinux Remote Application from Windows WB4 : error : "executable.out not in executable format: File format not recognized"

Created: Dec 20, 2018    Updated: Mar 19, 2020
Resolved Date: Dec 12, 2019
Found In Version: SR0600 (October 2018)
Fix Version: SR0640
Severity: Standard
Applicable for: Workbench 4, Wind River Linux LTS 19
Component/s: Target Linux Analysis, Target Linux Debug (GDB)
Host OS: Windows 10

Description

 Workbench 4 to remotely debug an application on a Xilinx-Zynq UltraScale+ board. 

We can successfully connect to the board from WB-4 on our Windows PC.
When we run the remote debugger, it is able to successfully download the binary onto the board, run it, and attach a gdbserver to it. 
However it is unable to execute and gives the following error:

---
Error in final launch sequence
         Failed to execute MI command
         -file-exec and -symbols
          C:/...../executable.out
Error message from debugger back end:
"C:/...../executable.out" not in executable format: File format not recognized
"C:/...../executable.out" not in executable format: File format not recognized
'
---

The application project has been built with option -O0 and -ggdb (tried -g as well)

When we directly run the application with gdb on the board there is no problem.

Steps to Reproduce

I tried to reproduce with a VLM Xilinx target using with a Xilinx BSP based project (as customer is using, but i believe it can be reproduced with X86 as well)

Linux Host :
 1. configure platform project ad deploy it to the target
 configure --enable-board=xilinx-zynq --enable-build=production --enable-kernel=standard --enable-rootfs=glibc_small --enable-reconfig --enable-jobs=8 --enable-parallel-pkgbuilds=8 --with-template=feature/debug,feature/initramfs --with-sstate-dir=../sstate --with-layer=meta-mingw --with-rcpl-version=0027
 make

Customer command :
 configure --enable-board=xilinx-zynqmp --enable-kernel=standard --enable-rootfs=secure-core+secure-configuration+debug --enable-sdkmachine=auto,x86_64-mingw32 --enable-win-sdk=yes --with-package=libpam,pam-plugin-cracklib,screen,iptables,samhain --with-sstate-dir=../sscache --with-layer=wr-sdk-toolchain,meta-mingw,examples/fs-final,/local/WindRiver-2018-12/wrlinux-8/addons/wr-common/layers/wr-security,/local/WindRiver-2018-12/wrlinux-8/addons/wr-secure/layers/secure,/local/WindRiver-2018-12/wrlinux-8/addons/wr-secure/layers/wr-security-packages --enable-addons=wr-secure --with-template=feature/example-fs-final --enable-reconfig --enable-build=production --enable-bootimage=cpio.gz --with-rcpl-version=0028"

2. build Windows SDK
 local.conf : SDKMACHINE = "i686-mingw32"
 make export-sdk

Windows machine:
 3. Transfer Windows SDK to Windows machine, open WB-4, import the WRLinux SDK and create WRLinux application project example (based on that SDK)

4 On the target, run 'tcf-agent' command
 then from Workbench-4, create a wrlinux connection using the target IP address
 then select the application project binary --> right click --> "Run Remote Linux Application" or "Debug Remote Linux Application"
Live chat
Online