<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to run my program (Cannot exec ..no such file or directory) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445240#M68618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please try Linux command "file" on the i.MX6 target to check file type of &lt;BR /&gt;"/home/Eclipse/Firmware/Cross-A/Cross-A".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Is it possible to run "/home/Eclipse/Firmware/Cross-A/Cross-A" on the target &lt;BR /&gt;(without GDB) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jul 2015 05:59:21 GMT</pubDate>
    <dc:creator>Yuri</dc:creator>
    <dc:date>2015-07-28T05:59:21Z</dc:date>
    <item>
      <title>Unable to run my program (Cannot exec ..no such file or directory)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445239#M68617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help.&amp;nbsp; I'm so close to getting this working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Linux.&amp;nbsp; I managed to build an image for the Sabre Lite i.MX6 board, put it on an SD card and it booted.&lt;/P&gt;&lt;P&gt;Next I built meta-toolchain for the Sabre Lite and its installed into /opt/poky/1.8 on my desktop Ubuntu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying now to build a simple "Hello World" program in Eclipse and download it to the Sabre Lite board.&amp;nbsp; Here's where the problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eclipse is able to compile the program successfully.&amp;nbsp; Eclipse shows it as an [arm/le] binary.&amp;nbsp; Eclipse is able to download it to the board and I see the file appear on the Sabre Lite in the correct directory in a terminal program.&amp;nbsp; Eclipse is able to start up the gdbserver debugger on the Sabre Lite board.&amp;nbsp; But when Eclipse runs the program, it reports :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;Cannot exec /home/Eclipse/Firmware/Cross-A/Cross-A: No such file or directory&lt;/STRONG&gt;."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried chmod 777 on the file.&amp;nbsp; But it still says the same thing.&amp;nbsp; It won't run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure why my program won't run.&amp;nbsp; I'm wondering if perhaps I'm using the wrong toolchain (i.e. the binary is not compiled for the right target) or I've got the compiler/linker/assembler setup improperly in Eclipse.&amp;nbsp; What could the problem be?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see anything wrong here with my settings in Eclipse? :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Target Architecture&lt;/STRONG&gt; : coretexa9hf-vfp-neon-poky-linux-gnueabi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compiler prefix&lt;/STRONG&gt; : arm-poky-linux-gnueabi-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cross GCC Compiler&lt;/STRONG&gt; : gcc&amp;nbsp; -march=armv7-a -marm&amp;nbsp; -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cross GCC Linker&lt;/STRONG&gt; : gcc --sysroot=/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Assembler&lt;/STRONG&gt; : as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or perhaps do you see anything wrong here :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last login: Sat Jul 25 01:42:42 2015 from 192.9.207.23&lt;BR /&gt;echo $PWD'&amp;gt;'&lt;BR /&gt;chmod 777 /home/Eclipse/Firmware/Cross-A/Cross-A;gdbserver :2345 /home/Eclipse/Firmware/Cross-A/Cross-A;exit&lt;BR /&gt;&lt;A href="mailto:root@imx6qsabrelite"&gt;root@imx6qsabrelite&lt;/A&gt;:~# echo $PWD'&amp;gt;'&lt;BR /&gt;/home/root&amp;gt;&lt;BR /&gt;&lt;A href="mailto:root@imx6qsabrelite"&gt;root@imx6qsabrelite&lt;/A&gt;:~# chmod 777 /home/Eclipse/Firmware/Cross-A/Cross-A;gdbserver :2345 /home/Eclipse/Firmware/Cross-A/Cross-A;exit&lt;BR /&gt;Process /home/Eclipse/Firmware/Cross-A/Cross-A created; pid = 415&lt;BR /&gt;Cannot exec /home/Eclipse/Firmware/Cross-A/Cross-A: No such file or directory.&lt;/P&gt;&lt;P&gt;Child exited with status 127&lt;BR /&gt;No program to debug.&amp;nbsp; GDBserver exiting.&lt;BR /&gt;logout&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jul 2015 03:12:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445239#M68617</guid>
      <dc:creator>nestle</dc:creator>
      <dc:date>2015-07-25T03:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run my program (Cannot exec ..no such file or directory)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445240#M68618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please try Linux command "file" on the i.MX6 target to check file type of &lt;BR /&gt;"/home/Eclipse/Firmware/Cross-A/Cross-A".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Is it possible to run "/home/Eclipse/Firmware/Cross-A/Cross-A" on the target &lt;BR /&gt;(without GDB) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 05:59:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445240#M68618</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2015-07-28T05:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run my program (Cannot exec ..no such file or directory)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445241#M68619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the target (Sabre Lite) after the application Cross-A was compiled and downloaded to a directory, I typed :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;file Cross-A&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It reported :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;./Cross-A : ELF 32 bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/&lt;SPAN style="color: #e23d39;"&gt;ld-linux.so.3&lt;/SPAN&gt; for GNU Linux 2.6.31, not stripped&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I decided to do a find to see if I could find the interpreter ld-linux.so.3 in the rootfs of the Sabre Lite image I was using to boot the board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;find / -name 'ld-linux.so.3'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It found nothing!&amp;nbsp; The file did not exist anywhere in the rootfs.&amp;nbsp; Maybe that's why Cross-A was not launching.&amp;nbsp; It could not find the library it was looking for in /lib to run.&amp;nbsp; So I looked in /lib and found a similar file (a symbolic link to a file actually) named :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;ld-linux-armhf.so.3&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I created a copy of the above symbolic link and named it ld-linux.so.3 (which the binary Cross-A was looking for) in the same /lib directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;cp ld-linux-armhf.so.3 ld-linux.so.3&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then I went back to the directory where Cross-A binary was located and ran it.&amp;nbsp; It worked!!&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;!!!Hello World!!!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why the file had the "armhf" keyword in the middle in my image and why Cross-A was looking for a file without that keyword, I don't know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recall reading that in Yocto fido (which I'm using), the keyword "armhf" was appended to some libraries - for what reason I know not.&amp;nbsp; Anyway for those of you struggling out there with this problem, I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 21:09:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445241#M68619</guid>
      <dc:creator>nestle</dc:creator>
      <dc:date>2015-07-31T21:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run my program (Cannot exec ..no such file or directory)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445242#M68620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is recommended to use GCC option&amp;nbsp; "-mfloat-abi=softfp" with FSL Linux. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Verdana','sans-serif';"&gt;&lt;A class="jive-link-wiki-small" data-containerid="2004" data-containertype="14" data-objectid="103736" data-objecttype="102" href="https://community.freescale.com/docs/DOC-103736"&gt;https://community.freescale.com/docs/DOC-103736&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 04:24:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445242#M68620</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2015-08-03T04:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run my program (Cannot exec ..no such file or directory)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445243#M68621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've run in to the same problem. If you're building with -mfloat-abi=hard, you also need to&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;link&lt;/EM&gt;&lt;/STRONG&gt; with the option -mfloat-abi=hard. Resulting executable then references the ld-linux-armhf (presumably arm&amp;nbsp;&lt;EM&gt;hard float&lt;/EM&gt;) correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 17:38:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-run-my-program-Cannot-exec-no-such-file-or-directory/m-p/445243#M68621</guid>
      <dc:creator>chris_f</dc:creator>
      <dc:date>2017-04-27T17:38:58Z</dc:date>
    </item>
  </channel>
</rss>

