Page 1 of 1

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

Posted: Fri Jun 19, 2020 10:33 am
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!!

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

Posted: Fri Jun 19, 2020 10:53 am
by steved
Have you compiled the demo to run on a linux system?
Is your processor a Cortex M4?

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

Posted: Fri Jun 19, 2020 10:57 am
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

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

Posted: Fri Jun 19, 2020 11:18 am
by varad@1994
Hello Giovanni
Yes I successfully ran the POSIX simulator. I just wanted to try other demos.
Thanks or the information

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

Posted: Fri Jun 19, 2020 11:19 am
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.

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

Posted: Fri Jun 19, 2020 12:34 pm
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