Finally you have decided to say goodbye to Arduino and start playing with ARM. You have come to the right page. Let me show you how to setup an environment for the same
First download the latest files from ARMDeveloper here.
If you have been developing and working with Ubuntu for some time then you probably have all the dependencies installed. If you are downloading the latest version of the toolchain then also you do not need any dependencies as the latest versions are 64bit. The older ones were 32bit and needed some dependencies to run on 64 bit machines.
Even if you do get prompts to install something or something not found, no need to panic. Based on the error messages you get just install those dependencies independently using apt-get.
After that it is recommended to install it in the “opt” folder in HOME, but if you want to install it anywhere else go ahead.
Untar it. Then run the “chmod” command. For installing it in “/opt” folder the steps would look like the following –
$ mkdir opt $ cd opt
Untar it manually by GUI or use the command below.
$ tar xjf ~/Downloads/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
Make sure your extracted contents are inside “opt” folder now. Then run the following-
$ chmod -R -w gcc-arm-none-eabi-6-2017-q2-update
After that you may or may not want to add the Toolchain path to system/user path. As for me, i wanted to because i needed the ability to call it from command line without having to export variables everytime i wanted to develop. So i did the following-
Adding environment variable to .bashrc file –
sudo gedit .bashrc
Then add the following line to the end of the file.
Then either restart your shell or log back in or just restart your PC or execute the following command –
$ source ~/.bashrc
$ exec bash
$ exec "$BASH"
Find out more about what these commands do here .
Wanna know about .bashrc, .bash_profile, .environment, you can do so here.
To check if you did install it correctly just call the toolchain and ask for its version. If you get something like the following then you are okay otherwise you will get a “command not found” error.
~$ arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437] Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You can find out more from the following pages –