How to set gcc-arm-none-eabi as toolchain in Eclipse

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
Rico_UK
Newbie
Posts: 3
Joined: Tue Apr 30, 2019 11:28 am

How to set gcc-arm-none-eabi as toolchain in Eclipse

Post by Rico_UK » Wed May 01, 2019 2:07 pm

Hi,

I have a Ubuntu 18.04 system with JDK 1.7_80, arm cross compiler (gcc-arm-none-eabi-4_9-2015q3), eclipse Juno and Erika 2.80 installed.
I can start eclipse and create a project from the STM32F4 templates.
However, when I try to build the project it fails with:
** Compiler not found. Provided path is 'C:\gnu\ARM'. Stop.

I looked into the project Makefile and found the $(eval$(call check_and_set_linux_compiler_path test at line 107. I changed the returned compiler value to:
~/gcc/gcc-arm-none-eabi-4_9-2015q3
Saved and re-built but I still got an error, this time pointing to the new path I had provided.
I then changed the line to point to the compiler executable, saved and re-built and still got the same error.

Where/how do I tell eclipse/my project to use the gcc cross compiler installed in ~/gcc/gcc-arm-none-eabi-4_9-2015q3?

TIA,

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: How to set gcc-arm-none-eabi as toolchain in Eclipse

Post by paolo.gai » Wed May 01, 2019 9:11 pm

You need to specify the path in: Windows/Preferences/RT-Druid/Oil/Cortex

then remove the Debug dir and rebuild.

PJ

Rico_UK
Newbie
Posts: 3
Joined: Tue Apr 30, 2019 11:28 am

Re: How to set gcc-arm-none-eabi as toolchain in Eclipse

Post by Rico_UK » Thu May 02, 2019 11:10 am

Hi PJ,

Thanks for the pointer. I had already set the path but hadn't deleted the Debug directory. Now it's looking in the right place but still can't find the compiler. Here is a screenshot showing the "compiler not found" message in the Build Console and a shell showing the compiler really does exist where it should.
2019-05-02_11-07-46.png
2019-05-02_11-07-46.png (243.1 KiB) Viewed 19099 times
What did I do wrong?

Thanks,

Rico

Rico_UK
Newbie
Posts: 3
Joined: Tue Apr 30, 2019 11:28 am

Re: How to set gcc-arm-none-eabi as toolchain in Eclipse

Post by Rico_UK » Thu May 02, 2019 11:55 am

Hi All,

Fixed it! I needed some 32bit shared libraries for the ARM Cross GCC to run - see step 5 below.

For future reference and anyone setting up Erika2.8 on Ubuntu 18:

1) Download JDK 1.7_80 from Oracle

2) Extract it to a local directory and move it to /usr/lib/jvm:
sudo cp ./jdk1.7.0_80 /usr/lib/jvm

3) Setup Java alternatives so you can switch between 7 and the system default (normally 11)
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_80/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_80/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0_80/bin/javaws" 1


4) Select your Java version with:
sudo update-alternatives --config java

5) Install some pre-requisites
sudo apt-get install build-essential li32ncurses5 lib32z1

6) Install ARM cross compiler
https://launchpad.net/gcc-arm-embedded/ ... -q3-update

7) Don't forget to set the PATH as described by PJ earlier in this thread

Then I launched eclipse Juno and created a project from one of the demo templates.
For task aware debugging in Lauterbach TRACE32, add a new line at line 70 of conf.oil, which reads:
/* Enable ORTI debug symbols */
ORTI_SECTIONS = ALL;

That should be all you need.

Rico.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: How to set gcc-arm-none-eabi as toolchain in Eclipse

Post by paolo.gai » Thu May 02, 2019 1:04 pm

Good that you solved it!

I updated the page:
http://erika.tuxfamily.org/wiki/index.p ... _Ubuntu_18

with your comments.

Ciao,

PJ

Post Reply