Swedish Internet of Things Day in Stockholm

As a result of our continued interest in smart devices and the Internet of Things as well as cooperation with Swedish universities and research institutions, we were honoured with the invitation to participate in the creation of a new initiative – the Swedish Inernet of Things Centre, whose beautiful logo you can see above. The main actor behind the initiative, SICS, wants to give the project a kick-start in the form of a very promising event, the Internet of Things Day in Stockholm, on February 9.

Several hundred people are expected to attend, among them representatives of other companies and institutions that co-create the SIoTC – with Ericsson, Microsoft, KTH, Mobile Life, Stockholm University, Wisenet, Swedish ICT, Company P, Vendolocus and ourselves among them – which makes the SIoT Day a very interesting place to find connections and partners in IoT-related projects, as well as learn what’s ‘in’ in this pretty hot topic.

We’ll also be co-hosting one of the poster/demos during the 15.15 session, but more info on that later!

The full agenda
9.30 Welcome, Christer Norström, CEO of SICS
9.35 Why a consumer-oriented Internet of Things centre in Sweden?, Kristina Höök, head of the centre
10.00 Keynote by Bu Fanjin, deputy Chief Engineer of CEST, Ministry of Industry and Information Technology of China: China Internet of Things Plan 2011-2015
10.45 Keynote by Mike Kuniavsky, Orangecone, US: The Internet of people: integrating Internet of Things technologies is not a technical problem
11.30 Living with Internet of Things, Oskar Juhlin, Mobile Life
12.00 Lunch
13.00 Device software challenges, Adam Dunkels, SICS
13.30 Big data challenges, Ali Ghodsi, KTH
14.00 Finding values in big data, Jan Höller, Ericsson Research
14.30 Allowing everyone to create embedded systems, Steve Hodges, .NET Gadgeteer
15.00 A training app for the Swedish Olympic cross country ski team, Christer Norström
15.15 Coffee and demos

For more info, visit http://www.sics.se/Internet_of_Things_Day

eCos-3.0 port for OpenRISC

During our work with the OpenRISC platform we were missing our favourite real-time operating system – eCos. Although some porting work had been performed earlier, the eCos port was no longer supported. With the development of the OpenRISC project, as a result of toolchain and other changes, it had stopped working.

Also, it was based on the now obsolete 2.0 version of eCos.

We decided that a freshly updated eCos port could be useful both in our work and for the OpenRISC community, and here it is!

On http://opencores.org/or1k/ECos you will find the associated wiki page and from there you can download the code, of which Piotr Skrzypek is the maintainer.

Embedded Conference Scandinavia 2011 in Stockholm

Embedded Conference Scandinavia logo
Last year we wrote that ECS 2010 would gain a sure place in our event calendar and so it did – on 4-5 October we took part in the 2011 edition of Embedded Conference Scandinavia. This time we were able to see the entire event and participate in the handing out of the Swedish Embedded Award, a very nice ceremony accompanied by music, good food, and a little twist in the form of short poems in Swedish in honour of the award winners.

The prize in the Enterprise category was especially well-deserved, going to Comfort Audio AB for their extremely small digital audio receiver for use in hearing aids. Well done!

If you can read Swedish, you’ll find more info on the winners of the Embedded Award 2011 in all categories on the Award’s home page.

Embedded Conference Scandinavia 2011

The organizers underline that the Conference was an even greater success that the one last year, with a 15% increase in the number of visitors. We certainly felt this year’s event to be even more beneficial than the previous one, we had a lot of interesting conversations with our friends from Halmstad and Stockholm and even managed to see a few of the talks.

Especially the one given by Jonas Bonn from SouthPole on the current state of OpenRISC Linux port was a great and insightful speech, a good summary of where the OpenRISC project stands with respect to Linux support in view of the port’s inclusion in the 3.1 Linux mainline kernel.

Other talks were also nice, although some did lack the level of detail that would make them interesting. To be fair, this is always hard to achieve if the knowledge of the audience in the field in question cannot be predicted.

Well, we should probably start preparing for next year!

hi[11] Scandinavian Industry EXPO in Herning, Denmark

hi[11] logo

The mid-Jutland city of Herning is “the” place to be when it comes to companies which work inside or for the industry sector in Scandinavia, as every other year it is host to the biggest such exposition in the region.

Although not really the easiest place to get to for everyone, Herning’s central location in Denmark ensures that companies from all over the country are well represented. Several hundred exhibitors originate from very different branches of industry but share one thing: the growing awareness that information technology and embedded systems in particular are playing the key role in making any product stand up to the challenges of today.

This was reflected in the fact that while the various exhibition halls reflected different branches of industry, one separate pavillon was dedicated to exclusively to industrial IT, irrespective of application. It is there we spent the most of our time in Herning.

Overall, the fair was a good way to take a glance of the Danish market, strike up some good relations. If you want to get a feel of what hi[11] looked like, take a look at the video below (in Danish):

(author: Henrik Helms)

ELFSharp library

Our recent involvement in different projects generated a need to interface with ELF files from a C# application. Fortunately one of our guys – Konrad Kruczynski – had written a library for just that some time earlier, and instead of writing ELF support for C# from scratch (apparently, there was no earlier support) we could just develop the existing library.

We hope the project comes in handy to other people who’d be looking for such functionality.

The project is hosted at elfsharp.antmicro.com.

ICES 4th Annual Conference in Stockholm

Whether to go to the 4th Annual Conference by KTH’s Innovative Centre for Embedded Systems was not a tough decision to make, as the topic struck as as quite relevant – “New Businesses based on Embedded Systems – how to succeed!”

Indeed, several different approaches to the issue were presented, with speakers from both organizations and businesses old and new, those which introduced embedded systems decades ago and those which only recently took heart to this kind of stuff. Even though the starting point was different, the conclusion was universally agreed upon – embedded systems are the way to go, but it’s not so easy to make successful use of them.

The panel speakers

Panel Members at the ICES 4th Annual Conference

What we liked about the presentations is how one important topic kept coming up in almost each and every one of them – and especially in that given by Christian Sandström from KTH – that it is critical to understand the needs of the customer and work closely with those who understand the market to succeed, otherwise even the best idea will be wasted.

One funny thing that came up during his presentation was an comparison he made between a network of smart embedded devices and… a swarm of ants! Their power lies in great cooperation, keeping one another informed and distributing jobs between many agents, which makes the task virtually fail-safe.

See for yourselves!

That is exactly the association we were going for. Christian was very positively surprised seeing our company’s name on our name-tags! We had a very pleasant chat with him.

ICES conference attendants

ICES 4th Annual Conference attendants

The exhibitions held during breaks between talks were also very interesting, with some of the speakers giving additional information on what they were talking before as well as many current KTH projects. They were also an excellent opportunity to talk with the great guys at Freescale and EIS.

The food and drinks were very well chosen and simply delicious – we also really appreciate the concern the organizers showed for providing dishes according to everyone’s tastes and dietary recommendations – and as can be deduced from the photos, the venue was just as nice. Overall, it was an incredibly pleasant day.

At the conference we finally got a chance to meet Vicky from ICES in person, and it’s at her courtesy we use these photos. Thanks!

Support for AMONTEC-compatible JTAG cables in Advanced Debug System

Advanced Debug System is a project that enables debugging capabilities in the OpenRISC architecture.
It is used mainly in the MinSoC project.
Advanced Debug System supports a variety of cables, including those based the on FT2232 chip.
However, the program didn’t seem to work with AMONTEC ARM JTAG cable.
AMONTEC established a standard followed by other manufacturers and there are many inexpensive AMONTEC-compatible cables used for ARM microcontrollers.

After some research we identified the problem: AMONTEC cable has an additional line, called JTAG_OE_N.
This output-enable line needs to be driven low.
Here is a small patch that enables JTAG_OE_N signal.

1
2
3
4
5
6
7
8
9
10
11
--- A/cable_ft2232.c    2011-08-24 11:19:46.042680534 +0200
+++ B/cable_ft2232.c    2011-08-24 11:19:58.003648945 +0200
@@ -824,7 +824,7 @@

     buf[0]= SET_BITS_LOW;
     buf[1]= 0x00;
-    buf[2]= 0x0b;
+    buf[2]= 0x1b;
     buf[3]= TCK_DIVISOR;
     buf[4]= 0x01;
     buf[5]= 0x00;

Please note, that you may also need to adjust the product id to match your cable.
The product id is hardcoded in the cable_ft2232.c file:

1
2
3
4
5
6
7
usbconn_cable_t usbconn_ft2232_mpsse_CableID2= {
  "CableID2",         /* cable name */
  "CableID2",         /* string pattern, not used */
  "ftdi-mpsse",       /* default usbconn driver */
  0x0403,             /* VID */
  0x6010              /* PID */
};

The product id can be read by issuing lsusb command. In out case, we had to change 0×6010 to 0xCFF8 as we are using a And-Tech ARM JTAG cable.

Hope it helps!

Callback support for libmodbus 2.0

