bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: utzig, lbednarz, tfAteba, barthess, RoccoMarco

varad@1994
Posts: 6
Joined: Sat Jun 06, 2020 3:23 pm

bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

Postby varad@1994 » Fri Jun 19, 2020 10:33 am

Hello,
I tried to execute one of the demos ('RT-ARMCM4-GENERIC') , I have successfully build the project. But when I tried to execute the program then I get error 'bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error'.
I know my executable is 'ELF 32-bit LSB executable' and I am running on Ubuntu 'x86_64 x86_64 x86_64 GNU/Linux'. So I have already installed gcc-multilib and 'sudo apt-get install gcc-multilib libc6-dev-i386' but still I have the same problem.Can you please help me to solve this issue.

Thanks!!

steved
Posts: 719
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 10 times
Been thanked: 102 times

Re: bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

Postby steved » Fri Jun 19, 2020 10:53 am

Have you compiled the demo to run on a linux system?
Is your processor a Cortex M4?

User avatar
Giovanni
Site Admin
Posts: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

Postby Giovanni » Fri Jun 19, 2020 10:57 am

ChibiOS demos are meant to run on HW, those are not Linux executable files.

There is a Posix Simulator demo, you can run that on Ubuntu.

Giovanni

varad@1994
Posts: 6
Joined: Sat Jun 06, 2020 3:23 pm

Re: bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

Postby varad@1994 » Fri Jun 19, 2020 11:18 am

Hello Giovanni
Yes I successfully ran the POSIX simulator. I just wanted to try other demos.
Thanks or the information

varad@1994
Posts: 6
Joined: Sat Jun 06, 2020 3:23 pm

Re: bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

Postby varad@1994 » Fri Jun 19, 2020 11:19 am

steved wrote:Have you compiled the demo to run on a linux system?
Is your processor a Cortex M4?


No. Actually I do not have HW now. I just wanted to to try out one example running and from that can build my own application.

mikeprotts
Posts: 141
Joined: Wed Jan 09, 2019 12:37 pm
Has thanked: 16 times
Been thanked: 21 times

Re: bash: ./ch.elf: cannot execute binary file: exec format error chibiOS error

Postby mikeprotts » Fri Jun 19, 2020 12:34 pm

It would be a good idea to get hold of a board to start with, check in demos directory for a supported board that has a demo similar to your planned system. The Nucleo boards are very good value.

Mike


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 10 guests