War of IDEs and a curious observer

Long long time ago, I wrote on my blog, that I’ll be learning ARM architecture in the coming months and in last 10 months or so, I did quite a lot of coding for ARM Cortex M0 based SOCs. Today I thought, I’ll reflect, just a little on what I learned in those ten months and share my thoughts on rather a very important aspect of Commercial Embedded Systems development; IDE (Integrated Development Environment)

I had very little exposure to Embedded systems development before I joined my current place of work. I did worked as Firmware Verification Engineer for a Semiconductor Company, but the Firmware verification was done on a hosted environment and the target product was a very complex ASIC. I was verifying Firmware by writing user land applications in ‘C’ and quite infrequently (Since that was not my primary task), looked at the Firmware code  which was also written, mostly in C. Few years later, I ended up in a school, pursing Masters program in Computer Engineering and as part of the curriculum learned basic Embedded Systems programming (During bachelor’s study, I did assembly programming for 8051 Microcontroller, but, that was purely for learning Assembly language purposes) and enjoyed it and also struggled quite a lot, while working through the reference manual, data sheet, and code samples, etc. The code was written for bare metal without any abstraction (only bare minimal abstraction provided by the C language itself). Back then, I didn’t care the portability, reusability, modularity or any such “Software Engineering Jargon”, and  when I got to know that I’ll be working on Embedded Systems, I was getting excited and worried at the same time. I was excited because, I enjoyed programming those tiny hardware and was worried because, I assumed that once again, I’ll be doing this wiring by hand kind of coding, which is quite time consuming and frustrating at times (RCA of bugs in those programs is very difficult, if not toughest). However, I was taken by a little surprise, when I saw the actual commercial level code. It was much more readable and far easier to follow through than the simple code I wrote during the lab session in my college.

Now, After spending 10 months, I can’t stress enough the importance of “Software Engineering practices” in the world of Embedded systems. These two worlds are closer than we think they are. Unless there is really strict time constraint requirements, using abstraction is a better choice. Abstraction is very important for writing clean code. Designing good implementation and interfaces pays off very well in the long run. A commercial embedded solution is developed by many engineers and effort should be made to make the code as readable as possible. I was also surprised to see, how little assembly level coding I was doing. I was under the assumption, that I’ll have to learn the ARM ISA in detail, but So far, I had to refer the ISA only while debugging some code.

For example, I would almost never do even as trivial as setting a bunch of bits of some registers by accessing them directly in my application code.


FLASH_CR2 |= 1 << 2;
while (FLASH_STATUS_REG &= 1 << 3);

Or something as simple as translating some readings into a meaningful value as:

val = (264 * 32 ) / 24;

These above are dreadful and could be easily replaced by a much more meaningful looking code. The rant will go on and on, but I’ll save it for a future or rather on a series of future posts. Another thing that I want to talk is IDEs. IDE aka Integrated Development Environment for Embedded Systems are quite expensive and has a significant impact on time to market. The choice of IDE is even more important for Startups, since a typical startup will have to be frugal with it’s funds and be super fast in delivering product to the market, I believe, they should spend some time in narrowing down their requirements and do some kind of evaluation on plethora of options that are out in the market currently. IDE’s typically combine the cross compilers (I’ve a x86_64 bit machine on which I need to compile a code which will run on a ARM32 machine), and lot of other goodies such as flash programmer, debugger, code analysis tools etc. But those goodies come with a big price tag. Somewhat similar goal could be achieved with freebies (Long live FOSS) but that may require a steep learning curve and extra hours. So, when I found myself in the middle of IDE war, I prepared a list of few most famous IDEs for ARM development that I _know_ of. My requirement was to find a suitable development environment for STM32 and NRF51 based SOC solution. Good thing is that the part number that I’m using are both ARM Cortex M0 based MCU and hence it was comparatively easier for me.

The table below is one such comparison list of IDEs and in __my__ particular situation,  Keil comes as the winner. Using GNU Toolchain is very attractive (specially from the cost effective point of view), but since in real life, typically one works in a team, and choices are made for the entire team, rather than for a particular team member, GNU Toolchain (Shown in Yellow in the table below) came at spot number 2 on the most favored Embedded Systems development tool of our choice.

 

IDE_list_bigger

 

Advertisement
Privacy Settings

Posted on February 12, 2016, in ARM, Embedded and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: