下载自己需要版本的gcc(https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/)
wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2
然后解压,
tar -jxf gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2
添加profile,
sudo gedit profile
export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q2/bin:\$PATH
如果直接重启,查询版本就会提示如下
bash: /home/xxx/gcc-arm-none-eabi-5_4-2016q2/bin/arm-none-eabi-gcc: No such file or directory
但是我们确实有这个文件,那怎么办呢??
sudo apt-get install lib32ncurses5 lib32tinfo5 libc6-i386
然后重启电脑
arm-none-eabi-gcc --version
即可查询成功。