IOT: Frameworks and Board Support Packages

With the Intel Edison, Texas Instruments LaunchPads, or Arduinos, you use a language framework like Wiring, the language in the Arduino IDE, C/C++, or even C#.  The Arduino or similar 8-bit systems usually use a Framework, where a 16-bit (MSP430 LaunchPads) and higher hardware (Edison or similar) can easily support either an operating system or a framework.

Headless and Down in the 1’s and 0’s

Let’s say you want to use the Edison, which doesn’t support a high resolution display or head, because the Edison board is designed to be used in a headless manner.  In this case the Edison would use it’s onboard WiFi or Bluetooth to communicate with the client’s WiFi, or Bluetooth.  The client could be a computer or phone that supports a display and connects to the cloud after processing or compacting the information.. 

Or you could use a language like Processing, C#, C/C++ to create a GUI, again it is just an interface, which .  So, keep your requirements focused and simple, so for most sensor work, you need a:

  • Clean presentation of data
  • Recommendation of what to do for the user, for instance: “All is well”, “Temperature is rising”, “Something bad is going to happen: RUN!”
  • Tracking that the task was done, in this case the software would report to the cloud, either on premise or offsite that the task was completed, at what time, and who did it.

The Arduino device, as expected, uses a bootloader that runs when the device is powered on or the reset button is pressed, then the framework based code is run.  The bootloader is a small framework of code on the device, which you can modify.  The Arduino IDE or VisualMicro generated code is then run after the bootloader fires.  In days past this might be referred to as an operating system, but to differentiate it from Linux, Windows Embedded, or Windows, let’s refer to it as a framework.

The Arduino Wiring Language and the Microsoft MicroFramework are both examples of frameworks. To port to either of the frameworks, you will need to have an understanding of the chip and board architecture. 

Usually the Board Support information is generated by the board manufacturer, for instance Texas Instruments for the LaunchPads, and Intel for the Edison, Arduino is a special case as it simply provides the hardware architecture that manufacturers have to follow.  Getting the information may cost you money, depending on the manufacturer, or you will have to pay for consulting on how to create your product.  Why does Microsoft do this?  They don’t, it is the manufacturers of the hardware, which has real physical costs. 

Here are two frameworks that you can use, or find ones that you like:

  • The Microsoft MicroFramework, allows you to install a framework that will work with the C# language and gives you access to interesting software artifacts like events.  For more information see the https://www.netmf.com/, and requires certain design parameters to make things easy.
  • The Arduino Wiring Framework, makes it clear that you have to use one of the known certified hardware designs to load the Processing/Wiring, but you can definitely enhance the Hardware Architecture!  Link: https://arduino.cc/en/Main/ArduinoBoardUno

For a step-by-step process of doing this task, is beyond the scope of what I want to write about right now.  Also, I need to mulch the various but mostly vague process instructions.

For more complex systems or maintenance considerations you will need to use a more complex code framework that is an operating system.  These could be Windows based, Linux or others systems like WinRiver (although I think this is Linux based).  Preparing the Board Support Package (BSP) requires that you have extensive knowledge of the hardware and firmware for the board you want to work with. And if you are still thinking about creating a BSP, make sure to ask the question: Can a cheap no-contract phone do what I need it to do?  If the answer is no, then start your work, it will take time, bear in mind that your time is valuable. 

So let’s say you want to create a board support package, where to get started?  Well in the first place this is going to be a difficult journey, but completely worthwhile.

Information you will need to know to build a Board Support Package

To install a Board Support package you will need to know about the interrupts, registers, port addresses and other items about the target board.  It is a great deal of information, which is why board developers really don’t like changes to the hardware.  If you are getting started, you do make sure that you get used to an architecture that can be expanded to a more powerful processor like the Edison.  However, I am exploring putting a BSP onto the Tiva “C” Series, it is cheap to purchase you can get it at: EKTM4C123GXL for $12.99 including shipping.  But don’t buy it for this blog, I am still exploring the pathway to putting the board support package on the device. 

What about existing Board Support Packages see the list of supported devices that use the Windows Compact 2013 see: Board Support Packages Development

Board support package for the Raspberry PI: https://ceonpi.codeplex.com/releases/view/112612

Tools installation

For the way to develop a Board Support Package for Windows start off by installing

  • Visual Studio 2013 Community Edition
  • Windows Embedded Compact 2013 (link) this is BIG package if you install everything, taking up 40 GIGABYTES, so make sure that you have space before you do the installation