3 min read

Eclipse Embedded CDT Installing on Debian/Ubuntu Machines

I have searched lots of IDEs for programming ARM Cortex-M series microprocessors but there's no a good one for Linux based systems. Then, I found this website about using Eclipse for embedded development. I read some of the entries and then I found that the project is now developing under the Eclipse Foundation. See the link.

From the link I gave you, download the Eclipse IDE for Embedded C/C++ Developers program. If you're using ARM64 (in your hosting machine, not the microcontroller), use the button Download AArch64, otherwise use Download x86_64.

If you're rich enough and don't pay attention to your outgoings, please donate to Eclipse Community. Open and libre software is important for our lives and our private data that companies use. Thank you.

Prerequisites

  • node/npm/xpm

  • Arm Toolchain

    • I'll use xPack GNU Arm Embedded GCC because of easy installation process. Check out this site: ~$ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest

    • Test if it's installed. I downloaded the version 10.2.1-1.1.2, remind you that: ~$ ~/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.2.1-1.1.2/.content/bin/arm-none-eabi-gcc --version

  • RISC-V Toolchain, if you use it.

    • I won't use it, so that I'm not installing it.
  • SEGGER J-Link

    • Go to this link and find the J-Link Software and Documentation Pack. Then click it to expand the card and find for DEB installer. Download it.
    • To install it,
      • Beginner: Click the deb icon twice, it will open the Software Store and show you a button for installing.
      • Intermediate: ~$ sudo dpkg -i JLink_Linux_V692_x86_64.deb
  • OpenOCD

    • I will use the xPack version because of easy installation process. Check out this site.

      ~$ xpm install --global @xpack-dev-tools/openocd@latest

  • QEMU Arm

    • If you want to simulate your hardware, you should install it. I'll use xpm version again. For better understanding and further research, check out the documentation.

      ~$ xpm install --global @xpack-dev-tools/qemu-arm@latest

  • Java

    • If it is not installed, then type it to the terminal window.

      ~$ sudo apt install --yes openjdk-15-jdk

    • Test it if it's installed.

      ~$ java --version

Installing

  1. Extract the archived file

    • Beginner: via right-click and then choosing "Extract here".
    • Intermediate: ~$ tar -xf eclipse-inst-jre-linux64.tar.gz
  2. Go to directory eclipse-installer and give the executable permission to eclipse-inst file.

    • Beginner: Right-click the file and then open properties. Go to permissions tab and activate the radio button on the bottom of the page: "Allow executing file as a program"
    • Intermediate: ~$ chmod a+x eclipse-inst
  3. Open the installer file.

  4. Choose to install Eclipse IDE for Embedded C/C++ Developers and then click install - if you don't want any configurations.

  5. Accept the license agreement. Wait its installing.

  6. After the installation process, click Launch and wait for it to be opened.

Now, it's time to install CMSIS Packs for emulation.

Installing the CMSIS Packs

  1. First, open the application. Click "Help" in top menu.
  2. Then, click "Install New Software" button in the menu.
  3. Select "Embedded C/C++ v6.x Updates" in the textbox which labeled as "Work with:" in the panel that has opened.
  4. Expand the "Embedded C/C++ Cross Development Tools" and select "Embedded C/C++ CMSIS Packs (Experimental)" then click Next and accept the license. Finish the procedure.
  5. Then, in the workspace, click the "CMSIS Packs" perspective. If CMSIS Packs view didn't opened but there are new sidebars named like Devices, Boards, etc., press "Window" button in top menu. Select "Show view" and press "Other".
  6. From the panel which is opened, click CMSIS Packs and make it show.
  7. After you see the new view, press yellow "Reload" button on the top of the view (not workspace). It will download lots of boards and microcontrollers.
  8. Then, after the process, if there are lots of things in the view then you can understand that all is well!

Installing Board/Microcontroller Packages from CMSIS Packs and Choosing the One You Installed

  1. From the view, choose the board you want. If you want emulate the blinky for a start, choose STM32F4xx_DFP.

    • A note from website: Do not use STM32F4xx_DFP version 2.15.0 or higher, since it uses a new definition of the STM32F4-Discovery board, with STM32F407VGTx, which is not yes supported. For now stick to 2.14.0.
  2. Click the brown icon that looks like a packet with green down arrrow.

  3. Now, return the C/C++ perspective.

  4. Click "Project" on the top menu. Choose "Properties".

  5. Expand the "C/C++ Build" setting and choose "Settings".

  6. From the panel choose "Devices" and select the board "STMicroelectronics > STM32F4-Discovery > STM32F407VG".

  7. Apply and close.

Simulate Something (for example, Blinky!)

  1. Right-click the blinky.elf file and expand the "Debug As". Click "Debug Configurations".
  2. Double click the GDB QEMU Debugging.
  3. Select debugger tab and check if the board names are correct.
  4. Enable "Extra verbose" tick.
  5. Press debug, and it is done!

It's all done for now. These topics are covered in their original documentation but to remember and do the same processes as like I do before, I write this post.

I hope that it helpt you too, thank you.

Have a nice year!

The date written: Jan 1, 2021. 5:04 AM.