Recently, I was offered a chance to review a full version of mikroC Pro for ARM, a toolchain by MikroElektronika. They are currently on version 4.2.0. This month, they are celebrating the 10th anniversary of the release of their first IDE. The founder of MikroElektronika, Serbian entrepreneur Nebojša Matić, based his efforts on the principle of "making it simple."
In 2004, MikroElektronika launched its first IDE -- mikroPascal for PIC. Since then, MikroElektronika has developed a toolchain solution for the full range of Microchip PIC devices, along with AVR, 8051, and ARM Cortex-M chips from TI and ST Micro. One thing that makes MikroElektronika unique is that they not only have compilers for the C language, but also for BASIC and Pascal.
MikroElektronika's ARM offerings are one of their latest additions editions to the family of microcontrollers they support. MikroC is one of three languages that they offer for programming the Cortex M parts. When looking for a toolchain for the STM32 microcontrollers, the options for hobbyists are slim. There are a few toolchain options that are built around the GCC/Eclipse IDE. There are the code-limited, free offerings from Atolic, IAR, Keil, Rowley, and a few others, but -- unfortunately -- once you reach the code limit, the upgrades for many of these fall outside the budget of the average hobbyist or small business. While mikroC has a lower free code size limit than most, the cost to purchase the full toolchain is no more than $300. This entitles you to updates for the life of the product as well as direct tech support.
My current toolchain for the STM32 is CoIDE with the GCC compiler for ARM. This is not a bad solution, but the coding style is rather tedious and there is a significant lack of documented examples. This contrasts greatly to mikroC Pro for ARM. Following in the MikroElektronika philosophy of making things simple, this toolchain is intended to make things easy for the user. It allows you to spend less time thinking about the details of your code and spend more time on actually accomplishing your task at hand. This is illustrated by their first code example. Most IDE's start with the ubiquitous "Hello World" equivalent for microcontrollers -- blinking an LED. While this does have value, mikroC starts with an introduction to USB HID communications. The most difficult part of their example, if it can really be called difficult, is making sure that you have set the proper clock configuration. This is all done though a simple GUI interface.
With these settings established, I was able to do both polling HID and interrupt HID in less than an evening. For me, this was a great accomplishment as I had been trying to understand ST Micro's HID example for months (i.e., the hour or so each evening between when my infant son would go to bed and when I had to get to sleep to be able to function at work the next day). I was trying to figure out how to modify the code example for my needs, but had not been able to get past a few small issues. Simplifying matters, the mikroC IDE includes a simple HID terminal which allows you to do some simple testing. It is really great to have this integrated right into the toolchain.
A view showing the basic IDE as well as MikroElektronika's conversion tool at the bottom of the screen
(Click here to see a larger image.)
After having set up their HID example for one of my STM32 development boards, I decided to test how difficult it would be to port it to a different STM32 microcontroller. I found out that this was as simple as selecting the proper microcontroller in the settings tab and then properly configuring the clocks. Once that was accomplished, I recompiled and flashed the board. It worked right off with no issues. I decided to go a little further by not only changing microcontrollers, but by switching to parts from a completely different vendor. I pulled out the Texas Instruments Tiva LaunchPad that I had lying around. Once again, it was as simple as selecting the proper microcontroller and setting up the clock structure. I went from not being able to get USB HID working on any microcontroller to having it working on three different ones and two different vendors all within one evening.
The project settings tab, which allows the user to select the desired microcontroller as well as configure the main clock settings
(Click here to see a larger image.)
Being able to get HID communications working was a nice first step, but what about the rest of the IDE? I have to say there is a lot to like about it.
To Page 2 >