New website for Embunit www.embunit.com

The new website is up and running with features, file downloads, online purchase, support and maintenance details, etc.

Visit embunit.com

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2012/new-website-for-embunit-www-embunit-com/

Embunit is here!

Version 1.0.0 of Embunit is now available for download.

The download is 48MB, most of which is the .NET 4.0 Client Profile. If you don’t want to download the whole thing straightaway, have a look at the User Guide to get a feel for what it can do.

The download includes a 30 day evaluation license. If you need to evaluate for longer, contact me and I will send you a different license key.

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2012/embunit-is-here/

Coming soon – Embunit

The first version of the unit testing tool is complete. I am just sorting out the final details like the installer, license keys, web site, example projects etc.

The name of the product is Embunit and it runs on .NET 4.0, which means if you are running Windows XP you need SP3. If this proves to be an obstacle I will build a version that runs on an earlier version of .NET (most likely 2.0 or 3.5). The problem with the earlier versions is that if you don’t already have the .NET framework you’re looking at a 200MB download, whereas .NET 4.0 is about 41MB for the Client Profile. I was really surprised to discover that my laptop runs Microsoft Office 2010 with no .NET framework whatsoever!

Note: There is a sourceforge project called Embedded Unit that uses the abbreviation embUnit. That is nothing to do with my product and hopefully there won’t be too much (added) confusion. A quick search of unit testing tools and frameworks throws up a plethora of similar sounding names; so I’m in good company.

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2012/coming-soon-embunit/

Test harness code generation

The development of our new unit testing tool has reached its first milestone with the completion of the test harness generator.

The generator takes an XML file containing the test case definitions and automatically generates C or C++ source code for the test harness. Some of the C++ features are:

  • Objects can be instantiated (on the heap or the stack), methods called, and objects deleted.
  • Exceptions can be tested (including those thrown by constructors), and unexpected exceptions are trapped.
  • The output of the test harness is easily configured to suit the target hardware.
  • The test context is accessable from user stub-code.
  • Whitebox testing is implemented by adding a friend to the class being tested.
  • Exception handling can be disabled to make the generated code compatible with Embedded C++ compilers.

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2011/test-harness-code-generation/

Embedded C++ Compiler Limitations

These days there are many C++ compilers available for developing embedded software.  However, they often provide a restricted set of language features, or have the facility to switch-off certain features. Some examples are given below, and from these it seems the feature most likely to be omitted is exception handling.

The unit testing tool being developed by Apollo Systems Contracts supports exception handling (including testing that exceptions are generated and detecting uncaught exceptions). However exception handling can be disabled, making it compatible with ‘Embedded C++’ as defined below.

ARM

ARM’s C++ compiler has exceptions disabled by default.

IAR

IAR’s compiler supports exceptions, but can also be run in ‘Embedded C++’ mode (see below), or their own rather less-restricted ‘Extended Embedded C++’ mode (just lacks RTTI and Exceptions).

Embedded C++

The Embedded C++ language (EC++) lacks the following features:

  • Multiple inheritance
  • Virtual base classes
  • Run-time type information (RTTI)
  • New style casts (static_cast, dynamic_cast, reinterpret_cast, and const_cast)
  • The mutable type qualifier
  • Namespaces
  • Exceptions
  • Templates

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2011/embedded-c-compiler-limitations/

Finding a small office

When it comes to finding a small office, your options are limited. There is plenty of office space out there but it’s mostly large suites covering thousands of square feet. The alternatives are usually small high street shops or serviced offices.

The former usually come with what is known as a “full repairing and insuring lease”, which basically means that you are responsible for any repairs that need to be carried out. It is essential to get a surveyor to check the condition of the property before signing anything. Oh, and the other thing is business rates. The Valuation Office Agency assesses each non-domestic property and gives it a rateable value (i.e. how much they think it should be rented out for) and then you pay a percentage of that value as business rates. The percentage you pay depends on your rateable value, with lower values qualifying for small business rate relief.

I went down the route of serviced offices where you generally pay a fixed price that includes rent, rates, heating, and electricity. It is important to check what’s included and what’s not. You can expect to pay extra for your internet and telephone, but some places include free tea and coffee and handle outgoing mail for you. There is usually a communal kitchen area with fridge, kettle, and microwave. Other facilities such as photocopying and meeting rooms are generally on a pay per use basis. Office furniture may be available as an optional extra, otherwise you will have to supply your own. Other things to ask about are parking, office cleaning, cycle racks, and showers. For me one of the most important things was judging whether the place had a friendly atmosphere where I could feel at home and produce my best work.

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2011/finding-a-small-office/

Protection for your PC

I was talking about getting a mains extension lead with surge protection for my new PC when someone kindly offerred me a small Belkin UPS that was surplus to requirements. It had two rows of three sockets (one row surge protected and the other row battery backed) and a switch to turn them all off. This was ideal for my PC and dual monitor setup. I tried the surge protected sockets first and then swapped over to the row of battery backed sockets, mainly because it gave a more convenient arrangement of boxes and cables.

As luck would have it, a few days later I was in the office when the lights suddenly started flashing on and off like something out of Scooby Doo. After about 30 seconds they went out completely, leaving the poor little UPS was buzzing and beeping frantically. I calmly shut down the PC (not quite so calm when Windows decided to install some updates) and the buzzing and beeping subsided. I switched everything off and finished the day working from home.

In the past I would have considered having a UPS for a desktop PC as overkill, but they are not very expensive and well worth it for the peace of mind. The electricity company have now fixed the fault so there should be no more episodes like the one just described, but I’m keeping that UPS right where it is.

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2011/protection-for-your-pc/