Wherein our hero fights the dragons of cross-platform compatibility, libraries not being updated, inadequate documentation, and the fact that Arduino can’t do unit testing natively.



I’m currently working on the new release of my project Synthduino, and I’ve fallen in love with Unit Testing from various Ruby and Ruby on Rails projects I worked on last year. I decided it would be good to bring unit testing to Synthduino, not only to give me a clearer roadmap of development (unit tests help focus effort), but also make sure my work is good quality (as I do want Synthduino to be used).


I briefly considered writing my own framework, but I’m not really comfortable enough in C/C++ to do it, so I looked into frameworks. Based on what I read, I narrowed it down to two options: CppUnit and Ceedling. From what I gathered, CppUnit was the more established of the two, but Ceedling was built on Ruby to use rake. I decided to try them both out.


My development platform spans 5 computers and 4 operating systems (Ubuntu, Lubuntu, Linux Mint, and Windows 7), with a git server running here. I needed something that would work moderately well on that.


I started out with CppUnit. The biggest issue I ran into was the complete lack of documentation (seriously – is there any? It’s advertised as a “C++ port of JUnit” – am I supposed to use the JUnit documentation?). I looked around online and found a lot of tutorials that all used completely different ways of doing the same things. On top of that, none of them actually worked on any of my machines – every attempt to do anything, no matter how minor, was a long string of compiler errors or stack overflows.

I looked to Ceedling. Off that bat, I did like it more – it came with example projects, and included documentation (though it was hard to find). I liked the ability to use rake, which I’m familiar with, including the ability to set up stubs for everything with an easy rake command. My biggest complaint would still be that the documentation is a little sparse (and online it’s nonexistent). BUT it’s certainly sufficient, so I can’t complain too much. I’m able to get things done, make my tests pass, and so on.

The only bug I ran into was in functions that used printf – I spend about 4 hours tracing stack calls, overflows, missing symbols, and so on until I tracked it down – an error that had been fixed in Unity in August but not found its way into Ceedling until December (after I had downloaded it). Otherwise it’s been great.


Next time I’ll actually look at some of the testing.

I didn’t want this to sound like an ad for AWS, but I’ve been very happy with it and do want to share my experiences.


EC2 – Elastic Compute Cloud – is the main “server” part of Amazon Web Services. This is the module where you spin up servers, select the hardward you want it run on, the operating system (or variants), and assign virtual harddrives and other storage. It’s a lot of fun to work with. The documentation is fantastic, and includes several walkthroughs – “How to set up a linux server”, “How to set up a LAMP server”, “How to install WordPress”, etc. In fact, you’re reading this on the realworld application of those walkthroughs.

These servers don’t automatically have persistent data, so when they’re shutdown, it’s gone. See below…

My only complain has to do with regions. AWS servers are located in regions, based on their datacenters, and essentially you can only have one server running in the free tier (yes, technically it’s by usage hours and storage etc., but it’s calculated based on one server month). In the online management portal, you can only see one region at a time. SO, when I spun up a server in one region, then shifted to another a few weeks later, I forgot I already had one going. I couldn’t see it anywhere – there’s no true MASTER view, only a master view PER REGION. This means that when I surpassed my free tier usage, I couldn’t figure out how to stop accumulating charges hourly. Finally I figured it out, but it would be SO helpful if they had a master view. For what it’s worth, they comped me a month’s worth of usage.


S3 is the storage you get. The free tiers gives you 30gb – not bad at all. That’s persistent storage, so just in case my server goes out, I store important stuf here. I also symlink stuff that needs to stay in a certain place on the server, so I can spin up & down without a problem. I just load the persistent storage virtual HDD, and symlink back over.

Elastic IP’s

Elastic IPs are GREAT, and the free tier lets you have one. Basically, the real IP address (and also the URL) of a server is created when the EC2 instance if created. SO if you terminate one, and start another, the IP address changes. This is not good for keeping the DNS update. With elastic IPs, you have one that’s permanent and assigned to you, and you point it at the server you want. SO the DNS has your permanent elastic IP, and you control what server that elastic IP points to.


Haven’t had any luck getting a SMTP server set up. I’m not sure if it has to do with Amazon’s anti-spam measures (a free server could get bad), but when I have time I’m going to spin up a new instance and see what happens. I applied to Amazon for them to relax restrictions re: mail, but I’m not sure if that applies to this server, or future ones, or even if that’s EC2 related at all (they do offer mass emailing services for money)

All-in-all, I’ve been very happy with Amazon Web Services. My only real complaint is the lack of a global overview in EC2.