Code Sourcery Installation In Ubuntu

by Noel on February 23, 2012

1. Go to Code Sourcery and download the lite version (FREE)

2. Select ARM Processor

3. Choose Which Installer you need

I’ll choose the Linux installer

4. Run the installer

You may need to change the permission of the file and make it executable.

In my Ubuntu, my /bin/sh is symbolically linked to dash. Unfortunately, this wasn’t supported by the installer so
I have to do

cd /bin
sudo mv sh shold
sudo ln -s bash sh

5. Click Next

6. Click I access the terms and conditions and hit “Next”

7. Click “Next” again in the important information

8. Choose Typical and click “Next”

9. In this next step it will ask for the installation directory.
Now I would like to install this in /usr/share/CodeSourcery so I need to prepare the directory first and make sure I have permissions to that directory

In the terminal type this

sudo mkdir /usr/share/CodeSourcery
sudo chown . /usr/share/CodeSourcery

In my case, my username in my linux box is “noel” so the exact command I typed is

sudo chown noel.noel /usr/share/CodeSourcery

10. Check the install folder if correct

11. Select Modify Path – click “Next”

12. Choose Link Folder – just click “Next”

13. Pre-Installation Summary – click “Install”

14. Code Sourcery will start installing

15. And when you see this, you’re done.

16. Next is to add it to my path. In my case I’ll edit my .bashrc file

In your home directory type

nano .bashrc

Or you can use ‘gedit .bashrc’ if you want

Add the PATH to the bin directory of the code sourcery. In this case it is


Save your changes.

17. Open another terminal window

Your new .bashrc file should take effect in this new terminal window.


echo $PATH

and you should see your new PATH environment variable with the added CodeSourcery directory.

now let’s test if you can access the compiler. Type

arm-none-eabi-gcc --version

you should see something like this

Congratulations! Now you have an ARM tool chain installed in your Linux Machine.

Leave a Comment

Previous post:

Next post: