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: RoccoMarco, lbednarz, tfAteba

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

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

Post by varad@1994 »

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: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

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

Post by steved »

Have you compiled the demo to run on a linux system?
Is your processor a Cortex M4?
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

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

Post by Giovanni »

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

Post by varad@1994 »

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

Post by varad@1994 »

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: 166
Joined: Wed Jan 09, 2019 12:37 pm
Has thanked: 19 times
Been thanked: 31 times

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

Post by mikeprotts »

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
Post Reply