In our work with the Modbus protocol we found it useful to utilize a library by Stephane Raimbault – libmodbus.
One of our recent projects, however, required one particular functionality which the library did not provide, so we decided to add it.

The addition enables a more event-driven approach to Modbus, utilizing callbacks to allow the user to perform commands rather than simply store values. This also enabled us to implement another way of storing bit values (which was used in one of our customer’s devices we had to interface with).

Callbacks that have to be hooked are:

1
2
3
4
5
6
uint8_t modbus_get_coil_status(void *data, uint16_t address);
void modbus_set_coil_status(void *data, uint16_t address, uint8_t value);
uint8_t modbus_get_input_status(void *data, uint16_t address);
uint16_t modbus_get_input_register(void *data, uint16_t address);
uint16_t modbus_get_holding_register(void *data, uint16_t address);
void modbus_set_holding_register(void *data, uint16_t address, uint16_t value);

As the project is hosted on GitHub, we’ve simply released it as a fork – you’ll find it in the “v2.0.X-callback” branch of https://github.com/antmicro/libmodbus.

FDT support for QEMU/Microblaze

As mentioned in the previous note on Customizing Microblaze emulation, the original microblaze/qemu provided support for a Petalogix Spartan3adsp1800 board only. Thanks to the modifications introduced in that note it was possible to create an external configuration file which listed the peripherals to be included in the emulation, thus enabling the support of any other Microblaze configuration.

As promised in the summary of the note, we have greatly improved this mechanism, so that all the information is extracted directly from the .dtb (Flattened Device Tree file) file and the mb.per file is no longer needed.

To modify the .dtb file simply decompile it with Device Tree Compiler using the following command:

1
dtc -I dtb -O dts mb.dtb > mb.dts

Once the modifications are performed, the altered data can be compiled back to .dtb file using the following command:

1
dtc -I dts -O dtb mb.dts > mb.dtb

For example, the uartlite UART is described using Flattened Device Tree file format in the following way:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
RS232_Uart_1: serial@84000000 {
    clock-frequency = <125000000>;
    compatible = "xlnx,xps-uartlite-1.00.a";
    current-speed = <115200>;
    device_type = "serial";
    interrupt-parent = <&xps_intc_0>;
    interrupts = < 3 0 >;
    port-number = <0>;
    reg = < 0x84000000 0x10000 >;
    xlnx,baudrate = <0x1c200>;
    xlnx,data-bits = <0x8>;
    xlnx,family = "virtex5";
    xlnx,odd-parity = <0x0>;
    xlnx,use-parity = <0x0>;
} ;

In our modification, only the “compatible”, “interrupts” and “reg” fields are taken into consideration.

The attached .diff file is compatible with the latest QEMU 0.14.1

To include the change, QEMU must be compiled with libfdt support.

It modifies the original petalogix_s3adsp1800_mmu.c so that instead of adding default peripherals it loads the dtb file and dynamically adds peripherals basing on the data from the Flattened Device Tree file.

This modification is released under the GPL.

Attached .diff file: qemu_microblaze_fdt.diff.gz

U-Boot for Toradex Colibri Tegra 250 Module

Recently our friends at Toradex released engineering samples of the fantastic Colibri Tegra module based on the famed NVIDIA Tegra 2 Cortex-A9 MPCore. The only thing it was lacking was open-source software for the boot process.

We’ve decided to port the well-established U-Boot bootloader (from DENX) as it’s suited best for booting our internal, console-only port of the Linux 2.6.36 kernel.

In the attachment to this post you will find the source files necessary to build and run U-Boot on Toradex’ Orchid and Iris carrier boards. For those who want to miss out on the fun of building it from scratch, a binary image is included. The bootloader runs at a 115200 baudrate, on UART_A.

The major functionalities which are featured in this release are:

  • Separate configuration layout files for Toradex/Colibri
  • PLL, Clock and pinmux configuration
  • cores initialization
  • UART_A initialization, serial console
  • Initialization for USB ULPI (SMSC USB3340)
  • Asix AX88772B USB 2.0 Ethernet support

Detailed information, descriptions of the patching and compilation processes are provided in the attached manual.

The code is released under GPL.

We’d like to thank Toradex for allowing us to get an early sample of the Iris board, which greatly helped our development effort.

Attached .tar.gz file: u-boot-2011.03-rc2-toradex-colibri-tegra.tar.gz

Attached .pdf file: U-Boot_Colibri_Manual.pdf

Attached .bin file: u-boot-2011.03-rc2-toradex-colibri-tegra.bin