Setting up Eclipse IDE for ARM Cortex M based embedded system development

Setting up Eclipse IDE for ARM Cortex M based embedded system development

Eclipse is one of the most loved development environment among developers. In this article I will explain how you can setup Eclipse IDE for ARM Cortex M embedded system development. This setup can be used to develop projects on any Cortex M MCUs in the market.

First step is to get the Latest Eclipse IDE. Eclipse is available for different programing languages. Embedded system development is done on C/C++. Eclipse CDT is a flavor of Eclipse main IDE, which is designed to do code editing and debugging C/C++ projects.

Use the above given link to download Eclipse IDE for C/C++ developers. I am using Ubuntu Linux. So the following steps will be useful for Linux users ( Mac users can also follow the same procedure, But I haven't tested it in Mac )

Prerequisite : Eclipse is a JAVA based IDE. So you need to have JRE(Java RunTime Environment ) installed in your system.

sudo apt-get install openjdk-8-jre 

or you can follow the below mentioned steps to install JRE.

Install Compiler, Binutils and Debugger:

Eclipse is an IDE (Integrated development environment). For compiling and debugging the code we need compiler toolkits and Debugging toolkits. There are 5+ different varieties of ARM Cortex Compilers available in the market. Some of them are proprietary and expensive. As an opensource enthusiast, I would recommend you to use any GCC version. There are many trusted sources from where you can download compiler and related tools. One of them is from ARM itself.

Follow the procedure to download and install GCC, Binutils, NewLib and GDB.

One other alternate option is Linaro.


The easiest option for Linux users is to download it from the repository.

sudo apt-get install gcc-arm-none-eabi
sudo apt-get install gdb-arm-none-eabi

Installing debugging tools:

Most of the Embedded development boards are now comes with onboard USB based debugging feature. To make use of that we need a software which can communicate with GDB. I would recommend openocd. Those who have SEGGER JLink they can use that too.

Install openocd using command-line.

sudo apt-get install openocd

for SEGGER JLink users you can download the drivers from the website.

Installing Eclipse and related plugins:

Once you have downloaded the eclipse-cdt. Extract the tar.gz file.

cd ~/Downloads

tar xvf eclipse-cpp-neon-3-linux-gtk-x86_64.tar.gz

#move eclipse to /opt directory

mv eclipse /opt/

Inside eclipse directory you can see a executable file in the name of eclipse. Run that file to start eclipse.

cd /opt/eclipse

./eclipse

Select/create a new workspace for your Embedded system projects. Once you do that Eclipse will launch a fresh screen for you.

Congratulations! first part is done. Now we need to install plugins for embedded system development.

Go to help/Eclipse Marketplace...

Search for MCU Eclipse in the "find" field.

Here you go... Click on the GNU MCU Eclipse and press the install button on the right bottom.

Press confirm and wait for few moments. Next screen will ask you to go through the License details. Once you are okay with the terms and conditions change the radio button to "I accept the terms of the license agreement" and press Finish.

Installation will take another few minutes. Once installing is completed eclipse will ask for a restart. Proceed with a restart.

Once the new eclipse screen popped up

Select Window-> Perspective -> Open Perspective -> Other and click Packs.

This will open the Packs window. Packs is used to download the MCU SVDs from different vendors. This is really helpful for memory and register level debugging.

Click on the "Update the packages and definitions from all repositories" This will pull information about all the available MCUs and Dev Boards from the repositories. Wait until the process completes.

Once the process is done you can see details about different MCUs from different vendors. You can click on that and install any of them according to your project requirement.



Congratulations ! Now you have everything required to start your new embedded project.

I will be covering how to create a new project in this setup in the next article. Happy Coding!




Anil Patil

Embedded Software Engineer, Senior firmware Developer, Project Manager at Capgemini Engineering

3 年

This is very good info in one link. Great work!. Thank you!.

回复
Rahul Chowdary Pinnaka

Embedded Software Engineer | AUTOSAR Crypto Stack (HSM) | Performance Analysis | BLE | Application Software. Simplifying Foreigner Journey to Germany through B2D_Talks (Bharat [India] 2 Deutschland [Germany])

3 年

Nice article. Great work and thank you.

回复
Liviu Ionescu

Senior Embedded C/C++ system programmer, maintainer of the Eclipse Embedded CDT, xPack, and μOS++ projects.

6 年

Unless you want to install everything manually, you can also use the prepacked Eclipse & plug-ins. (https://github.com/gnu-mcu-eclipse/org.eclipse.epp.packages/releases). The official install page is :?https://gnu-mcu-eclipse.github.io/install/

回复

要查看或添加评论,请登录

Aswin Venu的更多文章

社区洞察

其他会员也浏览了