Errors with arm-none-eabi-gcc on Windows 10 Bash

2

I'm trying to use Windows 10 Bash to run an ARM cross compiler but it seems like I cannot get the gcc compiler to execute (ie: arm-none-eabi-gcc). This error appears:

arm-none-eabi-gcc: cannot execute binary file: Exec format error

This error appears on a VM/Ubuntu machine if you do not install 32-bit libraries because this ARM cross compiler i'm using is 32-bit. Installing those same libraries on Windows 10 bash still does not resolve this issue.

I'm basically following these steps below here within bash: https://dev.px4.io/starting-installing-linux-boutique.html

pushd .
cd ~
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
tar -jxf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_9-2015q3/bin:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
. ~/.profile
popd

And for the 32-bit libraries:

sudo apt-get install libc6:i386 libgcc1:i386 libstdc++5:i386 libstdc++6:i386
sudo apt-get install gcc-4.6-base:i386

Installation appears correct when following these steps but the error message remains for arm-none-eabi-gcc. Are there any incompatibilities with what i'm doing here?

operand

Posted 2017-02-20T17:32:15.117

Reputation: 21

Answers

0

I had the same issue.

Installing this version solved it for me:

add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
apt-get install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1

Found this solution in the Ardupilot forum http://discuss.ardupilot.org/t/using-bash-on-windows-for-ardupilot-development/8604/7

seeadler

Posted 2017-02-20T17:32:15.117

Reputation: 1