The battle isn’t AVR Atmega vs Microchip PIC anymore.. More and more people are moving to ARM chips. As easy as it sounds but it isn’t. ARM is an company that invented the ARM chips, but doesn’t has a silicon fab, instead they license the design to several silicon manufacturer like ST, NXP, xx and all those manufacturer put their own sauce and peripherals to the basic design. Nice to have such a large diversity, but when unfamiliar with ARM in general it is a bit overwhelming and hard to choose from. An other ‘problem’ is the vendors don’t offer a complete development kit to instantly start with their chips.

After browsing ebay for arm starterkits, STM32 seems to be a reasonable starting point as it appears to me most development boards are using this chip. ST doesn’t offer a development kit as I expected. so i try to find a more ‘generic’ development kit. After googling for a couple of hours I almost give up on this and wanted to stick with Microchip forever. I asked a bit round in my networks of ‘geeks’ and found everyone was struggling with this. Charles of paxinstruments.com pointed me into the direction of Eclipse. Eclipse is a general IDE with support throught plugins for various compilers and platforms. I tried to follow their installation guide found here.

I first started to download the ISO for ubuntu and installed that in a virtual machine (VM). I opted for a VM because you can easily throw away the machine or revert steps and Linux as this seems to be the de-facto standard for running GCC. Install Ubuntu 16.04 using the ISO and mostly the standard settings VMWare suggest except add 2GB of memory (remember the user and password you entered here) First thing is start after the installation is the terminal (windows-key and enter terminal [enter]) and update all packages with

$ sudo apt-get update

Next get into the desktop and open firefox the guide. First get the installation package of the toolchain from here. I used ‘gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2’ but newer versions will do fine I guess. Install to the ‘ default’ location using the terminal:

# install dependencies
$ sudo apt-get -y install lib32ncurses5
# install gcc to default path /usr/local
$ cd /usr/local
$ sudo tar xjf ~/Downloads/gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2

Check if it works:

$ /usr/local/gcc-arm-none-eabi-5_4-2016q2/bin/arm-none-eabi-gcc –version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160609 (release) [ARM/embedded-5-branch revision 237715]
Copyright (C) 2015 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.

I don’t have a J-link JTAG debugger or OpenOCD so I skipped the step for debugger now. I think it can omitted and later on installed if needed.

Next step is to install Qemu ARM plugin. Download the package from here (don’t want to compile from source so the latest binary was ‘gnuarmeclipse-qemu-debian64-2.4.50-201510290935-dev.tgz’) and install it:

$ sudo mkdir -p /opt/gnuarmeclipse
$ cd /opt/gnuarmeclipse
$ sudo tar xvf ~/Downloads/gnuarmeclipse-qemu-debian64-2.4.50-201510290935-dev.tgz

Check if the install was succesfull:

$ /opt/gnuarmeclipse/qemu/2.4.50-201510290935-dev/bin/qemu-system-gnuarmeclipse –version
GNU ARM Eclipse 64-bits QEMU emulator version 2.4.50
Copyright (c) 2003-2008 Fabrice Bellard

Eclipse does needs a Java runtime to operate. This command will install the default one on ubuntu:

$ sudo apt-get -y install default-jdk

Test the install:

$ java -version
openjdk version “1.8.0_91”
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

Now the exciting part is to install eclipse! The link in the howto didn’t point to an installable package but instead a nice installer. I choose the 64 bit download and got ‘eclipse-inst-linux64.tar.gz’. Extract it to a convieniant directory and run it:

$ mkdir ~/eclipse
$ cd ~/eclipse
$ tar -xsf ../Downloads/eclipse-inst-linux64.tar.gz
$ cd eclipse-installer
$ ./eclipse-inst

Here we are supposed to choose C/C++:

eclipseinstaller

After installation choose ‘Launch`, and accept the default workspace location:

workspacedir

After the whole thing is started up, go to ‘Help’ then ‘Install new software’. I downloaded the ‘Neon’ so select the neon repository (this had me puzzled some time), also i needed to uncheck ‘Hide items that are already installed’ (puzzled me some time too). Locate the ‘Programming language’ and ‘C/C++ Development tools’ and click next (accept to install additional dependencies):

installsw2

Now we got a working Eclipse environment, next is to install the armeclipse plug-ins. From the tutorial you can drag and drop the install link onto the eclipse desktop. I found it quite a juggle to drag and drop the link. Click on the install icon and hold the mouse button, at the same time use ALT+TAB to navigate to Eclipse and drop it somewhere.

marketplace

I just ticked every box, but probably I could get away with the default. I also got an error the software was not signed properly and ignored that (is this expected behavior?). Accept the licenses and let eclipse restart. Now we can start a new project with a STM32 as target:

newproject1

newproject2

 

newproject3

Now you end up with a couple of source codes and it seems to compile. Now find a way to upload it into my STM32VET6 board 🙂

Share this